summaryrefslogtreecommitdiff
path: root/arch/s390/kernel/ipl.c
diff options
context:
space:
mode:
authorAlexander Gordeev <agordeev@linux.ibm.com>2024-12-09 17:43:48 +0100
committerAlexander Gordeev <agordeev@linux.ibm.com>2024-12-11 18:05:49 +0100
commit5fa49dd8e521a42379e5e41fcf2c92edaaec0a8b (patch)
tree813368bbddc40b95c782bb456533655f70c31117 /arch/s390/kernel/ipl.c
parent41856638e6c4ed51d8aa9e54f70059d1e357b46e (diff)
downloadlwn-5fa49dd8e521a42379e5e41fcf2c92edaaec0a8b.tar.gz
lwn-5fa49dd8e521a42379e5e41fcf2c92edaaec0a8b.zip
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 <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202412081614.5uel8F6W-lkp@intel.com/ Fixes: 247576bf624a ("s390/ipl: Do not accept z/VM CP diag X'008' cmds longer than max length") Reviewed-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Diffstat (limited to 'arch/s390/kernel/ipl.c')
-rw-r--r--arch/s390/kernel/ipl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c
index edbb52ce3f1e..7d12a1305fc9 100644
--- a/arch/s390/kernel/ipl.c
+++ b/arch/s390/kernel/ipl.c
@@ -270,7 +270,7 @@ static ssize_t sys_##_prefix##_##_name##_store(struct kobject *kobj, \
if (len >= sizeof(_value)) \
return -E2BIG; \
len = strscpy(_value, buf, sizeof(_value)); \
- if (len < 0) \
+ if ((ssize_t)len < 0) \
return len; \
strim(_value); \
return len; \