2019-05-23 08:28:53

by Jeremy Sowden

[permalink] [raw]
Subject: Re: [PATCH] staging: fieldbus: anybuss: Remove unnecessary variables

On 2019-05-23, at 13:51:18 +0530, Nishka Dasgupta wrote:
> On 23/05/19 12:52 PM, Greg KH wrote:
> > On Thu, May 23, 2019 at 12:05:01PM +0530, Nishka Dasgupta wrote:
> > > In the functions export_reset_0 and export_reset_1 in
> > > arcx-anybus.c, the only operation performed before return is
> > > passing the variable cd (which takes the value of a function call
> > > on one of the parameters) as argument to another function. Hence
> > > the variable cd can be removed. Issue found using Coccinelle.
> > >
> > > Signed-off-by: Nishka Dasgupta <[email protected]>
> > > ---
> > > drivers/staging/fieldbus/anybuss/arcx-anybus.c | 8 ++------
> > > 1 file changed, 2 insertions(+), 6 deletions(-)
> > >
> > > diff --git a/drivers/staging/fieldbus/anybuss/arcx-anybus.c b/drivers/staging/fieldbus/anybuss/arcx-anybus.c
> > > index 2ecffa42e561..e245f940a5c4 100644
> > > --- a/drivers/staging/fieldbus/anybuss/arcx-anybus.c
> > > +++ b/drivers/staging/fieldbus/anybuss/arcx-anybus.c
> > > @@ -87,16 +87,12 @@ static int anybuss_reset(struct controller_priv *cd,
> > > static void export_reset_0(struct device *dev, bool assert)
> > > {
> > > - struct controller_priv *cd = dev_get_drvdata(dev);
> > > -
> > > - anybuss_reset(cd, 0, assert);
> > > + anybuss_reset(dev_get_drvdata(dev), 0, assert);
> > > }
> >
> > While your patch is "correct", it's not the nicest thing. The way the
> > code looks today is to make it obvious we are passing a pointer to a
> > struct controller_priv() into anybuss_reset(). But with your change, it
> > looks like we are passing any random void pointer to it.
> >
> > So I'd prefer the original code please.
>
> Thank you, I'll drop this patch then.
>
> > Also, you forgot to cc: Sven on this patch, please always use the output
> > of scripts/get_maintainer.pl.
>
> Which arguments should I use? If I use --nokeywords, --nogit,
> --nogit-fallback and --norolestats then only your name and the two
> mailing lists show up. (Also, regarding the mailing lists: every mail
> sent to [email protected] is bouncing; should I not send to
> that list anymore?)

He is listed in the TODO:

$ cat drivers/staging/fieldbus/TODO
TODO:
-Get more people/drivers to use the Fieldbus userspace ABI. It requires
verification/sign-off by multiple users.

Contact: Sven Van Asbroeck <[email protected]>

J.


Attachments:
(No filename) (2.36 kB)
signature.asc (849.00 B)
Download all attachments

2019-05-23 09:12:32

by Dan Carpenter

[permalink] [raw]
Subject: Re: [PATCH] staging: fieldbus: anybuss: Remove unnecessary variables

On Thu, May 23, 2019 at 09:27:02AM +0100, Jeremy Sowden wrote:
> On 2019-05-23, at 13:51:18 +0530, Nishka Dasgupta wrote:
> > On 23/05/19 12:52 PM, Greg KH wrote:
> > > On Thu, May 23, 2019 at 12:05:01PM +0530, Nishka Dasgupta wrote:
> > > Also, you forgot to cc: Sven on this patch, please always use the output
> > > of scripts/get_maintainer.pl.
> >
> > Which arguments should I use? If I use --nokeywords, --nogit,
> > --nogit-fallback and --norolestats then only your name and the two
> > mailing lists show up. (Also, regarding the mailing lists: every mail
> > sent to [email protected] is bouncing; should I not send to
> > that list anymore?)
>
> He is listed in the TODO:
>
> $ cat drivers/staging/fieldbus/TODO
> TODO:
> -Get more people/drivers to use the Fieldbus userspace ABI. It requires
> verification/sign-off by multiple users.
>
> Contact: Sven Van Asbroeck <[email protected]>

Sven, you should add yourself to the MAINTAINERS file.

regards,
dan carpenter


2019-05-23 13:04:32

by Sven Van Asbroeck

[permalink] [raw]
Subject: Re: [PATCH] staging: fieldbus: anybuss: Remove unnecessary variables

On Thu, May 23, 2019 at 5:09 AM Dan Carpenter <[email protected]> wrote:
>
> Sven, you should add yourself to the MAINTAINERS file.

Greg, what do you think?

2019-05-23 18:07:46

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH] staging: fieldbus: anybuss: Remove unnecessary variables

On Thu, May 23, 2019 at 09:02:11AM -0400, Sven Van Asbroeck wrote:
> On Thu, May 23, 2019 at 5:09 AM Dan Carpenter <[email protected]> wrote:
> >
> > Sven, you should add yourself to the MAINTAINERS file.
>
> Greg, what do you think?

Yes!