From patchwork Fri Mar 3 14:20:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Genoud X-Patchwork-Id: 9602915 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9255860414 for ; Fri, 3 Mar 2017 14:21:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 84C1828621 for ; Fri, 3 Mar 2017 14:21:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7954628630; Fri, 3 Mar 2017 14:21:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8619428621 for ; Fri, 3 Mar 2017 14:21:25 +0000 (UTC) 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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=iXJ9UR9Wr5aMYkVw4ZMtlgiOrq6dJw47JDF0ajVP5eA=; b=S9L /7sNSDHPIfjMdmKHpXUW15EKW9O4iBIwG4hl8wNgDN/1p2m/2PEpe6CUjTy1LShdxuOy5O81f1YOT Tj6KcJHqf2rXwPITKS5jNIlH0DznraEsBD3y4A/qeQ/gviSVpayzxqSgEsA1BxBuUSseAn/HiRhU5 gm2swg/Atc4El5JJ2Tdd9WDVrvL5YHV3dbV2oi6ZxsjgFlSRE7qZeIrP8sZsHnE8TgLy/kyqjrveX 3DQPUOJ8nfX4c2e0fnhJJm+m6YWlJUPEz4pgNQ0q7cUJazTl630/c0h3IHpDOX5dhCKYeZdSflT2P paw0s1eC4yMfGEWcCc/gBymLhc2jssw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cjo5E-0001uB-RI; Fri, 03 Mar 2017 14:21:24 +0000 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cjo4u-0001XX-AO for linux-arm-kernel@lists.infradead.org; Fri, 03 Mar 2017 14:21:06 +0000 Received: by mail-wr0-x242.google.com with SMTP id u48so13521381wrc.1 for ; Fri, 03 Mar 2017 06:20:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=7Dy4QZHMGTL3k9djtWvaGNhts0ZZIEoJ/idsplS81Mk=; b=Crh6NygZZRxQYK1FEsDT1paw3HUfJUJvzyg6XlkE32rqvL/4yen+1UWZbXlfc4+rgw Swp3zVa9+dq0mUlEQ10pqz8sPW9rFnAI0gg2KgB0QBPSEkVq5QoCg1ZDmKfXQ4MbtPVD X6HaPsB3Qd0GGZKwiycT+hE23otvjB5JD89pWJqpcXbucsQdQPVKLq4qZZBe9dKkSfHe VvorsJ/VlNmZSILVlP5lre/WiNtWPeiMPxBfvM1kTOj7KYcLpGXJiDKZM6riCcqGeXQg ToKcNgRoNd70j9Gg4P0qr3ltKlcxRVqAYOJEc3kZAdXXXWKAOY0RJj0dgxT83e11V7e7 T+cQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=7Dy4QZHMGTL3k9djtWvaGNhts0ZZIEoJ/idsplS81Mk=; b=bECqsvefnYQOYqCvkv5hdo0kl+BCVdN3QQziWVUFxHSYC6/hWmRny+P2NkTmix/dau giswOEW0jx2tho5w58yLkz+W823CMbu+D4CxyAcp6xCnHRWV4CrYGns2B/CneVkT5Nio 5t+ubfQFIYB3J//uVWQ2omaF+nu2keVwypTyTYr/cl3dp8ydljKCjcB6cuKdsSXq1mRT KM+7YLXel/PMcbvd/nujM+dmv0NIPb7w26Y65G63DZ42KOcKmswkB9phZCY/s1QTTQEs kesCjoTwmaJ+UXl1eX8YQe/YX6OYnwl98mjsU4x0dNwk4ywD6QYRpLOL0wcHHUKSDuVP /7Wg== X-Gm-Message-State: AMke39ngujmMkJRpR+CwsRKoEXjnlFHOMiEL/wKKrC8xjkZqzq65iv9ikHCwr5J/syhxrw== X-Received: by 10.223.175.196 with SMTP id y4mr2840389wrd.77.1488550842986; Fri, 03 Mar 2017 06:20:42 -0800 (PST) Received: from localhost ([46.227.18.67]) by smtp.gmail.com with ESMTPSA id v18sm15412621wrc.41.2017.03.03.06.20.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Mar 2017 06:20:42 -0800 (PST) From: Richard Genoud To: Greg Kroah-Hartman Subject: [PATCH 3/4] tty/serial: mxs-auart: remove uneeded IS_ERR_OR_NULL calls Date: Fri, 3 Mar 2017 15:20:31 +0100 Message-Id: <20170303142031.16101-1-richard.genoud@gmail.com> X-Mailer: git-send-email 2.11.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170303_062104_535215_B5A0F1D5 X-CRM114-Status: UNSURE ( 9.01 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Boris Brezillon , Richard Genoud , Nicolas Ferre , linux-kernel@vger.kernel.org, Janusz Uzycki , linux-serial@vger.kernel.org, =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Since commit 1d267ea6539f ("serial: mctrl-gpio: simplify init routine"), the mctrl_gpio_to_gpiod() function can't return an error anymore. So, just testing for a NULL pointer is ok. Signed-off-by: Richard Genoud --- 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 6989b227d134..541933d8a5c6 100644 --- a/drivers/tty/serial/mxs-auart.c +++ b/drivers/tty/serial/mxs-auart.c @@ -973,10 +973,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) == NULL) +#define CTS_AT_AUART() (mctrl_gpio_to_gpiod(s->gpios, UART_GPIO_CTS) == NULL) static void mxs_auart_settermios(struct uart_port *u, struct ktermios *termios, struct ktermios *old)