Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1915019imm; Thu, 20 Sep 2018 05:05:44 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZYuo4KNyMDkGwpnhACIZrtsKHZnD+l93tcl4WxgtarMwktwN1gjo9etARRaCNrwZH0Ev7u X-Received: by 2002:a17:902:7d83:: with SMTP id a3-v6mr39336247plm.0.1537445144544; Thu, 20 Sep 2018 05:05:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537445144; cv=none; d=google.com; s=arc-20160816; b=tW/GNiBhhSGF2YR+FIv31xqxJHamfuIPpNn3R0MYTZRnZzCR+aQVeyi3KTKn+0E99J 2KPW46N9/X0pfl8oqIrSJUQrBfHHaW+MtEdMisfWHTnZ19FfUrgapbZ/8Y07pnohFB// CIrVQ7W976r3lDp2/yqfDt66+zkJwiNSbN6wVLD+IWiWH3L6YHslhkdehhNjM1mRcolz JhEAiEypk8kmxS+SN5r8nNlcw2xmV8FdmIWiMyzD+zlXo+FveFmtY/xAFuJgM1yzkMIG ZqE4rhNem8TcuUWCR4dukxYKiETkRFRZLBpEnWOJtLHoXqc0kSAlDa2JKK8+zqDxqtsU YZlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=bajhV8jjU9GxNXR6oTeoRZYiefHGrptVqR8ODzDwQBU=; b=NczjkztilTa1t/lkYQloZzLFfq7rTPuh1LmoiKvomq1rkm3JSWKuw5pGTuV4h0IyUh RYGm4rM97i3YZYAvSkOOVfVJQ1BIs/uNoNhV5NSdRkHMWtHFw8Bt3Wb9CpPhH/+b8TEz RpN+Ur9mnpbvH4kMMdk2tQNayVxFYq9ig8gd20CXbfho818NnHcDPSnyW/rLWW+TKQlk heEh9DeBYj/KXlNOLyFpypNVK+r7WBaXWDhwhmDNrGHC0ozArKyR8iQ3vRnPjZ8P15x4 G4pic5G6o02sIeWeYWL4DgbK1W0064WEk0B4pNsPiTKigzeYro18JwtTu6LxmDFPa7fb szjA== 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 h11-v6si26326581plk.141.2018.09.20.05.05.17; Thu, 20 Sep 2018 05:05:44 -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 S1732652AbeITRrz (ORCPT + 99 others); Thu, 20 Sep 2018 13:47:55 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:12639 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732580AbeITRry (ORCPT ); Thu, 20 Sep 2018 13:47:54 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 8E8FA2BD2C40F; Thu, 20 Sep 2018 20:04:40 +0800 (CST) Received: from [127.0.0.1] (10.177.31.96) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.399.0; Thu, 20 Sep 2018 20:04:41 +0800 Subject: Re: [PATCH -next] serial: imx: remove set but not used variable 'rtsirq' To: Andy Duan , Leonard Crestez , "u.kleine-koenig@pengutronix.de" , "jslaby@suse.cz" References: <1537408725-196364-1-git-send-email-yuehaibing@huawei.com> <3b23675a-f537-868f-2432-b7f8a0c8c466@suse.cz> <96170d620618804d49ad19323d3cdee853070c72.camel@nxp.com> CC: "linux-serial@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "A.s. Dong" , Abel Vesa , Anson Huang , Bough Chen , Cosmin Samoila , Daniel Baluta , Han Xu , Jacky Bai , Jun Li , "Leo Zhang" , Peng Fan , Peter Chen , Ranjani Vaidyanathan , Robert Chiras , Robin Gong , Shenwei Wang , Viorel Suman , Zening Wang , "gregkh@linuxfoundation.org" , "kernel-janitors@vger.kernel.org" From: YueHaibing Message-ID: <1884583f-5eec-7499-b987-b2e53b15b30e@huawei.com> Date: Thu, 20 Sep 2018 20:04:38 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.177.31.96] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018/9/20 17:41, Andy Duan wrote: > From: Leonard Crestez Sent: 2018年9月20日 16:51 >> On Thu, 2018-09-20 at 08:45 +0200, Jiri Slaby wrote: >>> On 09/20/2018, 03:58 AM, 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] >>>> >>>> diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c @@ >>>> -2220,7 +2220,6 @@ static int imx_uart_probe(struct >> platform_device >>>> *pdev) >>>> >>>> rxirq = platform_get_irq(pdev, 0); >>>> txirq = platform_get_irq(pdev, 1); >>>> - rtsirq = platform_get_irq(pdev, 2); >>> >>> I am not sure this is correct. platform_get_irq has side effects (like >>> enabling the IRQ). Are you sure this won't change the behaviour (this >>> is question mostly to IMX fellows)? >> >> As far as I can tell there was a request_irq call for rtsirq which was >> removed by mistake in commit afe9cbb1a6ad ("serial: imx: drop support >> for IRDA"): >> >> - /* do not use RTS IRQ on IrDA */ >> - if (!USE_IRDA(sport)) { >> - ret = devm_request_irq(&pdev->dev, rtsirq, >> - imx_rtsint, 0, >> - >> dev_name(&pdev->dev), sport); >> - if (ret) >> - return ret; >> - } >> >> This should have just removed the IRDA check and request rtsirq >> unconditionally. Nobody noticed this by testing RTS on imx1, this is an old >> chip and later variants have a single combined irq. >> >> The correct fix for the warning would be to restore that request_irq. >> >> -- >> Regards, >> Leonard > > Yes, your explain is very correct! Thanks for your comment. > We should restore rtsirq request that for i.MX1. Ok, I will post a new fix patch as Leonard and suggested. > > Regards, > Andy Duan >