Message ID | 1352283494-31200-3-git-send-email-gaowanlong@cn.fujitsu.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c index 8746c37..5390229 100644 --- a/drivers/scsi/virtio_scsi.c +++ b/drivers/scsi/virtio_scsi.c @@ -587,11 +587,10 @@ static struct virtio_scsi_target_state *virtscsi_alloc_tgt( struct virtio_device *vdev, int sg_elems) { struct virtio_scsi_target_state *tgt; - gfp_t gfp_mask = GFP_KERNEL; /* We need extra sg elements at head and tail. */ tgt = kmalloc(sizeof(*tgt) + sizeof(tgt->sg[0]) * (sg_elems + 2), - gfp_mask); + GFP_KERNEL); if (!tgt) return NULL;
Just use the macro instead of define a variable. Cc: James E.J. Bottomley <JBottomley@parallels.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: linux-scsi@vger.kernel.org Cc: kvm@vger.kernel.org Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> --- drivers/scsi/virtio_scsi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)