Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1657855imm; Thu, 20 Sep 2018 00:20:53 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaPRnVkxaOx1oayTP+PmXsl4hkGzlDKUrDxVurMF+rzi0ARASnHq+G0IPgrYBHvM1DcGTTo X-Received: by 2002:a17:902:8ec7:: with SMTP id x7-v6mr38348674plo.336.1537428053505; Thu, 20 Sep 2018 00:20:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537428053; cv=none; d=google.com; s=arc-20160816; b=jNYkmCJIYPV9Qgta9TOJfNjwrsn35q6mu3jyZfY1wfQ17Tuc52hLVxwWmrR88TPNC6 hvIDuYC9eE8HJ3eaC3DtE+kSW0bT/AWuNSiYmcwzIn3BFd9D+Cr/Q0clkmuY7PiroXQ6 3HfsXyqugJbuwWFqMyvS5Ezr7kcDbP6jC8BKLVSh89MFtjpOtY4TF/NgyOrrO/jMeDwD 7C7HXixXPJWvbKSYd3KKQf85DeNaMhOw0A5jqqRSRWITglaHWY7qnr5mIijXZRXoiCPl UxgDtaGc+ayb4KFk5WkvNGHivsnVKosNxc8qsE4LE0ZEbOb4POd/xGZtKXWohlHK/QI9 mcwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=2RqE6NYHDiQ/uWA2eNnItMVbUw1a7o6fOlpHzk43sHQ=; b=WRmHTOXPC9F5mw3KcrBcM+t6hWSQalziLH2bKsVwomWxfjsKHxYBh+4xxz+d5Qhs68 pKMHCkpy2Z+wSinxgjzKF5uyvMPpXXCogEpIoRNAaHvr1P8435PocXzMsvv/253lS9V3 fTpRUsZrIKZXh3eI/v6badrr3SfWnKZFtfFB2O9vvmgi+5SDRT3tGVXtL/XnQ6EYppph 4tbtJYRFFuPE3DJ/mv/1ZY4YAoflSSpcJUFjrLk6sMZVK9VPYt/vq9sCbTF3dnw6U6dA zDEsSb9qWcMUKo1njYO2QL7T2PFfVZ2wF4r3y+VliKhlJETtwLfbOg+1rsMwrBkJ0uM3 tNNQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f185-v6si22646726pgc.625.2018.09.20.00.20.37; Thu, 20 Sep 2018 00:20:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731667AbeITNCP (ORCPT + 99 others); Thu, 20 Sep 2018 09:02:15 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:42093 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726014AbeITNCP (ORCPT ); Thu, 20 Sep 2018 09:02:15 -0400 Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1g2tFo-00013y-Ed; Thu, 20 Sep 2018 09:20:00 +0200 Received: from ukl by ptx.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1g2tFl-0006uC-VF; Thu, 20 Sep 2018 09:19:57 +0200 Date: Thu, 20 Sep 2018 09:19:57 +0200 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= To: YueHaibing Cc: Greg Kroah-Hartman , Jiri Slaby , linux-serial@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH -next] serial: imx: remove set but not used variable 'rtsirq' Message-ID: <20180920071957.xnwni4lqb5kgncfc@pengutronix.de> References: <1537408725-196364-1-git-send-email-yuehaibing@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1537408725-196364-1-git-send-email-yuehaibing@huawei.com> User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 20, 2018 at 01:58:45AM +0000, YueHaibing wrote: > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/tty/serial/imx.c: In function 'imx_uart_probe': > drivers/tty/serial/imx.c:2198:20: warning: > variable 'rtsirq' set but not used [-Wunused-but-set-variable] > > Signed-off-by: YueHaibing Wow, this variable is write-only since afe9cbb1a6ad ("serial: imx: drop support for IRDA") which is over three years old. The last hunk of this patch is wrong however, which means that nobody uses handshaking on imx1 with a kernel newer than 4.1-rc1. (Well, or they fixed it and didn't made the effort to tell.) I suggest to break rx and tx on imx1, too, and if nobody reports a regression within the next three years, we rip out imx1 support completely. :-) Otherwise we need: diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 4e853570ea80..554a69db1bca 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -2350,6 +2350,14 @@ static int imx_uart_probe(struct platform_device *pdev) ret); return ret; } + + ret = devm_request_irq(&pdev->dev, rtsirq, imx_uart_rtsint, 0, + dev_name(&pdev->dev), sport); + if (ret) { + dev_err(&pdev->dev, "failed to request rts irq: %d\n", + ret); + return ret; + } } else { ret = devm_request_irq(&pdev->dev, rxirq, imx_uart_int, 0, dev_name(&pdev->dev), sport); Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |