[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220302175242.ejiaf36vszr4xvou@pengutronix.de>
Date: Wed, 2 Mar 2022 18:52:42 +0100
From: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
To: Jiri Slaby <jslaby@...e.cz>
Cc: gregkh@...uxfoundation.org,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Mateusz Holenko <mholenko@...micro.com>,
Neil Armstrong <narmstrong@...libre.com>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Liviu Dudau <liviu.dudau@....com>,
Baruch Siach <baruch@...s.co.il>, linux-kernel@...r.kernel.org,
Paul Cercueil <paul@...pouillou.net>,
Paul Mackerras <paulus@...ba.org>,
Michael Ellerman <mpe@...erman.id.au>,
Michal Simek <michal.simek@...inx.com>,
Karol Gugala <kgugala@...micro.com>,
Jerome Brunet <jbrunet@...libre.com>,
Peter Korsgaard <peter@...sgaard.com>,
Florian Fainelli <f.fainelli@...il.com>,
Alexander Shiyan <shc_work@...l.ru>,
Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Fabio Estevam <festevam@...il.com>,
Russell King <linux@...linux.org.uk>,
Ludovic Desroches <ludovic.desroches@...rochip.com>,
Andy Gross <agross@...nel.org>,
bcm-kernel-feedback-list@...adcom.com,
NXP Linux Team <linux-imx@....com>,
linux-serial@...r.kernel.org, Vineet Gupta <vgupta@...nel.org>,
Orson Zhai <orsonzhai@...il.com>,
Tobias Klauser <tklauser@...tanz.ch>,
Patrice Chotard <patrice.chotard@...s.st.com>,
Albert Ou <aou@...s.berkeley.edu>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Manivannan Sadhasivam <mani@...nel.org>,
Martin Blumenstingl <martin.blumenstingl@...glemail.com>,
Sascha Hauer <s.hauer@...gutronix.de>,
Takao Orito <orito.takao@...ionext.com>,
Vladimir Zapolskiy <vz@...ia.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Paul Walmsley <paul.walmsley@...ive.com>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
Sudeep Holla <sudeep.holla@....com>,
Richard Genoud <richard.genoud@...il.com>,
Chunyan Zhang <zhang.lyra@...il.com>,
Nicolas Ferre <nicolas.ferre@...rochip.com>,
"David S. Miller" <davem@...emloft.net>,
Taichi Sugaya <sugaya.taichi@...ionext.com>,
Palmer Dabbelt <palmer@...belt.com>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Kevin Hilman <khilman@...libre.com>,
Baolin Wang <baolin.wang7@...il.com>,
Shawn Guo <shawnguo@...nel.org>,
Andreas Färber <afaerber@...e.de>,
"Maciej W. Rozycki" <macro@...am.me.uk>
Subject: Re: [PATCH v3] serial: make uart_console_write->putchar()'s
character an unsigned char
On Wed, Mar 02, 2022 at 08:27:32AM +0100, Jiri Slaby wrote:
> Currently, uart_console_write->putchar's second parameter (the
> character) is of type int. It makes little sense, provided uart_console_write()
> accepts the input string as "const char *s" and passes its content -- the
> characters -- to putchar(). So switch the character's type to unsigned
> char.
>
> We don't use char as that is signed on some platforms. That would cause
> troubles for drivers which (implicitly) cast the char to u16 when
> writing to the device. Sign extension would happen in that case and the
> value written would be completely different to the provided char. DZ is
> an example of such a driver -- on MIPS, it uses u16 for dz_out in
> dz_console_putchar().
I always thought this was bigger than 8bit for hardware that supports
wider characters. But if that's the case that's completely unsupported,
there isn't even CS9.
So
Acked-by: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists