Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5438417ybi; Wed, 12 Jun 2019 02:29:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqwZsf2HvQLfUNsrTDiwB4nFJYcc138wbt9VZdiGS+wc7kLnK6Np3z7Z/y/N+BypEwtyTjQC X-Received: by 2002:aa7:914e:: with SMTP id 14mr33947040pfi.136.1560331790198; Wed, 12 Jun 2019 02:29:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560331790; cv=none; d=google.com; s=arc-20160816; b=csQiWqNXd9q8uui+LwD1BADo0mwRjZ93doARfxbJ1ID+F1sXdHU7sgwjV1/7pgJ2Xp w8ezsSTkIXlCzsfyGb3cKauAL6Nu556/o6/PdM2XUm90dpuy+7V66yXiNM4dkAZ7V+lu urOFeIvSGfQdXXoXr4fo8RsXZctGLanuCItEzI7GlFj5oX8//QoHNKHjNRLVpa6viMU0 8VCo117bMWWZmPsi798MEyrdMgAsyI1X26bWrygvMcSXHRvZ3t9ddVLrLGdO9vyAS3Fj //ai+WRommasFqljNuYLLStlV5yP/gHuNh8oTRiHKT/YCtaYsbv6OVUs9h3HTYSFrjUk /VTA== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=5OY8G2UVpnAAOgVbl+onuU+0ifNd1M2/A5QVzF2Bilo=; b=x8K6ZLWdYptfpFp8VRdGICMn6+3xf6r44kqIEan/V7X6RDWT5hI5BWrVWJ2s3Ju4Ia kVHJNME+uc+se7ioOh5hkaicPuLIbK1WSSfhnwy0bKqd1HZuz2gcqfs0LeQG9I0X7icT 8aoFYiZ9RzQ3c3ZbHCCET3k7TSKajpVHLI3LzBoyi6G0cFyDaUGxkvFRXduumKKJXufU jlVba48LJht9E03pBeq/WQ5FhICbIyBdOKireqhKuAMy+zC9Wy69ayLp1i+euVqUlTD2 xtY+pdJTYo6pB13rAVZs/2BXNWksdXSL4lXa5g/I+mujxQUKU00ikWh9441A6IzCXP13 GH0Q== 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 q7si10101846pgc.374.2019.06.12.02.29.33; Wed, 12 Jun 2019 02:29:50 -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 S1731331AbfFLJSx (ORCPT + 99 others); Wed, 12 Jun 2019 05:18:53 -0400 Received: from mx.socionext.com ([202.248.49.38]:16186 "EHLO mx.socionext.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726636AbfFLJSx (ORCPT ); Wed, 12 Jun 2019 05:18:53 -0400 Received: from unknown (HELO iyokan-ex.css.socionext.com) ([172.31.9.54]) by mx.socionext.com with ESMTP; 12 Jun 2019 18:18:51 +0900 Received: from mail.mfilter.local (m-filter-2 [10.213.24.62]) by iyokan-ex.css.socionext.com (Postfix) with ESMTP id 4152460629; Wed, 12 Jun 2019 18:18:51 +0900 (JST) Received: from 172.31.9.53 (172.31.9.53) by m-FILTER with ESMTP; Wed, 12 Jun 2019 18:18:51 +0900 Received: from yuzu.css.socionext.com (yuzu [172.31.8.45]) by iyokan.css.socionext.com (Postfix) with ESMTP id E9C9F40376; Wed, 12 Jun 2019 18:18:50 +0900 (JST) Received: from [127.0.0.1] (unknown [10.213.119.83]) by yuzu.css.socionext.com (Postfix) with ESMTP id D2133120B25; Wed, 12 Jun 2019 18:18:50 +0900 (JST) Subject: Re: [PATCH] serial: Fix an invalid comparing statement To: Greg Kroah-Hartman Cc: Jiri Slaby , Takao Orito , Kazuhiro Kasai , Shinji Kanematsu , Jassi Brar , Masami Hiramatsu , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org References: <1558933288-30023-1-git-send-email-sugaya.taichi@socionext.com> <20190610165655.GA397@kroah.com> From: "Sugaya, Taichi" Message-ID: <3b075194-9cea-6de9-31ed-b6dda1e87e9a@socionext.com> Date: Wed, 12 Jun 2019 18:18:50 +0900 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20190610165655.GA397@kroah.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 2019/06/11 1:56, Greg Kroah-Hartman wrote: > On Mon, May 27, 2019 at 02:01:27PM +0900, Sugaya Taichi wrote: >> 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); > > While the code never actually supported Break, you are explicitly > removing that logic now. So shouldn't you instead _fix_ break handling? > The code before and after your change does not work any differently, so > this patch isn't really needed at this point. > According to research, MLB_USIO_SSR_BRK was a remnant of old HW. Since current one does not handle the Break, all logic related it should be removed. I try to make a new fix patch. Thanks, Sugaya Taichi > thanks, > > greg k-h >