Re: [PATCH 6/6] Staging: ozwpan: fixing coding style issues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 28, 2012 at 04:45:30PM +0100, Adnan Ali wrote:
> This commit fixes coding style issue including string split across
> multiple lines and checking resource validity before calling kfree()
> to release resource.
> 
> Signed-off-by: Adnan Ali <adnan.ali@xxxxxxxxxxxxxxx>
> ---
>  drivers/staging/ozwpan/ozeltbuf.c |    4 ++--
>  drivers/staging/ozwpan/ozhcd.c    |    3 +--
>  drivers/staging/ozwpan/ozpd.c     |    6 ++----
>  drivers/staging/ozwpan/ozproto.c  |    3 +--
>  4 files changed, 6 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/staging/ozwpan/ozeltbuf.c b/drivers/staging/ozwpan/ozeltbuf.c
> index 988f522..941a5f0 100644
> --- a/drivers/staging/ozwpan/ozeltbuf.c
> +++ b/drivers/staging/ozwpan/ozeltbuf.c
> @@ -104,8 +104,8 @@ void oz_elt_info_free(struct oz_elt_buf *buf, struct oz_elt_info *ei)
>  			buf->elt_pool = &ei->link;
>  			ei->magic = OZ_ELT_INFO_MAGIC_FREE;
>  		} else {
> -			oz_trace("oz_elt_info_free: bad magic ei: %p"
> -				" magic: 0x%x\n",
> +			oz_trace(
> +				"oz_elt_info_free: bad magic ei: %p magic: 0x%x\n",


Nah.  The original was better.  Or you could do:
			oz_trace("oz_elt_info_free: bad magic ei: %p magic: 0x%x\n",
				 ei, ei->magic);

I don't know if checkpatch.pl will complain about it.  To be honest,
we don't care.  Checkpatch.pl is only useful if it helps make the
code nicer; if it gives bad advice then ignore the warnings.

This should be in a separate patch from the others.  Do one thing
per patch.

regards,
dan carpenter


_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux