All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: comedi: Fix line length exceeding 80 characters
@ 2014-02-24 16:49 Monam Agarwal
  2014-02-25  9:46 ` Ian Abbott
  0 siblings, 1 reply; 6+ messages in thread
From: Monam Agarwal @ 2014-02-24 16:49 UTC (permalink / raw)
  To: abbotti, hsweeten, gregkh, devel, linux-kernel

Signed-off-by: Monam Agarwal <monamagarwal123@gmail.com>
---
 drivers/staging/comedi/comedi_fops.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
index ac1edd9..7da8566 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -1481,7 +1481,8 @@ static int do_cmd_ioctl(struct comedi_device *dev,
 	async->cmd.data = NULL;
 	/* load channel/gain list */
 	async->cmd.chanlist = memdup_user(user_chanlist,
-					  async->cmd.chanlist_len * sizeof(int));
+					  async->cmd.chanlist_len
+					  * sizeof(int));
 	if (IS_ERR(async->cmd.chanlist)) {
 		ret = PTR_ERR(async->cmd.chanlist);
 		async->cmd.chanlist = NULL;
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] Staging: comedi: Fix line length exceeding 80 characters
  2014-02-24 16:49 [PATCH] Staging: comedi: Fix line length exceeding 80 characters Monam Agarwal
@ 2014-02-25  9:46 ` Ian Abbott
  2014-02-25  9:59   ` Joe Perches
  2014-02-25 14:36   ` gregkh
  0 siblings, 2 replies; 6+ messages in thread
From: Ian Abbott @ 2014-02-25  9:46 UTC (permalink / raw)
  To: Monam Agarwal, Ian Abbott, hsweeten, gregkh, devel, linux-kernel

On 2014-02-24 16:49, Monam Agarwal wrote:
> Signed-off-by: Monam Agarwal <monamagarwal123@gmail.com>
> ---
>   drivers/staging/comedi/comedi_fops.c |    3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
> index ac1edd9..7da8566 100644
> --- a/drivers/staging/comedi/comedi_fops.c
> +++ b/drivers/staging/comedi/comedi_fops.c
> @@ -1481,7 +1481,8 @@ static int do_cmd_ioctl(struct comedi_device *dev,
>   	async->cmd.data = NULL;
>   	/* load channel/gain list */
>   	async->cmd.chanlist = memdup_user(user_chanlist,
> -					  async->cmd.chanlist_len * sizeof(int));
> +					  async->cmd.chanlist_len
> +					  * sizeof(int));

The `*` operator should go at the end of the line according to the 
CodingStyle.

>   	if (IS_ERR(async->cmd.chanlist)) {
>   		ret = PTR_ERR(async->cmd.chanlist);
>   		async->cmd.chanlist = NULL;
>

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@mev.co.uk>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Staging: comedi: Fix line length exceeding 80 characters
  2014-02-25  9:46 ` Ian Abbott
@ 2014-02-25  9:59   ` Joe Perches
  2014-02-25 11:05     ` Dan Carpenter
  2014-02-25 14:36   ` gregkh
  1 sibling, 1 reply; 6+ messages in thread
From: Joe Perches @ 2014-02-25  9:59 UTC (permalink / raw)
  To: Ian Abbott
  Cc: Monam Agarwal, Ian Abbott, hsweeten, gregkh, devel, linux-kernel

On Tue, 2014-02-25 at 09:46 +0000, Ian Abbott wrote:
> On 2014-02-24 16:49, Monam Agarwal wrote:
[]
> > diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
[]
> > @@ -1481,7 +1481,8 @@ static int do_cmd_ioctl(struct comedi_device *dev,
> >   	async->cmd.data = NULL;
> >   	/* load channel/gain list */
> >   	async->cmd.chanlist = memdup_user(user_chanlist,
> > -					  async->cmd.chanlist_len * sizeof(int));
> > +					  async->cmd.chanlist_len
> > +					  * sizeof(int));
> 
> The `*` operator should go at the end of the line according to the 
> CodingStyle.

I don't believe there's a CodingStyle guide for this.

Another way to do this is to move the memdup_user to
a separate line like:

	async->cmd_chanlist =
		memdup_user(user_chanlist,
			    async->cmd.chanlist_len * sizeof(int));

but I'm not bothered by the existing > 80 column use.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Staging: comedi: Fix line length exceeding 80 characters
  2014-02-25  9:59   ` Joe Perches
@ 2014-02-25 11:05     ` Dan Carpenter
  2014-02-25 11:48       ` Joe Perches
  0 siblings, 1 reply; 6+ messages in thread
From: Dan Carpenter @ 2014-02-25 11:05 UTC (permalink / raw)
  To: Joe Perches
  Cc: Ian Abbott, devel, Ian Abbott, gregkh, linux-kernel, Monam Agarwal

On Tue, Feb 25, 2014 at 01:59:25AM -0800, Joe Perches wrote:
> On Tue, 2014-02-25 at 09:46 +0000, Ian Abbott wrote:
> > On 2014-02-24 16:49, Monam Agarwal wrote:
> []
> > > diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
> []
> > > @@ -1481,7 +1481,8 @@ static int do_cmd_ioctl(struct comedi_device *dev,
> > >   	async->cmd.data = NULL;
> > >   	/* load channel/gain list */
> > >   	async->cmd.chanlist = memdup_user(user_chanlist,
> > > -					  async->cmd.chanlist_len * sizeof(int));
> > > +					  async->cmd.chanlist_len
> > > +					  * sizeof(int));
> > 
> > The `*` operator should go at the end of the line according to the 
> > CodingStyle.
> 
> I don't believe there's a CodingStyle guide for this.
> 

Meanwhile you have felt totally justified in correcting me on this in
the past.  :P

Anyway, it should be that the operator goes on the first line like Ian
says...

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Staging: comedi: Fix line length exceeding 80 characters
  2014-02-25 11:05     ` Dan Carpenter
@ 2014-02-25 11:48       ` Joe Perches
  0 siblings, 0 replies; 6+ messages in thread
From: Joe Perches @ 2014-02-25 11:48 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Ian Abbott, devel, Ian Abbott, gregkh, linux-kernel, Monam Agarwal

On Tue, 2014-02-25 at 14:05 +0300, Dan Carpenter wrote:
> On Tue, Feb 25, 2014 at 01:59:25AM -0800, Joe Perches wrote:
> > On Tue, 2014-02-25 at 09:46 +0000, Ian Abbott wrote:
> > > On 2014-02-24 16:49, Monam Agarwal wrote:
> > []
> > > > diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
> > []
> > > > @@ -1481,7 +1481,8 @@ static int do_cmd_ioctl(struct comedi_device *dev,
> > > >   	async->cmd.data = NULL;
> > > >   	/* load channel/gain list */
> > > >   	async->cmd.chanlist = memdup_user(user_chanlist,
> > > > -					  async->cmd.chanlist_len * sizeof(int));
> > > > +					  async->cmd.chanlist_len
> > > > +					  * sizeof(int));
> > > The `*` operator should go at the end of the line according to the 
> > > CodingStyle.
> > I don't believe there's a CodingStyle guide for this.
> Meanwhile you have felt totally justified in correcting me on this in
> the past.  :P

Doubtful.  You're probably thinking of something else.

Besides, we generally agree on style.  Anything I may
have written was more more suggestion than correction.

> Anyway, it should be that the operator goes on the first line like Ian
> says...

Feel free to use whatever style you want.

Feel free to update CodingStyle too.

cheers, Joe


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Staging: comedi: Fix line length exceeding 80 characters
  2014-02-25  9:46 ` Ian Abbott
  2014-02-25  9:59   ` Joe Perches
@ 2014-02-25 14:36   ` gregkh
  1 sibling, 0 replies; 6+ messages in thread
From: gregkh @ 2014-02-25 14:36 UTC (permalink / raw)
  To: Ian Abbott; +Cc: Monam Agarwal, Ian Abbott, hsweeten, devel, linux-kernel

On Tue, Feb 25, 2014 at 09:46:19AM +0000, Ian Abbott wrote:
> On 2014-02-24 16:49, Monam Agarwal wrote:
> > Signed-off-by: Monam Agarwal <monamagarwal123@gmail.com>
> > ---
> >   drivers/staging/comedi/comedi_fops.c |    3 ++-
> >   1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
> > index ac1edd9..7da8566 100644
> > --- a/drivers/staging/comedi/comedi_fops.c
> > +++ b/drivers/staging/comedi/comedi_fops.c
> > @@ -1481,7 +1481,8 @@ static int do_cmd_ioctl(struct comedi_device *dev,
> >   	async->cmd.data = NULL;
> >   	/* load channel/gain list */
> >   	async->cmd.chanlist = memdup_user(user_chanlist,
> > -					  async->cmd.chanlist_len * sizeof(int));
> > +					  async->cmd.chanlist_len
> > +					  * sizeof(int));
> 
> The `*` operator should go at the end of the line according to the 
> CodingStyle.

Which is why I modified it by hand before applying it :)

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-02-25 14:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-24 16:49 [PATCH] Staging: comedi: Fix line length exceeding 80 characters Monam Agarwal
2014-02-25  9:46 ` Ian Abbott
2014-02-25  9:59   ` Joe Perches
2014-02-25 11:05     ` Dan Carpenter
2014-02-25 11:48       ` Joe Perches
2014-02-25 14:36   ` gregkh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.