lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b8e3d88c-2340-2247-2e1a-37c089d9065a@suse.cz>
Date:   Thu, 24 Feb 2022 11:42:20 +0100
From:   Jiri Slaby <jslaby@...e.cz>
To:     Greg KH <gregkh@...uxfoundation.org>
Cc:     linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/5] tty: serial: define UART_LCR_WLEN() macro

On 24. 02. 22, 11:10, Greg KH wrote:
> On Thu, Feb 24, 2022 at 10:55:54AM +0100, Jiri Slaby wrote:
>> Define a generic UART_LCR_WLEN() macro with a size argument. It can be
>> used to encode byte size into an LCR value. Therefore we can use it to
>> simplify the drivers using tty_get_char_size() in the next patches.
>>
>> Signed-off-by: Jiri Slaby <jslaby@...e.cz>
>> ---
>>   include/uapi/linux/serial_reg.h | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/include/uapi/linux/serial_reg.h b/include/uapi/linux/serial_reg.h
>> index f51bc8f36813..c9d5ff6dd4c6 100644
>> --- a/include/uapi/linux/serial_reg.h
>> +++ b/include/uapi/linux/serial_reg.h
>> @@ -111,6 +111,7 @@
>>   #define UART_LCR_WLEN6		0x01 /* Wordlength: 6 bits */
>>   #define UART_LCR_WLEN7		0x02 /* Wordlength: 7 bits */
>>   #define UART_LCR_WLEN8		0x03 /* Wordlength: 8 bits */
>> +#define UART_LCR_WLEN(x)	((x) - 5)
> 
> I'm all for this, but why does it need to be in a uapi .h file?

I'd love to put it somewhere else. But I didn't find an appropriate 
place. Should I put it simply to
include/linux/serial_core.h
or
include/linux/serial.h
? Or create a new:
include/linux/serial_reg.h
to contain only this def?

thanks,
-- 
js
suse labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ