Re: [PATCHv2-next 3/3] serial_core: Remove unused member in uart_port

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

 



On 1/14/20 6:32 PM, Joe Perches wrote:
> On Tue, 2020-01-14 at 18:56 +0100, Greg Kroah-Hartman wrote:
>> 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.
> 
> Ah, perhaps the commit message could state that
> there is no longer an alignment hole instead.

Fair enough, slowly improving in my commit message skills :-)

Thanks,
          Dmitry



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux