From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A0DDEC3A5A0 for ; Mon, 19 Aug 2019 12:26:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7B8B420843 for ; Mon, 19 Aug 2019 12:26:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727529AbfHSM0Q (ORCPT ); Mon, 19 Aug 2019 08:26:16 -0400 Received: from kirsty.vergenet.net ([202.4.237.240]:38736 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727424AbfHSM0P (ORCPT ); Mon, 19 Aug 2019 08:26:15 -0400 Received: from reginn.horms.nl (watermunt.horms.nl [80.127.179.77]) by kirsty.vergenet.net (Postfix) with ESMTPA id 9022425B820; Mon, 19 Aug 2019 22:26:13 +1000 (AEST) Received: by reginn.horms.nl (Postfix, from userid 7100) id 6DAA39406ED; Mon, 19 Aug 2019 14:26:11 +0200 (CEST) Date: Mon, 19 Aug 2019 14:26:11 +0200 From: Simon Horman To: Geert Uytterhoeven Cc: Greg Kroah-Hartman , Jiri Slaby , Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= , Frieder Schrempf , Richard Genoud , Shawn Guo , Sascha Hauer , Fabio Estevam , Pengutronix Kernel Team , NXP Linux Team , linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-renesas-soc@vger.kernel.org Subject: Re: [PATCH 2/3] serial: mxs-auart: Don't check for mctrl_gpio_to_gpiod() returning error Message-ID: <20190819122608.b3qpho5dtrfbvngd@verge.net.au> References: <20190814092757.13726-1-geert+renesas@glider.be> <20190814092924.13857-1-geert+renesas@glider.be> <20190814092924.13857-3-geert+renesas@glider.be> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190814092924.13857-3-geert+renesas@glider.be> Organisation: Horms Solutions BV User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org On Wed, Aug 14, 2019 at 11:29:23AM +0200, Geert Uytterhoeven wrote: > Since commit 1d267ea6539f2663 ("serial: mctrl-gpio: simplify init > routine"), mctrl_gpio_init() returns failure if the assignment to any > member of the gpio array results in an error pointer. > Since commit c359522194593815 ("serial: mctrl_gpio: Avoid probe failures > in case of missing gpiolib"), mctrl_gpio_to_gpiod() returns NULL in the > !CONFIG_GPIOLIB case. > Hence there is no longer a need to check for mctrl_gpio_to_gpiod() > returning an error value. A simple NULL check is sufficient. > > This follows the spirit of commit 445df7ff3fd1a0a9 ("serial: mctrl-gpio: > drop usages of IS_ERR_OR_NULL") in the mctrl-gpio core. > > Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman > --- > drivers/tty/serial/mxs-auart.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c > index 4c188f4079b3ea68..e3452597068292f9 100644 > --- a/drivers/tty/serial/mxs-auart.c > +++ b/drivers/tty/serial/mxs-auart.c > @@ -969,10 +969,8 @@ static int mxs_auart_dma_init(struct mxs_auart_port *s) > > } > > -#define RTS_AT_AUART() IS_ERR_OR_NULL(mctrl_gpio_to_gpiod(s->gpios, \ > - UART_GPIO_RTS)) > -#define CTS_AT_AUART() IS_ERR_OR_NULL(mctrl_gpio_to_gpiod(s->gpios, \ > - UART_GPIO_CTS)) > +#define RTS_AT_AUART() !mctrl_gpio_to_gpiod(s->gpios, UART_GPIO_RTS) > +#define CTS_AT_AUART() !mctrl_gpio_to_gpiod(s->gpios, UART_GPIO_CTS) > static void mxs_auart_settermios(struct uart_port *u, > struct ktermios *termios, > struct ktermios *old) > -- > 2.17.1 > From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Horman Subject: Re: [PATCH 2/3] serial: mxs-auart: Don't check for mctrl_gpio_to_gpiod() returning error Date: Mon, 19 Aug 2019 14:26:11 +0200 Message-ID: <20190819122608.b3qpho5dtrfbvngd@verge.net.au> References: <20190814092757.13726-1-geert+renesas@glider.be> <20190814092924.13857-1-geert+renesas@glider.be> <20190814092924.13857-3-geert+renesas@glider.be> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20190814092924.13857-3-geert+renesas@glider.be> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Geert Uytterhoeven Cc: Pengutronix Kernel Team , linux-serial@vger.kernel.org, Richard Genoud , Greg Kroah-Hartman , Sascha Hauer , Jiri Slaby , Frieder Schrempf , linux-renesas-soc@vger.kernel.org, NXP Linux Team , Fabio Estevam , Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= , Shawn Guo , linux-arm-kernel@lists.infradead.org List-Id: linux-serial@vger.kernel.org On Wed, Aug 14, 2019 at 11:29:23AM +0200, Geert Uytterhoeven wrote: > Since commit 1d267ea6539f2663 ("serial: mctrl-gpio: simplify init > routine"), mctrl_gpio_init() returns failure if the assignment to any > member of the gpio array results in an error pointer. > Since commit c359522194593815 ("serial: mctrl_gpio: Avoid probe failures > in case of missing gpiolib"), mctrl_gpio_to_gpiod() returns NULL in the > !CONFIG_GPIOLIB case. > Hence there is no longer a need to check for mctrl_gpio_to_gpiod() > returning an error value. A simple NULL check is sufficient. > > This follows the spirit of commit 445df7ff3fd1a0a9 ("serial: mctrl-gpio: > drop usages of IS_ERR_OR_NULL") in the mctrl-gpio core. > > Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman > --- > drivers/tty/serial/mxs-auart.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c > index 4c188f4079b3ea68..e3452597068292f9 100644 > --- a/drivers/tty/serial/mxs-auart.c > +++ b/drivers/tty/serial/mxs-auart.c > @@ -969,10 +969,8 @@ static int mxs_auart_dma_init(struct mxs_auart_port *s) > > } > > -#define RTS_AT_AUART() IS_ERR_OR_NULL(mctrl_gpio_to_gpiod(s->gpios, \ > - UART_GPIO_RTS)) > -#define CTS_AT_AUART() IS_ERR_OR_NULL(mctrl_gpio_to_gpiod(s->gpios, \ > - UART_GPIO_CTS)) > +#define RTS_AT_AUART() !mctrl_gpio_to_gpiod(s->gpios, UART_GPIO_RTS) > +#define CTS_AT_AUART() !mctrl_gpio_to_gpiod(s->gpios, UART_GPIO_CTS) > static void mxs_auart_settermios(struct uart_port *u, > struct ktermios *termios, > struct ktermios *old) > -- > 2.17.1 > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1C9CC3A5A0 for ; Mon, 19 Aug 2019 12:26:20 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A6AD920851 for ; Mon, 19 Aug 2019 12:26:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="rVSYSh+R" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A6AD920851 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=verge.net.au Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=bwMB+CRptns8RfliWvlFjsMhyBgPOVOjcdUYeqDTu9E=; b=rVSYSh+RcydPI0 wwG8gxyWEJ1AKBpWCqts5pFVUn7Z8ktXzFXW0p4/vtQ0nFHK8L+QV0daNFw0OQdEZo7XZoA00Eilu qkzNT+IKV4lHSb3PfYOdiSxfaJYUA7GN5iTVGJFt8VXeNG8gJ8r/MhS/Oh+sK9OfQq9NxJkihiytz GCVMfz3uOs8xsYcwvY7dtt16BvBKq+TQ51mczlb3U4/VsrvpUu1nC6UZM2flbluhtf+xXzVUFnzyS xIMsE/kmhiaJe13MenWWTPH1/afccLbBEt+uxqvaIbLziPnx5Y9TSc458M/igQ1VbYCC8Uue9pE7Y yiwFRTIyaOwndWTl8DPQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hzgjr-0008K9-IW; Mon, 19 Aug 2019 12:26:19 +0000 Received: from kirsty.vergenet.net ([202.4.237.240]) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hzgjo-0008Ji-Cv for linux-arm-kernel@lists.infradead.org; Mon, 19 Aug 2019 12:26:17 +0000 Received: from reginn.horms.nl (watermunt.horms.nl [80.127.179.77]) by kirsty.vergenet.net (Postfix) with ESMTPA id 9022425B820; Mon, 19 Aug 2019 22:26:13 +1000 (AEST) Received: by reginn.horms.nl (Postfix, from userid 7100) id 6DAA39406ED; Mon, 19 Aug 2019 14:26:11 +0200 (CEST) Date: Mon, 19 Aug 2019 14:26:11 +0200 From: Simon Horman To: Geert Uytterhoeven Subject: Re: [PATCH 2/3] serial: mxs-auart: Don't check for mctrl_gpio_to_gpiod() returning error Message-ID: <20190819122608.b3qpho5dtrfbvngd@verge.net.au> References: <20190814092757.13726-1-geert+renesas@glider.be> <20190814092924.13857-1-geert+renesas@glider.be> <20190814092924.13857-3-geert+renesas@glider.be> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190814092924.13857-3-geert+renesas@glider.be> Organisation: Horms Solutions BV User-Agent: NeoMutt/20170113 (1.7.2) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190819_052616_593599_E9838BCA X-CRM114-Status: GOOD ( 13.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Pengutronix Kernel Team , linux-serial@vger.kernel.org, Richard Genoud , Greg Kroah-Hartman , Sascha Hauer , Jiri Slaby , Frieder Schrempf , linux-renesas-soc@vger.kernel.org, NXP Linux Team , Fabio Estevam , Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= , Shawn Guo , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Aug 14, 2019 at 11:29:23AM +0200, Geert Uytterhoeven wrote: > Since commit 1d267ea6539f2663 ("serial: mctrl-gpio: simplify init > routine"), mctrl_gpio_init() returns failure if the assignment to any > member of the gpio array results in an error pointer. > Since commit c359522194593815 ("serial: mctrl_gpio: Avoid probe failures > in case of missing gpiolib"), mctrl_gpio_to_gpiod() returns NULL in the > !CONFIG_GPIOLIB case. > Hence there is no longer a need to check for mctrl_gpio_to_gpiod() > returning an error value. A simple NULL check is sufficient. > > This follows the spirit of commit 445df7ff3fd1a0a9 ("serial: mctrl-gpio: > drop usages of IS_ERR_OR_NULL") in the mctrl-gpio core. > > Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman > --- > drivers/tty/serial/mxs-auart.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c > index 4c188f4079b3ea68..e3452597068292f9 100644 > --- a/drivers/tty/serial/mxs-auart.c > +++ b/drivers/tty/serial/mxs-auart.c > @@ -969,10 +969,8 @@ static int mxs_auart_dma_init(struct mxs_auart_port *s) > > } > > -#define RTS_AT_AUART() IS_ERR_OR_NULL(mctrl_gpio_to_gpiod(s->gpios, \ > - UART_GPIO_RTS)) > -#define CTS_AT_AUART() IS_ERR_OR_NULL(mctrl_gpio_to_gpiod(s->gpios, \ > - UART_GPIO_CTS)) > +#define RTS_AT_AUART() !mctrl_gpio_to_gpiod(s->gpios, UART_GPIO_RTS) > +#define CTS_AT_AUART() !mctrl_gpio_to_gpiod(s->gpios, UART_GPIO_CTS) > static void mxs_auart_settermios(struct uart_port *u, > struct ktermios *termios, > struct ktermios *old) > -- > 2.17.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel