From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Dmitry Safonov <dima@arista.com>
Cc: Joe Perches <joe@perches.com>,
linux-kernel@vger.kernel.org,
Dmitry Safonov <0x7f454c46@gmail.com>,
Iurii Zaikin <yzaikin@google.com>, Jiri Slaby <jslaby@suse.com>,
Randy Dunlap <rdunlap@infradead.org>,
Vasiliy Khoruzhick <vasilykh@arista.com>,
linux-serial@vger.kernel.org
Subject: Re: [PATCHv2-next 3/3] serial_core: Remove unused member in uart_port
Date: Tue, 14 Jan 2020 18:56:47 +0100 [thread overview]
Message-ID: <20200114175647.GA2055173@kroah.com> (raw)
In-Reply-To: <8f11e2fa-495d-fe25-f5e4-52c9580240d7@arista.com>
On Tue, Jan 14, 2020 at 05:47:33PM +0000, Dmitry Safonov wrote:
> On 1/14/20 5:36 PM, Joe Perches wrote:
> > On Tue, 2020-01-14 at 17:19 +0000, Dmitry Safonov wrote:
> >> It should remove the align-padding before @name.
> > []
> >> diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
> > []
> >> @@ -247,7 +247,6 @@ struct uart_port {
> >>
> >> unsigned char hub6; /* this should be in the 8250 driver */
> >> unsigned char suspended;
> >> - unsigned char unused;
> >
> > I suggest this not be applied as this is just to let
> > readers know that there is an unused 1 byte alignment
> > hole here that could be used for something else.
>
> Heh, 2/3 adds another `unsigned char`, so the neighbours look like:
>
> : unsigned long sysrq; /* sysrq timeout */
> : unsigned int sysrq_ch; /* char for sysrq */
> : unsigned char has_sysrq;
> : unsigned char sysrq_seq; /* index in sysrq_toggle_seq */
> :
> : unsigned char hub6; /* this should be in the 8250 driver */
> : unsigned char suspended;
> : unsigned char unused;
> : const char *name; /* port name */
>
> So the hole became 4 bytes on 64-bit.
>
> I can make it unused[4], but..
>
> Separated the patch per Greg's review and I think it makes sense to have
> it separately from 2/3 because last time I've touched it, it actually
> was in use by drivers (regardless the name).
Yes, it makes sense to remove it now. And then we can properly
reorginize the structure if people really care about the padding issues
(hint, I really doubt it). Someone can run pahole on the structure if
they care, but getting rid of "unused" is good as it has been abused in
the past.
thanks,
greg k-h
next prev parent reply other threads:[~2020-01-14 17:56 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-14 17:19 [PATCHv2-next 0/3] serial/sysrq: Add MAGIC_SYSRQ_SERIAL_SEQUENCE Dmitry Safonov
2020-01-14 17:19 ` [PATCHv2-next 1/3] sysctl/sysrq: Remove __sysrq_enabled copy Dmitry Safonov
2020-01-15 12:36 ` Greg Kroah-Hartman
2020-02-23 12:08 ` Dmitry Safonov
2020-02-23 12:10 ` Dmitry Safonov
2020-01-14 17:19 ` [PATCHv2-next 2/3] serial/sysrq: Add MAGIC_SYSRQ_SERIAL_SEQUENCE Dmitry Safonov
2020-01-14 17:30 ` Joe Perches
2020-01-14 17:36 ` Dmitry Safonov
2020-01-14 17:51 ` Randy Dunlap
2020-01-14 17:19 ` [PATCHv2-next 3/3] serial_core: Remove unused member in uart_port Dmitry Safonov
2020-01-14 17:36 ` Joe Perches
2020-01-14 17:47 ` Dmitry Safonov
2020-01-14 17:56 ` Greg Kroah-Hartman [this message]
2020-01-14 18:32 ` Joe Perches
2020-01-14 18:43 ` Dmitry Safonov
2020-01-15 12:40 ` Greg Kroah-Hartman
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=20200114175647.GA2055173@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=0x7f454c46@gmail.com \
--cc=dima@arista.com \
--cc=joe@perches.com \
--cc=jslaby@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=rdunlap@infradead.org \
--cc=vasilykh@arista.com \
--cc=yzaikin@google.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).