Re: [PATCH 8/8] staging: wlags49_h2: ap_h2.c: fixes inconsistentspacing around *

From: Dan Carpenter
Date: Wed Nov 21 2012 - 03:34:28 EST


On Tue, Nov 20, 2012 at 04:45:00PM +0200, Johan Meiring wrote:
> This commit fixes an inconsistent spacing issue around *
>

The others are good, but this one is not right.

> Signed-off-by: Johan Meiring <johanmeiring@xxxxxxxxx>
> ---
> drivers/staging/wlags49_h2/ap_h2.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/wlags49_h2/ap_h2.c b/drivers/staging/wlags49_h2/ap_h2.c
> index e524153..c2d43ec 100644
> --- a/drivers/staging/wlags49_h2/ap_h2.c
> +++ b/drivers/staging/wlags49_h2/ap_h2.c
> @@ -3256,7 +3256,7 @@ static const CFG_PROG_STRCT fw_image_code[] = {
> 0x0146, /* sizeof(fw_image_1_data), */
> 0x00000060, /* Target address in NIC Memory */
> 0x0000, /* CRC: yes/no TYPE: primary/station/tertiary */
> - (hcf_8 FAR *) fw_image_1_data
> + (hcf_8 FAR*) fw_image_1_data

We don't use far pointers in linux. When you're casting something
there is no space between the cat operation and the variable. The
reason is that casting is a high precedence operation.

More readable: (char *)p + 1;
Less readable: (char *) p + 1;

In the first line it's obvious that we cast first and then add 1.

So this should be:
(hcf_8 *)fw_image_1_data,

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/