From patchwork Wed Nov 23 11:07:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 24900 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2723714wrr; Wed, 23 Nov 2022 03:13:25 -0800 (PST) X-Google-Smtp-Source: AA0mqf5GWpRW4lTzX96I7Z19P7vsBbmn4G5HvCVOWoxNKtUDXPebBEShQ1X4SfPOEdlDpNkKf9YJ X-Received: by 2002:a17:90a:e60f:b0:218:95b9:f2f7 with SMTP id j15-20020a17090ae60f00b0021895b9f2f7mr8644706pjy.131.1669202005360; Wed, 23 Nov 2022 03:13:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669202005; cv=none; d=google.com; s=arc-20160816; b=by+e9ZVD+ZYdR0PhbEJhGYnJJ3+tlFBYoavscvDWgmnUP3zGOxAhlwwii7ehoQpMfb fzaHDcL6nqfE4okXbH47aOvxtFd5+adw2Ghnj66M6xFqH5QG0rkOj3SthcLctwsz1V0s gcAk32CQTsZzVvyU66Y3Lzhlzw51/0I3Dg65auNC/rMvBKo0YnY/bpRNV4GQJkajlqDJ 5sDG+bzHsXp/lIiJc8ZpBXTvefs/P9GUnbjAdyYyV0smfoCW6bDMr8Rpk0qYWg0hKl9R 6pTlvVn3v3FNZabrgd5d7wz8d8sQN4bcele6W8Yr0tOBzPFaObfvNIMk7x7bMg64Yjgy Zcmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=hrodxjE3++JzSf9Q5uxlAVuutjj+cagca/Bct4wXLdY=; b=Gti17PYbJJx7YymUaeB9Fyj03f8F+Vf1Xn+3OBWcI9H6TKF1jkvBhhWjByQUlx1N9w dm+FqY0PD7xNdL3UaN/IVgKXlUQQnhM64ocj2xfhTO9tXxSxPA/f8NaEsVxD9kZYYcPH E2QEVriZN4ZlOLHiHYIoOCI6/8KamIzmn+9DzUNYP04H/l7Od3KRXnNsxIyTU35Qjk+C HOfneDyJ1ul2On4vOMcbxnaykEUb/QQy/eWq5U/dl9yLh0hJ2zhtV7Rf6UJm0YNQ6iGh BUvvuriT670tKkeNUemCR+mjUIkJgqMuQ5V7Rjhu1sPry4pBFWG/RFJy5O41ZdhQh18K 5AQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20210112.gappssmtp.com header.s=20210112 header.b="pP4gS/HN"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b13-20020a6541cd000000b0047767ded526si9149664pgq.100.2022.11.23.03.13.10; Wed, 23 Nov 2022 03:13:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20210112.gappssmtp.com header.s=20210112 header.b="pP4gS/HN"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236169AbiKWLJR (ORCPT + 99 others); Wed, 23 Nov 2022 06:09:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237523AbiKWLIb (ORCPT ); Wed, 23 Nov 2022 06:08:31 -0500 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9CF3898C1 for ; Wed, 23 Nov 2022 03:08:10 -0800 (PST) Received: by mail-wm1-x32c.google.com with SMTP id j5-20020a05600c410500b003cfa9c0ea76so1036808wmi.3 for ; Wed, 23 Nov 2022 03:08:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hrodxjE3++JzSf9Q5uxlAVuutjj+cagca/Bct4wXLdY=; b=pP4gS/HNxUf1PC9+KBEniYc8ud5tGr4nZdY/Y/d3YrZGdYbaKwpiuJPxcotoxvGsmB RW0AwYy+5Txh5eg+YnvFht6fnHY6izGJSWKIDIyyeOwwuzYP7BUz1WUyrHGi64iHXyRm 2gJLPmtG+clhzI/2typ0Agb/uwJcqiKZy55mF9EHCXUqbWM9BHO82PPflDunZq6i3awq K/8hAdBIkHzKRgHu/FpZgffAAGjMMI1nhBk7mGp73lMB4b/mi971o084WtQG2XIR+6/P OWM5cjManBcY5IipW6K+j75ZCz6qhlC82oO0eJ7rAHQ8dsWjtWf8xqghMcvfs/7KXR8/ 8odg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hrodxjE3++JzSf9Q5uxlAVuutjj+cagca/Bct4wXLdY=; b=SlC1qU2LfHHimVyM072T5pajR5Lhx8MPhYc2yTiYoIFdHzh779weRHSudjaT03Efk2 Hnxfc9vC5QtGklGulDpbtothkgbtawIbRauEocf+2OjZyLHA4eQ2mxyJ3/CvKzcjO1cg Ht56LoUO9oNXgUzKpyPqnHlLAU8XeGcWuzGYWZT38zzUdTmIqIqG4tJFxW/WMc+o5aZy Jdid2ELBmbEqpdMOXGGv1IugjK0L9F0EC/5vIf3FwsFHXT8IdK6guiwn7pUuoBPAl1nA lNJSCVPIm0toSTjidkmtIXPxXdQ7EWpO03t1etWEXKOFSjmwvqLNZi02PbnyWPk12UrU 95dw== X-Gm-Message-State: ANoB5pmPuZm/JkoSBD2IdtPNsxZ1W1KshQiA8s6ZcSndWqlMl3e+R8v5 yY81pDhGFQbWrMXzMNQIU5HJig== X-Received: by 2002:a1c:7501:0:b0:3cf:61a3:464e with SMTP id o1-20020a1c7501000000b003cf61a3464emr12946239wmc.111.1669201690423; Wed, 23 Nov 2022 03:08:10 -0800 (PST) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:ae74:d94f:4677:3378]) by smtp.gmail.com with ESMTPSA id f13-20020a05600c4e8d00b003c6c182bef9sm2560406wmq.36.2022.11.23.03.08.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Nov 2022 03:08:10 -0800 (PST) From: Bartosz Golaszewski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Greg Kroah-Hartman , Jiri Slaby , Srinivas Kandagatla , Vinod Koul , Alex Elder , =?utf-8?q?Ilp?= =?utf-8?q?o_J=C3=A4rvinen?= Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-serial@vger.kernel.org, Bartosz Golaszewski , Konrad Dybcio Subject: [PATCH v3 06/13] tty: serial: qcom-geni-serial: refactor qcom_geni_serial_isr() Date: Wed, 23 Nov 2022 12:07:52 +0100 Message-Id: <20221123110759.1836666-7-brgl@bgdev.pl> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20221123110759.1836666-1-brgl@bgdev.pl> References: <20221123110759.1836666-1-brgl@bgdev.pl> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750285161856538798?= X-GMAIL-MSGID: =?utf-8?q?1750285161856538798?= From: Bartosz Golaszewski Simplify the conditions in qcom_geni_serial_isr() and fix indentation. Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Reviewed-by: Ilpo Järvinen --- drivers/tty/serial/qcom_geni_serial.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c index ec2523736e99..fba02f71a874 100644 --- a/drivers/tty/serial/qcom_geni_serial.c +++ b/drivers/tty/serial/qcom_geni_serial.c @@ -827,20 +827,18 @@ static irqreturn_t qcom_geni_serial_isr(int isr, void *dev) if (m_irq_status & m_irq_en & (M_TX_FIFO_WATERMARK_EN | M_CMD_DONE_EN)) qcom_geni_serial_handle_tx(uport, m_irq_status & M_CMD_DONE_EN, - geni_status & M_GENI_CMD_ACTIVE); + geni_status & M_GENI_CMD_ACTIVE); - if (s_irq_status & S_GP_IRQ_0_EN || s_irq_status & S_GP_IRQ_1_EN) { + if (s_irq_status & (S_GP_IRQ_0_EN | S_GP_IRQ_1_EN)) { if (s_irq_status & S_GP_IRQ_0_EN) uport->icount.parity++; drop_rx = true; - } else if (s_irq_status & S_GP_IRQ_2_EN || - s_irq_status & S_GP_IRQ_3_EN) { + } else if (s_irq_status & (S_GP_IRQ_2_EN | S_GP_IRQ_3_EN)) { uport->icount.brk++; port->brk = true; } - if (s_irq_status & S_RX_FIFO_WATERMARK_EN || - s_irq_status & S_RX_FIFO_LAST_EN) + if (s_irq_status & (S_RX_FIFO_WATERMARK_EN | S_RX_FIFO_LAST_EN)) qcom_geni_serial_handle_rx(uport, drop_rx); out_unlock: