Skip to content

Commit 5fa49dd

Browse files
author
Alexander Gordeev
committed
s390/ipl: Fix never less than zero warning
DEFINE_IPL_ATTR_STR_RW() macro produces "unsigned 'len' is never less than zero." warning when sys_vmcmd_on_*_store() callbacks are defined. Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Fixes: 247576b ("s390/ipl: Do not accept z/VM CP diag X'008' cmds longer than max length") Reviewed-by: Heiko Carstens <[email protected]> Signed-off-by: Alexander Gordeev <[email protected]>
1 parent 4185663 commit 5fa49dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/s390/kernel/ipl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ static ssize_t sys_##_prefix##_##_name##_store(struct kobject *kobj, \
270270
if (len >= sizeof(_value)) \
271271
return -E2BIG; \
272272
len = strscpy(_value, buf, sizeof(_value)); \
273-
if (len < 0) \
273+
if ((ssize_t)len < 0) \
274274
return len; \
275275
strim(_value); \
276276
return len; \

0 commit comments

Comments
 (0)