linux/drivers/s390/scsi
Vasily Gorbik c6756b7d0c s390/dasd,zfcp: fix gcc 8 stringop-truncation warnings
ccw "busid" should always be NUL-terminated, as evident from e.g.
get_ccwdev_by_busid doing "return (strcmp(bus_id, dev_name(dev)) == 0)".

Replace all strncpy initializing busid with strlcpy. This fixes the
following gcc 8 warnings:

drivers/s390/scsi/zfcp_aux.c:104:2: warning: 'strncpy' specified bound 20
equals destination size [-Wstringop-truncation]
  strncpy(busid, token, ZFCP_BUS_ID_SIZE);

drivers/s390/block/dasd_eer.c:316:2: warning: 'strncpy' specified bound 10
equals destination size [-Wstringop-truncation]
  strncpy(header.busid, dev_name(&device->cdev->dev), DASD_EER_BUSID_SIZE);

drivers/s390/block/dasd_eer.c:359:2: warning: 'strncpy' specified bound 10
equals destination size [-Wstringop-truncation]
  strncpy(header.busid, dev_name(&device->cdev->dev), DASD_EER_BUSID_SIZE);

drivers/s390/block/dasd_devmap.c:429:3: warning: 'strncpy' specified bound
20 equals destination size [-Wstringop-truncation]
   strncpy(new->bus_id, bus_id, DASD_BUS_ID_SIZE);

Acked-by: Stefan Haberland <sth@linux.ibm.com>
Acked-by: Steffen Maier <maier@linux.ibm.com>
Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2018-07-02 11:24:52 +02:00
..
Makefile s390: add a few more SPDX identifiers 2017-12-05 07:51:09 +01:00
zfcp_aux.c s390/dasd,zfcp: fix gcc 8 stringop-truncation warnings 2018-07-02 11:24:52 +02:00
zfcp_ccw.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
zfcp_dbf.c SCSI misc on 20180610 2018-06-10 13:01:12 -07:00
zfcp_dbf.h scsi: zfcp: decouple SCSI traces for scsi_eh / TMF from scsi_cmnd 2018-05-18 11:22:11 -04:00
zfcp_def.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
zfcp_erp.c scsi: zfcp: support SCSI_ADAPTER_RESET via scsi_host sysfs attribute host_reset 2018-05-18 11:28:15 -04:00
zfcp_ext.h SCSI misc on 20180610 2018-06-10 13:01:12 -07:00
zfcp_fc.c scsi: zfcp: cleanup indentation for posting FC events 2018-05-18 11:28:15 -04:00
zfcp_fc.h scsi: zfcp: split FCP_CMND IU setup between SCSI I/O and TMF again 2018-05-18 11:22:11 -04:00
zfcp_fsf.c scsi: zfcp: add port speed capabilities 2018-05-18 11:28:16 -04:00
zfcp_fsf.h scsi: zfcp: enhance comments on fc_link_speed and supported_speed 2018-05-18 11:28:17 -04:00
zfcp_qdio.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
zfcp_qdio.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
zfcp_reqlist.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
zfcp_scsi.c SCSI misc on 20180610 2018-06-10 13:01:12 -07:00
zfcp_sysfs.c scsi: zfcp: support SCSI_ADAPTER_RESET via scsi_host sysfs attribute host_reset 2018-05-18 11:28:15 -04:00
zfcp_unit.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00