1. replace spaces with tabs 2. fix line over 80 characters 3. remove braces around single statement blocks (if, else) Signed-off-by: Devendra Naga <develkernel412222@xxxxxxxxx> --- drivers/staging/csr/csr_wifi_hip_dump.c | 84 ++++++++++++++---------------- 1 files changed, 39 insertions(+), 45 deletions(-) diff --git a/drivers/staging/csr/csr_wifi_hip_dump.c b/drivers/staging/csr/csr_wifi_hip_dump.c index b5b8f0b..ea5f14d 100644 --- a/drivers/staging/csr/csr_wifi_hip_dump.c +++ b/drivers/staging/csr/csr_wifi_hip_dump.c @@ -661,51 +661,45 @@ done: static coredump_buffer* new_coredump_node(void *ospriv, coredump_buffer *prevnode) { - coredump_buffer *newnode = NULL; - u16 *newzone = NULL; - s32 i; - u32 zone_size; - - /* Allocate node header */ - newnode = kzalloc(sizeof(coredump_buffer), GFP_KERNEL); - if (newnode == NULL) - { - return NULL; - } - - /* Allocate chip memory zone capture buffers */ - for (i = 0; i < HIP_CDUMP_NUM_ZONES; i++) - { - zone_size = sizeof(u16) * zonedef_table[i].length; - newzone = kzalloc(zone_size, GFP_KERNEL); - newnode->zone[i] = newzone; - if (newzone == NULL) - { - unifi_error(ospriv, "Out of memory on coredump zone %d (%d words)\n", - i, zonedef_table[i].length); - break; - } - } + coredump_buffer *newnode = NULL; + u16 *newzone = NULL; + s32 i; + u32 zone_size; + + /* Allocate node header */ + newnode = kzalloc(sizeof(coredump_buffer), GFP_KERNEL); + if (newnode == NULL) + return NULL; + + /* Allocate chip memory zone capture buffers */ + for (i = 0; i < HIP_CDUMP_NUM_ZONES; i++) { + zone_size = sizeof(u16) * zonedef_table[i].length; + newzone = kzalloc(zone_size, GFP_KERNEL); + newnode->zone[i] = newzone; + if (newzone == NULL) { + unifi_error(ospriv, + "Out of memory on coredump zone" + " %d (%d words)\n", + i, zonedef_table[i].length); + break; + } + } - /* Clean up if any zone alloc failed */ - if (newzone == NULL) - { - for (i = 0; newnode->zone[i] != NULL; i++) - { - kfree(newnode->zone[i]); - newnode->zone[i] = NULL; - } - } + /* Clean up if any zone alloc failed */ + if (newzone == NULL) { + for (i = 0; newnode->zone[i] != NULL; i++) { + kfree(newnode->zone[i]); + newnode->zone[i] = NULL; + } + } - /* Link to previous node */ - newnode->prev = prevnode; - if (prevnode) - { - prevnode->next = newnode; - } - newnode->next = NULL; + /* Link to previous node */ + newnode->prev = prevnode; + if (prevnode) + prevnode->next = newnode; + newnode->next = NULL; - return newnode; + return newnode; } -- 1.7.4.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel