Commit ea0dcfcf authored by Quentin Lambert's avatar Quentin Lambert Committed by Greg Kroah-Hartman

staging: unisys: Remove allocation from declaration line

This patch removes allocation from declaration line because
people are known to gloss over declarations.
Signed-off-by: default avatarQuentin Lambert <lambert.quentin@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b247d408
...@@ -1604,9 +1604,9 @@ parahotplug_next_expiration(void) ...@@ -1604,9 +1604,9 @@ parahotplug_next_expiration(void)
static struct parahotplug_request * static struct parahotplug_request *
parahotplug_request_create(struct controlvm_message *msg) parahotplug_request_create(struct controlvm_message *msg)
{ {
struct parahotplug_request *req = struct parahotplug_request *req;
kmalloc(sizeof(struct parahotplug_request),
GFP_KERNEL|__GFP_NORETRY); req = kmalloc(sizeof(*req), GFP_KERNEL|__GFP_NORETRY);
if (req == NULL) if (req == NULL)
return NULL; return NULL;
......
...@@ -36,8 +36,9 @@ struct charqueue { ...@@ -36,8 +36,9 @@ struct charqueue {
struct charqueue *visor_charqueue_create(ulong nslots) struct charqueue *visor_charqueue_create(ulong nslots)
{ {
int alloc_size = sizeof(struct charqueue) + nslots + 1; int alloc_size = sizeof(struct charqueue) + nslots + 1;
struct charqueue *cq = kmalloc(alloc_size, GFP_KERNEL|__GFP_NORETRY); struct charqueue *cq;
cq = kmalloc(alloc_size, GFP_KERNEL|__GFP_NORETRY);
if (cq == NULL) { if (cq == NULL) {
ERRDRV("visor_charqueue_create allocation failed (alloc_size=%d)", ERRDRV("visor_charqueue_create allocation failed (alloc_size=%d)",
alloc_size); alloc_size);
......
...@@ -41,8 +41,9 @@ struct memregion * ...@@ -41,8 +41,9 @@ struct memregion *
visor_memregion_create(HOSTADDRESS physaddr, ulong nbytes) visor_memregion_create(HOSTADDRESS physaddr, ulong nbytes)
{ {
struct memregion *rc = NULL; struct memregion *rc = NULL;
struct memregion *memregion = kzalloc(sizeof(*memregion), struct memregion *memregion;
GFP_KERNEL | __GFP_NORETRY);
memregion = kzalloc(sizeof(*memregion), GFP_KERNEL | __GFP_NORETRY);
if (memregion == NULL) { if (memregion == NULL) {
ERRDRV("visor_memregion_create allocation failed"); ERRDRV("visor_memregion_create allocation failed");
return NULL; return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment