From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 629D2C32793 for ; Wed, 18 Jan 2023 08:55:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229969AbjARIzZ (ORCPT ); Wed, 18 Jan 2023 03:55:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229970AbjARIwh (ORCPT ); Wed, 18 Jan 2023 03:52:37 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71D165DC01 for ; Wed, 18 Jan 2023 00:06:15 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0E83E61512 for ; Wed, 18 Jan 2023 08:06:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6DB93C433D2; Wed, 18 Jan 2023 08:06:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674029174; bh=8NVjwudOduI7u7BsQHwbczYVXSuKJge/XeZAtAYqit0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=S/0SJx0WmThRCWvOVuAC8ezN/3WhgWOWDayvvMC5HY3TAVxAUVBKZP1Dzf+j2fLoU jFEFkhTah3JkFG3iUAntozSTD8XMfl/D/NBxKkcLPcBNQtHJNoV8Bu0pm/AOU7ZJ39 bPQ/3UmQZh3baSmlzgKblBPy4H3aD3i1i1wjUOyytJU1ZDsiQLtgTNeDbD9nPbenDa hEi1pDysmRpaSAIPErbjp3bF5DrCJKGPHsDVY/Zbac7QrApoldsY4x8NZkRS7FcEy/ gYXlnfAhyzVHZbr9IYm8wDJvl1NAVKZyg0zfOSTAnDo7ALa3ubF7rjQypmrdrKI//w dZ12EZLGKmudA== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1pI3Sv-0000Rp-JO; Wed, 18 Jan 2023 09:06:38 +0100 Date: Wed, 18 Jan 2023 09:06:37 +0100 From: Johan Hovold To: Sergey Organov Cc: linux-serial@vger.kernel.org, Fabio Estevam , Greg Kroah-Hartman , Jiri Slaby , Richard Genoud , Sascha Hauer , Shawn Guo , Tim Harvey , Tomasz =?utf-8?Q?Mo=C5=84?= , linux-arm-kernel@lists.infradead.org, NXP Linux Team , Pengutronix Kernel Team Subject: Re: [PATCH 3/8] serial: imx: do not sysrq broken chars Message-ID: References: <87bko4e65y.fsf@osv.gnss.ru> <20230113184334.287130-1-sorganov@gmail.com> <20230113184334.287130-4-sorganov@gmail.com> <87sfg92he3.fsf@osv.gnss.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87sfg92he3.fsf@osv.gnss.ru> Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org On Tue, Jan 17, 2023 at 08:35:48PM +0300, Sergey Organov wrote: > Johan Hovold writes: > > On Fri, Jan 13, 2023 at 09:43:29PM +0300, Sergey Organov wrote: > >> @@ -911,9 +911,6 @@ static irqreturn_t __imx_uart_rxint(int irq, void *dev_id) > >> continue; > >> } > >> > >> - if (uart_handle_sysrq_char(&sport->port, (unsigned char)rx)) > >> - continue; > >> - > >> if (unlikely(rx & URXD_ERR)) { > >> if (rx & URXD_BRK) > >> sport->port.icount.brk++; > >> @@ -942,7 +939,8 @@ static irqreturn_t __imx_uart_rxint(int irq, void *dev_id) > >> flg = TTY_OVERRUN; > >> > >> sport->port.sysrq = 0; > >> - } > >> + } else if (uart_handle_sysrq_char(&sport->port, (unsigned char)rx)) > >> + continue; > > > > Nit: missing braces {} > > > > Note that you could also place just place this after the block due to > > the reset of the sysrq time stamp. > > Thanks, I think I'll opt for adding braces. Relying on the reset of the > timestamp feels a bit convoluted. I agree, it may be a bit too subtle. Johan From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6FAFBC32793 for ; Wed, 18 Jan 2023 08:07:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=QxhZRiohx8aNgJ08sonVSiprA/WG5NY7ix7po5nYjg4=; b=VOW2YuSaod3g1W Sw/A49BQPrCTfTtJ2af5FUTG4Q3s84dzq+WhwgcBv303Tru891AtiEPYyHjrDEk2I4lhMSsJvt0wP RdbrfEP9ErSYTSVtEyU94pe+fW9c/lk5h+Klf1tDtsGTRMONJwSbCDdvMQpYn0M02nVxDHJcP6U1Q LPudXbgJ4OIU1AMFw1igOr+I1WcID8/7vG/sj3lt7s2W1CHMEsE73I24CTzumzTRfcUVj9TwIagyq YXuhlPhAiHCXlOFvBjZ7BPjJv/czj8JhRThD1Wi67Q7vssVgIzLRFqQC3XzXbTgtsWYqwb5X+hnf0 mnXew/cEiOGfdTMS7xhQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pI3Sf-00HPqA-4C; Wed, 18 Jan 2023 08:06:21 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pI3Sc-00HPp5-2y for linux-arm-kernel@lists.infradead.org; Wed, 18 Jan 2023 08:06:19 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id C6F68B81B98; Wed, 18 Jan 2023 08:06:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6DB93C433D2; Wed, 18 Jan 2023 08:06:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674029174; bh=8NVjwudOduI7u7BsQHwbczYVXSuKJge/XeZAtAYqit0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=S/0SJx0WmThRCWvOVuAC8ezN/3WhgWOWDayvvMC5HY3TAVxAUVBKZP1Dzf+j2fLoU jFEFkhTah3JkFG3iUAntozSTD8XMfl/D/NBxKkcLPcBNQtHJNoV8Bu0pm/AOU7ZJ39 bPQ/3UmQZh3baSmlzgKblBPy4H3aD3i1i1wjUOyytJU1ZDsiQLtgTNeDbD9nPbenDa hEi1pDysmRpaSAIPErbjp3bF5DrCJKGPHsDVY/Zbac7QrApoldsY4x8NZkRS7FcEy/ gYXlnfAhyzVHZbr9IYm8wDJvl1NAVKZyg0zfOSTAnDo7ALa3ubF7rjQypmrdrKI//w dZ12EZLGKmudA== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1pI3Sv-0000Rp-JO; Wed, 18 Jan 2023 09:06:38 +0100 Date: Wed, 18 Jan 2023 09:06:37 +0100 From: Johan Hovold To: Sergey Organov Cc: linux-serial@vger.kernel.org, Fabio Estevam , Greg Kroah-Hartman , Jiri Slaby , Richard Genoud , Sascha Hauer , Shawn Guo , Tim Harvey , Tomasz =?utf-8?Q?Mo=C5=84?= , linux-arm-kernel@lists.infradead.org, NXP Linux Team , Pengutronix Kernel Team Subject: Re: [PATCH 3/8] serial: imx: do not sysrq broken chars Message-ID: References: <87bko4e65y.fsf@osv.gnss.ru> <20230113184334.287130-1-sorganov@gmail.com> <20230113184334.287130-4-sorganov@gmail.com> <87sfg92he3.fsf@osv.gnss.ru> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <87sfg92he3.fsf@osv.gnss.ru> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230118_000618_315324_32F253E1 X-CRM114-Status: GOOD ( 18.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Jan 17, 2023 at 08:35:48PM +0300, Sergey Organov wrote: > Johan Hovold writes: > > On Fri, Jan 13, 2023 at 09:43:29PM +0300, Sergey Organov wrote: > >> @@ -911,9 +911,6 @@ static irqreturn_t __imx_uart_rxint(int irq, void *dev_id) > >> continue; > >> } > >> > >> - if (uart_handle_sysrq_char(&sport->port, (unsigned char)rx)) > >> - continue; > >> - > >> if (unlikely(rx & URXD_ERR)) { > >> if (rx & URXD_BRK) > >> sport->port.icount.brk++; > >> @@ -942,7 +939,8 @@ static irqreturn_t __imx_uart_rxint(int irq, void *dev_id) > >> flg = TTY_OVERRUN; > >> > >> sport->port.sysrq = 0; > >> - } > >> + } else if (uart_handle_sysrq_char(&sport->port, (unsigned char)rx)) > >> + continue; > > > > Nit: missing braces {} > > > > Note that you could also place just place this after the block due to > > the reset of the sysrq time stamp. > > Thanks, I think I'll opt for adding braces. Relying on the reset of the > timestamp feels a bit convoluted. I agree, it may be a bit too subtle. Johan _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel