linux/drivers/scsi/mpt3sas
Joe Lawrence 62c4da449d mpt3sas: correct scsi_{target,device} hostdata allocation
In _scsih_{slave,target}_alloc, an incorrect structure type is passed
to sizeof() when allocating storage for hostdata.  Luckily larger
structure types were used, so at least the wrong sizes were safe:

  struct scsi_device (1784 bytes) > struct MPT3SAS_DEVICE (24 bytes)
  struct scsi_target (760 bytes)  > struct MPT3SAS_TARGET (32 bytes)

This fixes the following smatch warnings:

  drivers/scsi/mpt3sas/mpt3sas_scsih.c:1166 _scsih_target_alloc()
    warn: struct type mismatch 'MPT3SAS_TARGET vs scsi_target'

  drivers/scsi/mpt3sas/mpt3sas_scsih.c:1280 _scsih_slave_alloc()
    warn: struct type mismatch 'MPT3SAS_DEVICE vs scsi_device'

Signed-off-by: Joe Lawrence <joe.lawrence@stratus.com>
Acked-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-07-25 17:16:57 -04:00
..
mpi [SCSI] mpt3sas: MPI2.5 Rev F v2.5.1.1 specification 2013-07-09 08:52:53 +01:00
Kconfig [SCSI] mpt3sas: 2013 source code copyright 2013-07-09 08:34:03 +01:00
Makefile [SCSI] Allow MPT Fusion SAS 3.0 driver to be built into the kernel 2013-09-06 11:42:53 -07:00
mpt3sas_base.c MPT / PCI: Use pci_stop_and_remove_bus_device_locked() 2014-01-14 12:14:25 -07:00
mpt3sas_base.h mpt3sas: Remove uses of serial_number 2014-05-28 18:13:20 +02:00
mpt3sas_config.c [SCSI] mpt3sas: 2013 source code copyright 2013-07-09 08:34:03 +01:00
mpt3sas_ctl.c mpt3sas: Remove uses of serial_number 2014-05-28 18:13:20 +02:00
mpt3sas_ctl.h [SCSI] mpt3sas: 2013 source code copyright 2013-07-09 08:34:03 +01:00
mpt3sas_debug.h [SCSI] mpt3sas: 2013 source code copyright 2013-07-09 08:34:03 +01:00
mpt3sas_scsih.c mpt3sas: correct scsi_{target,device} hostdata allocation 2014-07-25 17:16:57 -04:00
mpt3sas_transport.c block: Kill bio_segments()/bi_vcnt usage 2013-11-23 22:33:51 -08:00
mpt3sas_trigger_diag.c [SCSI] mpt3sas: 2013 source code copyright 2013-07-09 08:34:03 +01:00
mpt3sas_trigger_diag.h [SCSI] mpt3sas: 2013 source code copyright 2013-07-09 08:34:03 +01:00