Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp430459ybl; Thu, 5 Dec 2019 23:43:59 -0800 (PST) X-Google-Smtp-Source: APXvYqzSv+xqm2Qb0kge4BgxBYIFZld9tF+L2gmLjeeuLxOVmvkgh6wutdgtyKbPb0kvT7tlGpHG X-Received: by 2002:a05:6830:54a:: with SMTP id l10mr9614071otb.249.1575618239140; Thu, 05 Dec 2019 23:43:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575618239; cv=none; d=google.com; s=arc-20160816; b=YM43CYhpPCZ9vQUg2sz/hA4yeOSpRsnWkW4s6tGx4x7srD/YUSCXancJMWaGLVQ+oH YG8jOYgneVpflEavbZMAhFZCXwDo/TbllH4aMTzdGDTu0Ix0BCz1rUSsu6Eg2SQhtbp2 J10qFMNLPG4ClE4l0vyDF2n/8H0oIDgovJduiC0mSYutjz5bSrPVG8vb6/8kVIOOfYI6 ubL0O/xYYijUvVSH2iYJPCLS4XmNrJRKpBcEfs15usDq2fgSg37ptsb+gC2t9758rLeJ nbd0W+6kd+Gzx+QdY7kI9f9TLWkIlx+okRdGRJImwdlaOEEwqutYHr3+Jj8ItoPh8UzD 6AEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=3qLAyYzn7J/3RuSvWUJX4mogG/Cy+bjvwV/eXIo7vUY=; b=av2mbYAlaM+E3rHG0crz400KwGIYu9pi/BYtULVuyzSo4IAFchpvjInQq515t39O5I /lFPJrIs6Cf9MsEhO0/E7aDxabQbch1FVZXC9LQBq7OCNjW6b7+/s8kLdk9BKCFSjhkN wnK0q/CAhCBYdfqpu6a8+UKc0/698s+SGvw8GqOts8L8W8AiR8ThQe1EMRgPpWA4xibN 7sdWffTBzeCGsvcYYXdyPodYlFr++hxP/rLnWY8v3aRY6OK/sfxdzzx3FOwpDJQZT/Z7 rOtsPFo8H3MGvkQea0SGDlcp1OiyXl/3foGYotJrlWDlI3iEvanHrsLcfk1uehgtZdcx DYqw== 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 h139si6637610oib.85.2019.12.05.23.43.47; Thu, 05 Dec 2019 23:43:59 -0800 (PST) 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 S1726584AbfLFHmN (ORCPT + 99 others); Fri, 6 Dec 2019 02:42:13 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:39456 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725858AbfLFHmN (ORCPT ); Fri, 6 Dec 2019 02:42:13 -0500 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 6B7BB24DAD939D5DA602; Fri, 6 Dec 2019 15:42:11 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.439.0; Fri, 6 Dec 2019 15:42:02 +0800 From: Xiongfeng Wang To: , CC: , , , Subject: [PATCH v2] tty: omap-serial: remove set but unused variable Date: Fri, 6 Dec 2019 15:37:43 +0800 Message-ID: <1575617863-32484-1-git-send-email-wangxiongfeng2@huawei.com> X-Mailer: git-send-email 1.7.12.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following warning: drivers/tty/serial/omap-serial.c: In function serial_omap_rlsi: drivers/tty/serial/omap-serial.c:496:16: warning: variable ch set but not used [-Wunused-but-set-variable] The character read is useless according to the table 23-246 of the omap4 TRM. So we can drop it. Reported-by: Hulk Robot Signed-off-by: Xiongfeng Wang --- drivers/tty/serial/omap-serial.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index 6420ae5..5f808d8 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c @@ -493,10 +493,13 @@ static unsigned int check_modem_status(struct uart_omap_port *up) static void serial_omap_rlsi(struct uart_omap_port *up, unsigned int lsr) { unsigned int flag; - unsigned char ch = 0; + /* + * Read one data character out to avoid stalling the receiver according + * to the table 23-246 of the omap4 TRM. + */ if (likely(lsr & UART_LSR_DR)) - ch = serial_in(up, UART_RX); + serial_in(up, UART_RX); up->port.icount.rx++; flag = TTY_NORMAL; -- 1.7.12.4