* [PATCH] serial: samsung: Change MAX_CLK_NAME_LENGTH to 17 [not found] <CGME20240605040759epcas1p36d200e262d9a98f9879cf7fd0ee94bba@epcas1p3.samsung.com> @ 2024-06-05 4:07 ` Kwanghoon Son 2024-06-05 6:42 ` Krzysztof Kozlowski 2024-06-05 9:03 ` Alim Akhtar 0 siblings, 2 replies; 5+ messages in thread From: Kwanghoon Son @ 2024-06-05 4:07 UTC (permalink / raw) To: krzk, alim.akhtar, gregkh, jirislaby, linux-samsung-soc, linux-serial Cc: Kwanghoon Son clkname "clk_uart_baud" already 13 byte, so compiler warns drivers/tty/serial/samsung_tty.c:1392:17: note: ‘sprintf’ output between 15 and 17 bytes into a destination of size 15 Signed-off-by: Kwanghoon Son <k.son@samsung.com> --- drivers/tty/serial/samsung_tty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index dc35eb77d2ef..cad838ac8aa2 100644 --- a/drivers/tty/serial/samsung_tty.c +++ b/drivers/tty/serial/samsung_tty.c @@ -1339,7 +1339,7 @@ static void s3c24xx_serial_pm(struct uart_port *port, unsigned int level, * */ -#define MAX_CLK_NAME_LENGTH 15 +#define MAX_CLK_NAME_LENGTH 17 static inline u8 s3c24xx_serial_getsource(struct uart_port *port) { -- 2.39.2 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] serial: samsung: Change MAX_CLK_NAME_LENGTH to 17 2024-06-05 4:07 ` [PATCH] serial: samsung: Change MAX_CLK_NAME_LENGTH to 17 Kwanghoon Son @ 2024-06-05 6:42 ` Krzysztof Kozlowski 2024-06-05 7:52 ` Kwanghoon Son 2024-06-05 9:03 ` Alim Akhtar 1 sibling, 1 reply; 5+ messages in thread From: Krzysztof Kozlowski @ 2024-06-05 6:42 UTC (permalink / raw) To: Kwanghoon Son, alim.akhtar, gregkh, jirislaby, linux-samsung-soc, linux-serial On 05/06/2024 06:07, Kwanghoon Son wrote: > clkname "clk_uart_baud" already 13 byte, so compiler warns > drivers/tty/serial/samsung_tty.c:1392:17: note: ‘sprintf’ output between 15 and 17 bytes into a destination of size 15 But that's not true. We do not write there more than 15, including terminating NULL byte, right? Or you just sent whatever is there to silence warning? Best regards, Krzysztof ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] serial: samsung: Change MAX_CLK_NAME_LENGTH to 17 2024-06-05 6:42 ` Krzysztof Kozlowski @ 2024-06-05 7:52 ` Kwanghoon Son 2024-06-05 7:54 ` Krzysztof Kozlowski 0 siblings, 1 reply; 5+ messages in thread From: Kwanghoon Son @ 2024-06-05 7:52 UTC (permalink / raw) To: Krzysztof Kozlowski, alim.akhtar, gregkh, jirislaby, linux-samsung-soc, linux-serial On 6/5/24 3:42 PM, Krzysztof Kozlowski wrote: > But that's not true. We do not write there more than 15, including > terminating NULL byte, right? For now, right. only clk_uart_baud[0-3] acceptable. I thought this meaningful in code side, clk_num u8 can over in future. Also don't want to see warnings. But if It's false warning(device tree constrain), please ignore patch. Thanks for review. Kwang. > Or you just sent whatever is there to silence warning? > > Best regards, > Krzysztof > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] serial: samsung: Change MAX_CLK_NAME_LENGTH to 17 2024-06-05 7:52 ` Kwanghoon Son @ 2024-06-05 7:54 ` Krzysztof Kozlowski 0 siblings, 0 replies; 5+ messages in thread From: Krzysztof Kozlowski @ 2024-06-05 7:54 UTC (permalink / raw) To: Kwanghoon Son, alim.akhtar, gregkh, jirislaby, linux-samsung-soc, linux-serial On 05/06/2024 09:52, Kwanghoon Son wrote: > On 6/5/24 3:42 PM, Krzysztof Kozlowski wrote: >> But that's not true. We do not write there more than 15, including >> terminating NULL byte, right? > > For now, right. only clk_uart_baud[0-3] acceptable. > > I thought this meaningful in code side, clk_num u8 can over in future. But it can't now. > Also don't want to see warnings. > > But if It's false warning(device tree constrain), please ignore patch. To me the warning is a false positive. Best regards, Krzysztof ^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] serial: samsung: Change MAX_CLK_NAME_LENGTH to 17 2024-06-05 4:07 ` [PATCH] serial: samsung: Change MAX_CLK_NAME_LENGTH to 17 Kwanghoon Son 2024-06-05 6:42 ` Krzysztof Kozlowski @ 2024-06-05 9:03 ` Alim Akhtar 1 sibling, 0 replies; 5+ messages in thread From: Alim Akhtar @ 2024-06-05 9:03 UTC (permalink / raw) To: 'Kwanghoon Son', krzk, gregkh, jirislaby, linux-samsung-soc, linux-serial > -----Original Message----- > From: Kwanghoon Son <k.son@samsung.com> > Sent: Wednesday, June 5, 2024 9:37 AM > To: krzk@kernel.org; alim.akhtar@samsung.com; gregkh@linuxfoundation.org; > jirislaby@kernel.org; linux-samsung-soc@vger.kernel.org; linux- > serial@vger.kernel.org > Cc: Kwanghoon Son <k.son@samsung.com> > Subject: [PATCH] serial: samsung: Change MAX_CLK_NAME_LENGTH to 17 > > clkname "clk_uart_baud" already 13 byte, so compiler warns > drivers/tty/serial/samsung_tty.c:1392:17: note: ‘sprintf’ output between 15 and > 17 bytes into a destination of size 15 There was a similar discussion around buffer size of clkname last year https://www.spinics.net/lists/arm-kernel/msg1039769.html and it was concluded that it’s a false warning AFAIR. > > Signed-off-by: Kwanghoon Son <k.son@samsung.com> > --- > drivers/tty/serial/samsung_tty.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c > index dc35eb77d2ef..cad838ac8aa2 100644 > --- a/drivers/tty/serial/samsung_tty.c > +++ b/drivers/tty/serial/samsung_tty.c > @@ -1339,7 +1339,7 @@ static void s3c24xx_serial_pm(struct uart_port *port, > unsigned int level, > * > */ > > -#define MAX_CLK_NAME_LENGTH 15 > +#define MAX_CLK_NAME_LENGTH 17 > > static inline u8 s3c24xx_serial_getsource(struct uart_port *port) { > -- > 2.39.2 ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-06-05 9:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CGME20240605040759epcas1p36d200e262d9a98f9879cf7fd0ee94bba@epcas1p3.samsung.com>
2024-06-05 4:07 ` [PATCH] serial: samsung: Change MAX_CLK_NAME_LENGTH to 17 Kwanghoon Son
2024-06-05 6:42 ` Krzysztof Kozlowski
2024-06-05 7:52 ` Kwanghoon Son
2024-06-05 7:54 ` Krzysztof Kozlowski
2024-06-05 9:03 ` Alim Akhtar
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.