Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3402193ybi; Sun, 26 May 2019 22:38:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqwUOEeBbJgskbxHMlMs42X3lra/ql/IZnNy24tlDBgjPeQ8y3pUZN1qEnASAjrjPioSVsOv X-Received: by 2002:a17:902:887:: with SMTP id 7mr15206846pll.1.1558935513437; Sun, 26 May 2019 22:38:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558935513; cv=none; d=google.com; s=arc-20160816; b=HJ0FBbiWRm8wtgA2iQPMdJkJc9P2ffLQmSZWmcEXThfig+Gx4tV85cQcGpCeG0brgZ 4ue+gZo5/QxR4oMX+uYoDnBgfw2GBTDOAkXZ7HfrinWKwIr49SDNppTAGkYB3pUcrt9L /HDfiJw9tjUM+CQOOxzyRvugRfeFF+Mf0mnj6SALP2ptWqDQrsRawoONbEBCHNGP2psC ql1/WCqPyici2s4RDFRarcEDIoVXsAek0mT6qIbwpyUqR4HZGfj2TuCauorpzWAr79l/ KRM6DAhKsn0Mc2Eh3vpIejVt6ym9ecszTYLf4XSH2RHNXFzb2Imqb+IfwcNhha4klh/r NAAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=UY2Pl2yFPZpSPMOj8rl10VQ1QNvO0rbW5IF36j6c95w=; b=t6e8fiith8av/HwcfMUC1AzJtMLuwMNCiCaT1Tvu5Ux4y9oH31KQriWwObdaxCCoQ6 jph/FsimP0Z0BDzBXb5+L/HR+uRe3H4H8Zz7vOm70QaDrrKxjI8Z9ksb96FbZy5va6Nv O6so8wUiYn7Ug+vvg7niz3QxUZlakxrCzUeup1uO8qbTaaGUjpDW43oXB3fCp9PwptqJ 5HUnubfq5iFBxn4q5MpzGFbI9/Fs4LzDgxFSfUGIoOmUEI8Jsg5GXkbw84XnWTX2fXAk +nwZDN+s0hpsdCigejjDkFxtJlAB/3O4KCDQYK9jjNcuAM8wZBeLPYHs7nxV+5JFGx21 fmag== 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 i98si16987622plb.104.2019.05.26.22.38.07; Sun, 26 May 2019 22:38:33 -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 S1726112AbfE0FC3 (ORCPT + 99 others); Mon, 27 May 2019 01:02:29 -0400 Received: from mx.socionext.com ([202.248.49.38]:48343 "EHLO mx.socionext.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726052AbfE0FC2 (ORCPT ); Mon, 27 May 2019 01:02:28 -0400 Received: from unknown (HELO kinkan-ex.css.socionext.com) ([172.31.9.52]) by mx.socionext.com with ESMTP; 27 May 2019 14:02:26 +0900 Received: from mail.mfilter.local (m-filter-2 [10.213.24.62]) by kinkan-ex.css.socionext.com (Postfix) with ESMTP id C848818010A; Mon, 27 May 2019 14:02:26 +0900 (JST) Received: from 172.31.9.51 (172.31.9.51) by m-FILTER with ESMTP; Mon, 27 May 2019 14:02:26 +0900 Received: from yuzu.css.socionext.com (yuzu [172.31.8.45]) by kinkan.css.socionext.com (Postfix) with ESMTP id 4956E1A04FC; Mon, 27 May 2019 14:02:26 +0900 (JST) Received: from M20VSDK.e01.socionext.com (unknown [10.213.118.34]) by yuzu.css.socionext.com (Postfix) with ESMTP id 0A229120ABF; Mon, 27 May 2019 14:02:26 +0900 (JST) From: Sugaya Taichi To: Greg Kroah-Hartman , Jiri Slaby Cc: Takao Orito , Kazuhiro Kasai , Shinji Kanematsu , Jassi Brar , Masami Hiramatsu , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, Sugaya Taichi Subject: [PATCH] serial: Fix an invalid comparing statement Date: Mon, 27 May 2019 14:01:27 +0900 Message-Id: <1558933288-30023-1-git-send-email-sugaya.taichi@socionext.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Drop the if-statement which refers to 8th bit field of u8 variable. The bit field is no longer used. Fixes: ba44dc043004 ("serial: Add Milbeaut serial control") Reported-by: Colin Ian King Signed-off-by: Sugaya Taichi --- drivers/tty/serial/milbeaut_usio.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/tty/serial/milbeaut_usio.c b/drivers/tty/serial/milbeaut_usio.c index 949ab7e..d7207ab 100644 --- a/drivers/tty/serial/milbeaut_usio.c +++ b/drivers/tty/serial/milbeaut_usio.c @@ -56,7 +56,6 @@ #define MLB_USIO_SSR_FRE BIT(4) #define MLB_USIO_SSR_PE BIT(5) #define MLB_USIO_SSR_REC BIT(7) -#define MLB_USIO_SSR_BRK BIT(8) #define MLB_USIO_FCR_FE1 BIT(0) #define MLB_USIO_FCR_FE2 BIT(1) #define MLB_USIO_FCR_FCL1 BIT(2) @@ -180,18 +179,14 @@ static void mlb_usio_rx_chars(struct uart_port *port) if (status & MLB_USIO_SSR_ORE) port->icount.overrun++; status &= port->read_status_mask; - if (status & MLB_USIO_SSR_BRK) { - flag = TTY_BREAK; + if (status & MLB_USIO_SSR_PE) { + flag = TTY_PARITY; ch = 0; } else - if (status & MLB_USIO_SSR_PE) { - flag = TTY_PARITY; + if (status & MLB_USIO_SSR_FRE) { + flag = TTY_FRAME; ch = 0; - } else - if (status & MLB_USIO_SSR_FRE) { - flag = TTY_FRAME; - ch = 0; - } + } if (flag) uart_insert_char(port, status, MLB_USIO_SSR_ORE, ch, flag); -- 1.9.1