aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/pm8001
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2020-11-02 10:25:42 +0000
committerMartin K. Petersen <martin.petersen@oracle.com>2020-11-10 22:10:03 -0500
commitd2a2f3794cbcb2c6051f907fbe207ecf3c69702e (patch)
treecf293145916c4ee03c7fbb9e716e151265aa72b3 /drivers/scsi/pm8001
parentscsi: ufs: Allow an error return value from ->device_reset() (diff)
downloadlinux-dev-d2a2f3794cbcb2c6051f907fbe207ecf3c69702e.tar.xz
linux-dev-d2a2f3794cbcb2c6051f907fbe207ecf3c69702e.zip
scsi: arcmsr: Stop __builtin_strncpy complaining about a lack of space for NUL
SCSI strings like inqdata are not NUL terminated. Fixes the following W=1 kernel build warning(s): In file included from include/linux/bitmap.h:9, from include/linux/nodemask.h:95, from include/linux/mmzone.h:17, from include/linux/gfp.h:6, from include/linux/umh.h:4, from include/linux/kmod.h:9, from include/linux/module.h:16, from drivers/scsi/arcmsr/arcmsr_hba.c:47: In function ‘strncpy’, inlined from ‘arcmsr_handle_virtual_command’ at drivers/scsi/arcmsr/arcmsr_hba.c:3055:3: include/linux/string.h:297:30: warning: ‘__builtin_strncpy’ output truncated before terminating nul copying 4 bytes from a string of the same length [-Wstringop-truncation] 297 | #define __underlying_strncpy __builtin_strncpy | ^ include/linux/string.h:307:9: note: in expansion of macro ‘__underlying_strncpy’ 307 | return __underlying_strncpy(p, q, size); | ^~~~~~~~~~~~~~~~~~~~ In function ‘strncpy’, inlined from ‘arcmsr_handle_virtual_command’ at drivers/scsi/arcmsr/arcmsr_hba.c:3053:3: include/linux/string.h:297:30: warning: ‘__builtin_strncpy’ output truncated before terminating nul copying 16 bytes from a string of the same length [-Wstringop-truncation] 297 | #define __underlying_strncpy __builtin_strncpy | ^ include/linux/string.h:307:9: note: in expansion of macro ‘__underlying_strncpy’ 307 | return __underlying_strncpy(p, q, size); | ^~~~~~~~~~~~~~~~~~~~ In function ‘strncpy’, inlined from ‘arcmsr_handle_virtual_command’ at drivers/scsi/arcmsr/arcmsr_hba.c:3051:3: include/linux/string.h:297:30: warning: ‘__builtin_strncpy’ output truncated before terminating nul copying 8 bytes from a string of the same length [-Wstringop-truncation] 297 | #define __underlying_strncpy __builtin_strncpy | ^ include/linux/string.h:307:9: note: in expansion of macro ‘__underlying_strncpy’ 307 | return __underlying_strncpy(p, q, size); | ^~~~~~~~~~~~~~~~~~~~ Link: https://lore.kernel.org/r/20201102102544.1018706-1-lee.jones@linaro.org Cc: support@areca.com.tw Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/pm8001')
0 files changed, 0 insertions, 0 deletions