From: Hillf Danton Date: Fri, 11 Feb 2011 22:17:33 +0000 (-0700) Subject: [SCSI] scsi_dh: cosmetic change to sizeof() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9dfeb3157e34315b8ca27d816a79358698a999ac;p=linux-beck.git [SCSI] scsi_dh: cosmetic change to sizeof() instead of doing sizeof(struct X) it's better to do sizeof(*v) where v is the variable pointing to struct X. Signed-off-by: Hillf Danton Signed-off-by: Babu Moger Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c index 5b6f9ab10d7a..7cae0bc85390 100644 --- a/drivers/scsi/device_handler/scsi_dh_alua.c +++ b/drivers/scsi/device_handler/scsi_dh_alua.c @@ -763,7 +763,7 @@ static int alua_bus_attach(struct scsi_device *sdev) unsigned long flags; int err = SCSI_DH_OK; - scsi_dh_data = kzalloc(sizeof(struct scsi_device_handler *) + scsi_dh_data = kzalloc(sizeof(*scsi_dh_data) + sizeof(*h) , GFP_KERNEL); if (!scsi_dh_data) { sdev_printk(KERN_ERR, sdev, "%s: Attach failed\n", diff --git a/drivers/scsi/device_handler/scsi_dh_emc.c b/drivers/scsi/device_handler/scsi_dh_emc.c index 6faf472f7537..48441f6908a4 100644 --- a/drivers/scsi/device_handler/scsi_dh_emc.c +++ b/drivers/scsi/device_handler/scsi_dh_emc.c @@ -650,7 +650,7 @@ static int clariion_bus_attach(struct scsi_device *sdev) unsigned long flags; int err; - scsi_dh_data = kzalloc(sizeof(struct scsi_device_handler *) + scsi_dh_data = kzalloc(sizeof(*scsi_dh_data) + sizeof(*h) , GFP_KERNEL); if (!scsi_dh_data) { sdev_printk(KERN_ERR, sdev, "%s: Attach failed\n", diff --git a/drivers/scsi/device_handler/scsi_dh_hp_sw.c b/drivers/scsi/device_handler/scsi_dh_hp_sw.c index d0363c8fa348..b479f1eef968 100644 --- a/drivers/scsi/device_handler/scsi_dh_hp_sw.c +++ b/drivers/scsi/device_handler/scsi_dh_hp_sw.c @@ -339,8 +339,8 @@ static int hp_sw_bus_attach(struct scsi_device *sdev) unsigned long flags; int ret; - scsi_dh_data = kzalloc(sizeof(struct scsi_device_handler *) - + sizeof(struct hp_sw_dh_data) , GFP_KERNEL); + scsi_dh_data = kzalloc(sizeof(*scsi_dh_data) + + sizeof(*h) , GFP_KERNEL); if (!scsi_dh_data) { sdev_printk(KERN_ERR, sdev, "%s: Attach Failed\n", HP_SW_NAME); diff --git a/drivers/scsi/device_handler/scsi_dh_rdac.c b/drivers/scsi/device_handler/scsi_dh_rdac.c index 7d83a84442a7..bdff28014a2a 100644 --- a/drivers/scsi/device_handler/scsi_dh_rdac.c +++ b/drivers/scsi/device_handler/scsi_dh_rdac.c @@ -798,7 +798,7 @@ static int rdac_bus_attach(struct scsi_device *sdev) int err; char array_name[ARRAY_LABEL_LEN]; - scsi_dh_data = kzalloc(sizeof(struct scsi_device_handler *) + scsi_dh_data = kzalloc(sizeof(*scsi_dh_data) + sizeof(*h) , GFP_KERNEL); if (!scsi_dh_data) { sdev_printk(KERN_ERR, sdev, "%s: Attach failed\n",