Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1948260ybv; Fri, 14 Feb 2020 08:42:41 -0800 (PST) X-Google-Smtp-Source: APXvYqy32IJ+jj6U+hunZKbFrE36gvEfr1OY1xXrl8v8cC4mkcfeMUQenL9bj4PPUhp45vqV5NWM X-Received: by 2002:aca:190a:: with SMTP id l10mr2573833oii.56.1581698561008; Fri, 14 Feb 2020 08:42:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581698561; cv=none; d=google.com; s=arc-20160816; b=e0DuvG72t3TCYTujZ3A32YYtfjaDvnPcv5atuEszav7nm9r42C3y/4eGUlAIgqsEbS GJbnfttLL2T5TnLaMIz/DFdsTuCyO+TNYGgHJPyUG/e2B3ohvxDE7WWJcG1SzSJjfyB/ 7H5rfdc36HcDhoigr3ZLo/kZSdKlF5cTD7cb0ZXLrmfL0SF8+dXmHfWdLgDOZZ5Iwvn8 Wo6V7AKkkWg7rqOhFHW6BjmpwFxMu2eA6+siZ4VsWoh4j3+Z8Rpog4D1lZP9iWlHsdeN Dej7CM5N5LT9w/6hPbjZ8/mrF5XX7gtP4QJsBDYhkIJ6OxMI/AxQyzVJZvjxtDrxh4Me J1TA== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qbej4MVfCDfqWndk7k4nSI2l30m5zC2pXFgUxrO8tU4=; b=gVpVkdRKhCgvbaZ06WRtDHBScEZ17wI045Bm9JRQMlTB/eIT5R6h9ryvpyCfFmYrVk ayZsyWOkL+VUyA9qrUraNj3c7ACEKiO/BYBHCswRgTIHUep/klE2CwoEBrdviqj7lFF6 cn7/z7gTuPhQDYB8V7d8LwQzi4R48iOyKFI737q2fqzoQXZ9p1/3AO+vz+g5t2tCFx1h xplXEeeogbypaEbjxb5SbLXCNmOp1a7YERqI/IF38YHa8cnsARZ7+1P8psJYwuoXDJ7U CIfU1a01w84JSHk4qBr8NqQTKJryfhuTximWuo+zpDbFN88jtpBgCHNg/TxnPFDCNmSL D1lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nKJqAedr; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f4si3128765oto.169.2020.02.14.08.42.29; Fri, 14 Feb 2020 08:42:40 -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; dkim=pass header.i=@kernel.org header.s=default header.b=nKJqAedr; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393891AbgBNQlt (ORCPT + 99 others); Fri, 14 Feb 2020 11:41:49 -0500 Received: from mail.kernel.org ([198.145.29.99]:58042 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405462AbgBNQWa (ORCPT ); Fri, 14 Feb 2020 11:22:30 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C5A332474B; Fri, 14 Feb 2020 16:22:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581697349; bh=E9yzJ9xEnrurxjDq55BYfHYZDK7JbakG3pVhSB2GwaQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nKJqAedraWvM8aue0Wzi3b4yVhz0apk2HQc3VskVTKPEHnE9TuF/Y94bvWnBGbdJl mzhlsIZzfGaHECNYq+TDEs5/6joicKYdGoFHpPeVyctWP4HmqDj3jUALldAwgxQSwR 7TiuFhACx0BsBy9icRY5DJFSU6s0Zay4vZ8jeHJc= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Xiongfeng Wang , Hulk Robot , Greg Kroah-Hartman , Sasha Levin , linux-serial@vger.kernel.org Subject: [PATCH AUTOSEL 4.9 053/141] tty: omap-serial: remove set but unused variable Date: Fri, 14 Feb 2020 11:19:53 -0500 Message-Id: <20200214162122.19794-53-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200214162122.19794-1-sashal@kernel.org> References: <20200214162122.19794-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Xiongfeng Wang [ Upstream commit e83c6587c47caa2278aa3bd603b5a85eddc4cec9 ] 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 Link: https://lore.kernel.org/r/1575617863-32484-1-git-send-email-wangxiongfeng2@huawei.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- 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 472ba3c813c1a..6045ffcb4f6d0 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c @@ -497,10 +497,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; -- 2.20.1