From: Joe Lawrence Date: Wed, 25 Jun 2014 21:04:22 +0000 (-0400) Subject: mpt3sas: correct scsi_{target,device} hostdata allocation X-Git-Tag: omap-for-v3.17/fixes-against-rc2~143^2~55 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=62c4da449db0c5a605f8bf99c5ca735da0c0587f;p=pandora-kernel.git 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 Acked-by: Sreekanth Reddy Signed-off-by: Christoph Hellwig --- Reading git-diff-tree failed