From: Oliver Neukum <oneukum@suse.com>
To: Greg KH <gregkh@linuxfoundation.org>,
Sabyasachi Gupta <sabyasachi.linux@gmail.com>
Cc: brajeswar.linux@gmail.com, jrdr.linux@gmail.com,
usb-storage@lists.one-eyed-alien.net, stern@rowland.harvard.edu,
linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Subject: drivers/usb/storage/sddr55.c: Remove duplicate header
Date: Fri, 11 Jan 2019 11:59:52 +0100 [thread overview]
Message-ID: <1547204392.4054.7.camel@suse.com> (raw)
On Fr, 2019-01-11 at 10:10 +0100, Greg KH wrote:
> On Thu, Jan 10, 2019 at 01:10:25PM +0530, Sabyasachi Gupta wrote:
> > Remove unusual_sddr55.h which is included more than once
> >
> > Signed-off-by: Sabyasachi Gupta <sabyasachi.linux@gmail.com>
> > ---
> > drivers/usb/storage/sddr55.c | 1 -
> > 1 file changed, 1 deletion(-)
> >
> > diff --git a/drivers/usb/storage/sddr55.c b/drivers/usb/storage/sddr55.c
> > index b8527c5..96bf7ee 100644
> > --- a/drivers/usb/storage/sddr55.c
> > +++ b/drivers/usb/storage/sddr55.c
> > @@ -62,7 +62,6 @@ MODULE_DEVICE_TABLE(usb, sddr55_usb_ids);
> > }
> >
> > static struct us_unusual_dev sddr55_unusual_dev_list[] = {
> > -# include "unusual_sddr55.h"
> > { } /* Terminating entry */
> > };
>
> As Oliver said on the other patch, this breaks the code. Please do not
> blindly make changes without understanding what the code does.
Maybe this should be explained. The file that is included does have
a name ending in .h. But it is not simply declarations, for which
newer trendy languages would use a a statement like ¨import".
"unusual_sddr55.h" is a list of devices. This list is used in
multiple places. And it needs to be identical in all those places.
Hence it is included. These are true includes. There is nothing wrong
with that code.
Our complaint is not that your fix is wrong, but there is nothing wrong
with the code as is. Including this list is the good thing to do.
Your wish to clean up the kernel is appreciated. But please find a
place that actually needs to be cleaned up.
Regards
Oliver
WARNING: multiple messages have this Message-ID (diff)
From: Oliver Neukum <oneukum@suse.com>
To: Greg KH <gregkh@linuxfoundation.org>,
Sabyasachi Gupta <sabyasachi.linux@gmail.com>
Cc: brajeswar.linux@gmail.com, jrdr.linux@gmail.com,
usb-storage@lists.one-eyed-alien.net, stern@rowland.harvard.edu,
linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: [PATCH] drivers/usb/storage/sddr55.c: Remove duplicate header
Date: Fri, 11 Jan 2019 11:59:52 +0100 [thread overview]
Message-ID: <1547204392.4054.7.camel@suse.com> (raw)
In-Reply-To: <20190111091037.GB15610@kroah.com>
On Fr, 2019-01-11 at 10:10 +0100, Greg KH wrote:
> On Thu, Jan 10, 2019 at 01:10:25PM +0530, Sabyasachi Gupta wrote:
> > Remove unusual_sddr55.h which is included more than once
> >
> > Signed-off-by: Sabyasachi Gupta <sabyasachi.linux@gmail.com>
> > ---
> > drivers/usb/storage/sddr55.c | 1 -
> > 1 file changed, 1 deletion(-)
> >
> > diff --git a/drivers/usb/storage/sddr55.c b/drivers/usb/storage/sddr55.c
> > index b8527c5..96bf7ee 100644
> > --- a/drivers/usb/storage/sddr55.c
> > +++ b/drivers/usb/storage/sddr55.c
> > @@ -62,7 +62,6 @@ MODULE_DEVICE_TABLE(usb, sddr55_usb_ids);
> > }
> >
> > static struct us_unusual_dev sddr55_unusual_dev_list[] = {
> > -# include "unusual_sddr55.h"
> > { } /* Terminating entry */
> > };
>
> As Oliver said on the other patch, this breaks the code. Please do not
> blindly make changes without understanding what the code does.
Maybe this should be explained. The file that is included does have
a name ending in .h. But it is not simply declarations, for which
newer trendy languages would use a a statement like ¨import".
"unusual_sddr55.h" is a list of devices. This list is used in
multiple places. And it needs to be identical in all those places.
Hence it is included. These are true includes. There is nothing wrong
with that code.
Our complaint is not that your fix is wrong, but there is nothing wrong
with the code as is. Including this list is the good thing to do.
Your wish to clean up the kernel is appreciated. But please find a
place that actually needs to be cleaned up.
Regards
Oliver
next reply other threads:[~2019-01-11 10:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-11 10:59 Oliver Neukum [this message]
2019-01-11 10:59 ` [PATCH] drivers/usb/storage/sddr55.c: Remove duplicate header Oliver Neukum
-- strict thread matches above, loose matches on Subject: below --
2019-01-11 9:10 Greg Kroah-Hartman
2019-01-11 9:10 ` [PATCH] " Greg KH
2019-01-10 7:40 Sabyasachi Gupta
2019-01-10 7:40 ` [PATCH] " Sabyasachi Gupta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1547204392.4054.7.camel@suse.com \
--to=oneukum@suse.com \
--cc=brajeswar.linux@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jrdr.linux@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=sabyasachi.linux@gmail.com \
--cc=stern@rowland.harvard.edu \
--cc=usb-storage@lists.one-eyed-alien.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.