Re: [PATCH 06/10] staging: cxt1e1: musycc.c: fixes placement of parentheses

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

 



On Tue, Nov 20, 2012 at 07:28:48PM +0200, Johan Meiring wrote:
> This commit fixes several incorrect placements of parantheses, as
> identified by the checkpatch.pl tool.
> 

This patch is fine, and all.
Acked-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

But you could go beyond fixing just checkpatch.pl warnings.

> Signed-off-by: Johan Meiring <johanmeiring@xxxxxxxxx>
> ---
>  drivers/staging/cxt1e1/musycc.c |  490 +++++++++++++++++++--------------------
>  1 file changed, 245 insertions(+), 245 deletions(-)
> 
> diff --git a/drivers/staging/cxt1e1/musycc.c b/drivers/staging/cxt1e1/musycc.c
> index 42e1ca4..b2cc68a 100644
> --- a/drivers/staging/cxt1e1/musycc.c
> +++ b/drivers/staging/cxt1e1/musycc.c
> @@ -60,21 +60,21 @@ extern ci_t *CI;                /* dummy pointr to board ZEROE's data - DEBUG
>  
>  /*******************************************************************/

This line could be deleted.

>  /* forward references */

Obvious comment is obvious.

> -void        c4_fifo_free (mpi_t *, int);
> -void        c4_wk_chan_restart (mch_t *);
> -void        musycc_bh_tx_eom (mpi_t *, int);
> -int         musycc_chan_up (ci_t *, int);
> -status_t __init musycc_init (ci_t *);
> -STATIC void __init musycc_init_port (mpi_t *);
> -void        musycc_intr_bh_tasklet (ci_t *);
> -void        musycc_serv_req (mpi_t *, u_int32_t);
> -void        musycc_update_timeslots (mpi_t *);
> +void        c4_fifo_free(mpi_t *, int);
> +void        c4_wk_chan_restart(mch_t *);
> +void        musycc_bh_tx_eom(mpi_t *, int);
> +int         musycc_chan_up(ci_t *, int);
> +status_t __init musycc_init(ci_t *);
> +STATIC void __init musycc_init_port(mpi_t *);
> +void        musycc_intr_bh_tasklet(ci_t *);
> +void        musycc_serv_req(mpi_t *, u_int32_t);
> +void        musycc_update_timeslots(mpi_t *);


These would look better done properly.

void musycc_serv_req(mpi_t *pi, u_int32_t req);

Keep the parameter names because they serve as documentation.  And
actually, they should be moved to a header file which is included
instead of declared in the .c files where they are used.

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