diff options
author | Hillf Danton <dhillf@gmail.com> | 2011-02-11 17:17:33 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2011-02-12 15:13:34 -0500 |
commit | 9dfeb3157e34315b8ca27d816a79358698a999ac (patch) | |
tree | e60afdfe8e8443003b1a96274a5fadf4325f5a92 /drivers/scsi/device_handler | |
parent | 04b6e153b64471ff43dde82b0122e67cf491f2f5 (diff) |
[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 <dhillf@gmail.com>
Signed-off-by: Babu Moger <babu.moger@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/device_handler')
-rw-r--r-- | drivers/scsi/device_handler/scsi_dh_alua.c | 2 | ||||
-rw-r--r-- | drivers/scsi/device_handler/scsi_dh_emc.c | 2 | ||||
-rw-r--r-- | drivers/scsi/device_handler/scsi_dh_hp_sw.c | 4 | ||||
-rw-r--r-- | drivers/scsi/device_handler/scsi_dh_rdac.c | 2 |
4 files changed, 5 insertions, 5 deletions
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) | |||
763 | unsigned long flags; | 763 | unsigned long flags; |
764 | int err = SCSI_DH_OK; | 764 | int err = SCSI_DH_OK; |
765 | 765 | ||
766 | scsi_dh_data = kzalloc(sizeof(struct scsi_device_handler *) | 766 | scsi_dh_data = kzalloc(sizeof(*scsi_dh_data) |
767 | + sizeof(*h) , GFP_KERNEL); | 767 | + sizeof(*h) , GFP_KERNEL); |
768 | if (!scsi_dh_data) { | 768 | if (!scsi_dh_data) { |
769 | sdev_printk(KERN_ERR, sdev, "%s: Attach failed\n", | 769 | 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) | |||
650 | unsigned long flags; | 650 | unsigned long flags; |
651 | int err; | 651 | int err; |
652 | 652 | ||
653 | scsi_dh_data = kzalloc(sizeof(struct scsi_device_handler *) | 653 | scsi_dh_data = kzalloc(sizeof(*scsi_dh_data) |
654 | + sizeof(*h) , GFP_KERNEL); | 654 | + sizeof(*h) , GFP_KERNEL); |
655 | if (!scsi_dh_data) { | 655 | if (!scsi_dh_data) { |
656 | sdev_printk(KERN_ERR, sdev, "%s: Attach failed\n", | 656 | 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) | |||
339 | unsigned long flags; | 339 | unsigned long flags; |
340 | int ret; | 340 | int ret; |
341 | 341 | ||
342 | scsi_dh_data = kzalloc(sizeof(struct scsi_device_handler *) | 342 | scsi_dh_data = kzalloc(sizeof(*scsi_dh_data) |
343 | + sizeof(struct hp_sw_dh_data) , GFP_KERNEL); | 343 | + sizeof(*h) , GFP_KERNEL); |
344 | if (!scsi_dh_data) { | 344 | if (!scsi_dh_data) { |
345 | sdev_printk(KERN_ERR, sdev, "%s: Attach Failed\n", | 345 | sdev_printk(KERN_ERR, sdev, "%s: Attach Failed\n", |
346 | HP_SW_NAME); | 346 | 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) | |||
798 | int err; | 798 | int err; |
799 | char array_name[ARRAY_LABEL_LEN]; | 799 | char array_name[ARRAY_LABEL_LEN]; |
800 | 800 | ||
801 | scsi_dh_data = kzalloc(sizeof(struct scsi_device_handler *) | 801 | scsi_dh_data = kzalloc(sizeof(*scsi_dh_data) |
802 | + sizeof(*h) , GFP_KERNEL); | 802 | + sizeof(*h) , GFP_KERNEL); |
803 | if (!scsi_dh_data) { | 803 | if (!scsi_dh_data) { |
804 | sdev_printk(KERN_ERR, sdev, "%s: Attach failed\n", | 804 | sdev_printk(KERN_ERR, sdev, "%s: Attach failed\n", |