Nathan Chancellor
10c51fa85c
arm64: percpu: Initialize ret in the default case
...
[ Upstream commit b5bb425871 ]
Clang warns that if the default case is taken, ret will be
uninitialized.
./arch/arm64/include/asm/percpu.h:196:2: warning: variable 'ret' is used
uninitialized whenever switch default is taken
[-Wsometimes-uninitialized]
default:
^~~~~~~
./arch/arm64/include/asm/percpu.h:200:9: note: uninitialized use occurs
here
return ret;
^~~
./arch/arm64/include/asm/percpu.h:157:19: note: initialize the variable
'ret' to silence this warning
unsigned long ret, loop;
^
= 0
This warning appears several times while building the erofs filesystem.
While it's not strictly wrong, the BUILD_BUG will prevent this from
becoming a true problem. Initialize ret to 0 in the default case right
before the BUILD_BUG to silence all of these warnings.
Reported-by: Prasad Sodagudi <psodagud@codeaurora.org >
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com >
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com >
Signed-off-by: Dennis Zhou <dennis@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2018-11-27 16:10:47 +01:00
..
2017-11-02 11:10:55 +01:00
2015-03-25 11:49:30 +00:00
2017-06-02 15:13:52 +01:00
2018-07-22 14:28:50 +02:00
2017-08-31 15:31:38 +01:00
2017-08-11 16:01:43 +02:00
2015-03-27 13:44:35 +00:00
2017-08-08 16:28:13 +01:00
2012-09-17 10:24:44 +01:00
2018-02-16 20:22:49 +01:00
2018-07-22 14:28:50 +02:00
2017-05-15 18:30:10 +01:00
2018-05-30 07:51:48 +02:00
2016-06-16 10:48:32 +02:00
2018-02-16 20:22:51 +01:00
2014-04-18 11:40:33 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2016-02-23 17:43:25 +00:00
2017-08-08 16:28:13 +01:00
2018-09-15 09:45:36 +02:00
2017-08-09 12:15:45 +01:00
2017-06-29 16:32:43 +01:00
2017-11-02 11:10:55 +01:00
2018-08-03 07:50:33 +02:00
2017-12-17 15:07:59 +01:00
2012-09-17 13:42:21 +01:00
2015-05-19 16:09:29 +01:00
2016-07-12 16:09:37 +01:00
2018-09-15 09:45:37 +02:00
2018-07-22 14:28:51 +02:00
2017-11-02 11:10:55 +01:00
2018-06-21 04:02:56 +09:00
2017-11-02 11:10:55 +01:00
2016-09-09 11:41:13 +01:00
2016-11-07 18:15:21 +00:00
2017-05-02 11:14:42 +02:00
2017-07-06 19:20:54 -07:00
2014-11-05 09:03:25 +01:00
2018-02-16 20:22:49 +01:00
2017-09-05 09:53:37 -07:00
2017-08-09 11:00:43 +01:00
2016-03-25 16:37:42 -07:00
2016-10-20 09:50:54 +01:00
2017-11-02 11:10:55 +01:00
2012-09-17 13:42:04 +01:00
2018-02-16 20:22:48 +01:00
2017-08-04 15:00:57 +01:00
2017-08-04 15:00:57 +01:00
2016-03-04 18:19:17 +00:00
2018-02-16 20:22:52 +01:00
2017-04-05 18:29:15 +01:00
2017-08-22 17:47:11 +01:00
2017-04-04 16:55:41 +01:00
2015-10-21 15:35:58 +01:00
2017-11-02 11:10:55 +01:00
2017-05-26 10:10:45 +02:00
2017-04-24 13:53:13 -05:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2016-07-19 16:59:40 +01:00
2018-10-10 08:54:25 +02:00
2017-11-02 11:10:55 +01:00
2017-08-04 15:00:47 +01:00
2018-02-16 20:22:50 +01:00
2017-04-05 18:29:15 +01:00
2016-06-16 19:20:51 +01:00
2017-02-27 18:43:45 -08:00
2017-12-14 09:53:00 +01:00
2018-07-22 14:28:51 +02:00
2014-07-11 04:57:44 -07:00
2018-10-03 17:01:00 -07:00
2018-07-22 14:28:52 +02:00
2017-06-15 09:44:59 +01:00
2016-05-20 15:39:42 +02:00
2018-07-22 14:28:51 +02:00
2017-09-18 11:20:19 +01:00
2017-11-02 11:10:55 +01:00
2012-09-17 13:41:56 +01:00
2018-02-16 20:22:46 +01:00
2018-02-16 20:22:49 +01:00
2018-02-16 20:22:53 +01:00
2017-11-02 11:10:55 +01:00
2017-12-05 11:26:31 +01:00
2017-08-04 15:10:12 +01:00
2017-11-02 11:10:55 +01:00
2017-08-15 18:35:00 +01:00
2017-08-15 18:35:00 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-11-27 16:10:47 +01:00
2016-12-13 16:39:21 -08:00
2018-02-22 15:42:23 +01:00
2018-02-16 20:22:46 +01:00
2018-02-16 20:22:50 +01:00
2017-03-09 11:48:47 -08:00
2018-02-16 20:22:47 +01:00
2016-12-05 10:42:34 +00:00
2018-02-16 20:22:46 +01:00
2018-02-16 20:22:51 +01:00
2016-11-07 18:15:04 +00:00
2017-08-09 15:37:49 +01:00
2014-11-28 10:24:59 +00:00
2017-03-23 13:54:50 +00:00
2015-12-02 14:00:10 +00:00
2017-08-10 18:17:32 +01:00
2018-07-17 11:39:30 +02:00
2015-07-29 18:32:09 +01:00
2017-08-21 18:01:04 +01:00
2014-08-19 20:23:02 +01:00
2015-07-27 11:09:34 +01:00
2018-04-26 11:02:17 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-05-30 07:52:02 +02:00
2016-04-21 14:58:21 +02:00
2016-04-21 14:58:21 +02:00
2016-04-21 14:58:21 +02:00
2012-10-11 11:05:13 +01:00
2017-08-09 12:16:26 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2014-07-10 11:06:00 +01:00
2018-02-16 20:22:53 +01:00
2017-06-26 10:54:27 +01:00
2018-07-22 14:28:51 +02:00
2013-06-10 17:58:20 +01:00
2015-10-07 11:56:21 +01:00
2018-02-16 20:22:47 +01:00
2017-11-02 11:10:55 +01:00
2017-09-05 09:53:37 -07:00
2018-02-16 20:22:52 +01:00
2017-04-17 12:52:22 -04:00
2017-04-17 12:52:22 -04:00
2016-11-07 18:15:21 +00:00
2016-07-12 16:06:32 +01:00
2012-09-17 13:42:09 +01:00
2017-04-09 07:49:34 -07:00
2016-12-24 11:46:01 -08:00