Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp305142pxm; Wed, 2 Mar 2022 15:56:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJw0+NEfH2M0zlWkBtWWo6amXjuXEziiU7w39SDHiCpcQYhAZdt4PEdblDDYmuyG/iMVMNL/ X-Received: by 2002:a63:d1d:0:b0:359:b894:23d1 with SMTP id c29-20020a630d1d000000b00359b89423d1mr27628564pgl.132.1646265405304; Wed, 02 Mar 2022 15:56:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646265405; cv=none; d=google.com; s=arc-20160816; b=tnUw6gjw0ijXQCbr6YpFr9V6xDAzSc7C0TIIzSZ0oiU0ilARmr42a57TKDI/SlVo0Q u6S4VQEcQwfv+fPGOfccQTQPb7KhyY7FlW15wJjBYiQSBBcaOzk4vJtCEzsNWD2crc8k GlgRLinUghvOxfMHQ/KSSj2Uu+cNwWhU6aR/7DWZ+uBIUWctfYSMXbYlRIKiibO+ncAk Dz9Rdba7D0kVQCec07S1PndrmOq3qW+IjkPsvPFL+gbYcdYNTlzYu3YyBGqPmc1rFeXB iaG1uM8+U3dcBGRG28hEbgJ5FxJZb+ZFRQ0E8XfbIs3kwtifn4PHUBkQZWdV3LnpT1Qo 8uTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=cNoRMUFkpVJTtfRmlym+h2teDoVzdePt8iC/WmPxZD8=; b=Lzhsjw8+PkMNwcySMUgAuRcv+QB37dRgrGAn4QZYeEGbHO0O4rBMEuA5Z/IoJPX6Am bEynJfq1r36SYVdLhGIFHsNH6Ag7Xt0R5v1pd+Rl6x+OZKSud4KYjRnOeFhwcIWS2TCQ oZJZRZZAF/DbX6Jv2DmdbS1VqIv2JGqTLfti7U32/ml+xAtA1BNNZKmQKc2Pyl1dS/aQ W80+SFl6b26AUFMsogjOshsHmWPp/rHCANhxjN1Evnn3roCaod0KqhHWMMNMFJMAdEbK KHB/MG+DF4YS2DRm4JAG9yeqOcyL4Pt2m9sp7aNRWwW/N+Ih5K8cvOwb23xjbG+NqKmP CbTQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id g9-20020a63be49000000b00378c63b4e2fsi435937pgo.769.2022.03.02.15.56.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Mar 2022 15:56:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B66AABDE4F; Wed, 2 Mar 2022 15:16:58 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243720AbiCBRyL (ORCPT + 99 others); Wed, 2 Mar 2022 12:54:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244196AbiCBRyJ (ORCPT ); Wed, 2 Mar 2022 12:54:09 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40E804D264 for ; Wed, 2 Mar 2022 09:53:25 -0800 (PST) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nPT9l-0004SU-CE; Wed, 02 Mar 2022 18:52:57 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1nPT9Y-002Fw7-7a; Wed, 02 Mar 2022 18:52:43 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1nPT9W-006XrV-PN; Wed, 02 Mar 2022 18:52:42 +0100 Date: Wed, 2 Mar 2022 18:52:42 +0100 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Jiri Slaby Cc: gregkh@linuxfoundation.org, Alexandre Belloni , Mateusz Holenko , Neil Armstrong , Benjamin Herrenschmidt , Liviu Dudau , Baruch Siach , linux-kernel@vger.kernel.org, Paul Cercueil , Paul Mackerras , Michael Ellerman , Michal Simek , Karol Gugala , Jerome Brunet , Peter Korsgaard , Florian Fainelli , Alexander Shiyan , Krzysztof Kozlowski , Alexandre Torgue , Fabio Estevam , Russell King , Ludovic Desroches , Andy Gross , bcm-kernel-feedback-list@broadcom.com, NXP Linux Team , linux-serial@vger.kernel.org, Vineet Gupta , Orson Zhai , Tobias Klauser , Patrice Chotard , Albert Ou , Maxime Coquelin , Manivannan Sadhasivam , Martin Blumenstingl , Sascha Hauer , Takao Orito , Vladimir Zapolskiy , Lorenzo Pieralisi , Paul Walmsley , Bjorn Andersson , Sudeep Holla , Richard Genoud , Chunyan Zhang , Nicolas Ferre , "David S. Miller" , Taichi Sugaya , Palmer Dabbelt , Pengutronix Kernel Team , Kevin Hilman , Baolin Wang , Shawn Guo , Andreas =?utf-8?Q?F=C3=A4rber?= , "Maciej W. Rozycki" Subject: Re: [PATCH v3] serial: make uart_console_write->putchar()'s character an unsigned char Message-ID: <20220302175242.ejiaf36vszr4xvou@pengutronix.de> References: <20220302072732.1916-1-jslaby@suse.cz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="hskdw542yop5hfv5" Content-Disposition: inline In-Reply-To: <20220302072732.1916-1-jslaby@suse.cz> X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --hskdw542yop5hfv5 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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_w= rite() > 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. >=20 > 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=F6nig Best regards Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | https://www.pengutronix.de/ | --hskdw542yop5hfv5 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEfnIqFpAYrP8+dKQLwfwUeK3K7AkFAmIfrucACgkQwfwUeK3K 7AmopggAnOhPU9WpzjgGeCrJ82M89QE1zHwxLHny10qpp8CNWjSIBp6GIrgxrTA1 HotBRcS0/boZO+3hvLzTwpU3rQ9Pedgt6hUKfsl5ckcqVrlg0Yp5WZ6+cZEa0NcE Y+gkX3jAowpBb3cdrkxyF8REPsUn57S+/tb8H4x7aroUey13AYKjxjEGZMlaWpms pNyr/cXJpZhJIp4XvFc7lTydslM8QwH/Y0emW7gR7DLFBUw02MNnw7slIKTHgpjl T49NU/ufUTp8FVadiQ8gwzABZLDPgE0+TDxnHEXGqxQtzsN6b76mqNYYOhXtWGM6 hVjAWQ1lu6zv4vddIa4UgbrfSLWPxQ== =MAV/ -----END PGP SIGNATURE----- --hskdw542yop5hfv5--