提交 c7553dad 编写于 作者: K Ken Depro 提交者: Greg Kroah-Hartman

staging: unisys: Change alloc calls to use var name instead of type in virthba.c

This patch changes a couple of kzalloc calls to pass the variable name to the
call, rather than the variable struct type.  This is a result of checks
generated during the checkpatch script.
Signed-off-by: NKen Depro <kenneth.depro@unisys.com>
Signed-off-by: NBenjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 79b8cc83
...@@ -398,7 +398,7 @@ process_disk_notify(struct Scsi_Host *shost, struct uiscmdrsp *cmdrsp) ...@@ -398,7 +398,7 @@ process_disk_notify(struct Scsi_Host *shost, struct uiscmdrsp *cmdrsp)
struct diskaddremove *dar; struct diskaddremove *dar;
unsigned long flags; unsigned long flags;
dar = kzalloc(sizeof(struct diskaddremove), GFP_ATOMIC); dar = kzalloc(sizeof(*dar), GFP_ATOMIC);
if (dar) { if (dar) {
dar->add = cmdrsp->disknotify.add; dar->add = cmdrsp->disknotify.add;
dar->shost = shost; dar->shost = shost;
...@@ -1061,7 +1061,7 @@ virthba_slave_alloc(struct scsi_device *scsidev) ...@@ -1061,7 +1061,7 @@ virthba_slave_alloc(struct scsi_device *scsidev)
(vdisk->next->lun == scsidev->lun)) (vdisk->next->lun == scsidev->lun))
return 0; return 0;
} }
tmpvdisk = kzalloc(sizeof(struct virtdisk_info), GFP_ATOMIC); tmpvdisk = kzalloc(sizeof(*tmpvdisk), GFP_ATOMIC);
if (!tmpvdisk) { /* error allocating */ if (!tmpvdisk) { /* error allocating */
LOGERR("Could not allocate memory for disk\n"); LOGERR("Could not allocate memory for disk\n");
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册