[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20121121090452.GE11248@mwanda>
Date: Wed, 21 Nov 2012 12:04:52 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Johan Meiring <johanmeiring@...il.com>
Cc: gregkh@...uxfoundation.org, a.beregalov@...il.com,
devendra.aaru@...il.com, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 10/10] staging: cxt1e1: sbecrc.c: fixes 80+ char line
length issue
On Tue, Nov 20, 2012 at 07:28:52PM +0200, Johan Meiring wrote:
> This commit sorts out a single case where a line was longer than
> 80 characters.
>
> Signed-off-by: Johan Meiring <johanmeiring@...il.com>
> ---
> drivers/staging/cxt1e1/sbecrc.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/staging/cxt1e1/sbecrc.c b/drivers/staging/cxt1e1/sbecrc.c
> index 87512a5..59dd7e2 100644
> --- a/drivers/staging/cxt1e1/sbecrc.c
> +++ b/drivers/staging/cxt1e1/sbecrc.c
> @@ -101,7 +101,8 @@ sbeCrc(u_int8_t *buffer, /* data buffer to crc */
> tbl = &CRCTable;
> genCrcTable(tbl);
> #else
> - tbl = (u_int32_t *) OS_kmalloc(CRC_TABLE_ENTRIES * sizeof(u_int32_t));
> + tbl = (u_int32_t *) OS_kmalloc(CRC_TABLE_ENTRIES
> + * sizeof(u_int32_t));
The way we would normally break this is:
tbl = (u_int32_t *)OS_kmalloc(CRC_TABLE_ENTRIES *
sizeof(u_int32_t));
* goes on the first line so that it shows this is a partial line.
The sizeof() lines up with the first parameter. You will have to
use spaces since it's not exactly on a tab stop.
But really it's better to just get rid of the call to OS_kmalloc().
tbl = kmalloc(CRC_TABLE_ENTRIES * sizeof(*tbl), GFP_KERNEL);
OS_kmalloc() adds a GFP_DMA flag and a memset() but it's not needed
here.
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists