From patchwork Tue Nov 22 10:21:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 24249 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2118644wrr; Tue, 22 Nov 2022 02:23:56 -0800 (PST) X-Google-Smtp-Source: AA0mqf4cOqtoNYkZSLIE+VWdyzUgrEky8/cOq/qBD8wAwVxq0dgRGBjN+h5QnX+ZQDfMWWboUIkO X-Received: by 2002:a05:6402:3808:b0:468:c911:d843 with SMTP id es8-20020a056402380800b00468c911d843mr20367010edb.422.1669112636531; Tue, 22 Nov 2022 02:23:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669112636; cv=none; d=google.com; s=arc-20160816; b=Ueygo+uaGkdVEGq9lf6ZxKXNnunDUkCbzQRmYMc8B0K4ichiCV5B0qALPM1j/k3zDZ qfTmAl/2c6YaZPS26TtscToS6BUT08UheFR3qFUkhTwtgfOIvdKZx+jjUA5+KkNTyaXu QRlc3sbMpQLl+7wSzasTOWP3FVHizHS57EhaVzSnyFwP6EiJZU/Wa6kw+sk1HM6LO3b/ BfN8fCGBTkKDKJmDAcKIl/yAePXKSfhx31FZpiNBZqiZkgyoE7HL8NeH97QPwdHWCNLq i9MZNyOaqjVQTPev2o/0XZ2kGLQJzd1rPJl4hAo3oz4KB5/APZllQca3K1e9JTPGheMC ++Mw== 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=j+X5EMuSWufZp+Z8hkFm2zm9ikuxqCq4mAY8N2FU+8IiEm5l46ziphW46ZsdkHD5Sg 1cdYmCHP2SWXr6K6gK3T5PLxJMqwJcduv+llpgZABinDT4deDfo9cXcHK2EbMd7YjQfQ PfqWQEZJn6tY1wmHBO5IVstD8OvVIQpYfDcVm5WaOl7bzArAk5QJsmQv0IrCKQAjzWra QYUKY4kchzgqA4Q9qyvX7NR1NKCbttO7RCyU7e6XiHkdDQA1ECQzP737mOIeY5BiLYel fLNKajJGJyxaHvgRdm7QpScztV0L6dmQRn7Myq5rJTl2xAi6Ico+PXFvBklamNSpGEAG YN8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20210112.gappssmtp.com header.s=20210112 header.b=ndwSmtL+; 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 h8-20020a0564020e0800b004613ae68ca0si1677191edh.442.2022.11.22.02.23.31; Tue, 22 Nov 2022 02:23:56 -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=ndwSmtL+; 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 S233574AbiKVKXI (ORCPT + 99 others); Tue, 22 Nov 2022 05:23:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233525AbiKVKWB (ORCPT ); Tue, 22 Nov 2022 05:22:01 -0500 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B8F631FBD for ; Tue, 22 Nov 2022 02:21:48 -0800 (PST) Received: by mail-wr1-x429.google.com with SMTP id d1so11863102wrs.12 for ; Tue, 22 Nov 2022 02:21:48 -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=ndwSmtL+kAnfwuKf91FC6UZir/RZb1ZDDCnNFXt0T4Lq8cS85ReAD+6SX5v0lqE++L 0445vCIfJJSnQYou686J4MPxo4mqcXUpWrqHwqPlb2QfhZ5KVxoWZujCf1AUG9lJo2EW Tc+j/Vk3YdG2GdTGHKQM/rEFn3XFE1fFnYs4fUwBQC8Rkf5RbUA5xNDQzaTFDKFboDNR jo7kngEVk8S3VnBahuzZPCvBhBY2mHiuJkOpv2PYV/ykJjhq/sPhw7jR4gQUYudXVJ8H odrTvG+8/1snCWxy6gR9x9FEMaFWyt/53O0Vm2lZkBqm5SaP4G2D4pnG0xnaWab09IMi CSKQ== 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=XQzL/q3djbVndscV3BKI/dlcZ7lDLJQFcjHbv9vohm5fjzoW+xqJJpZKQj/2OHKBWh g3r+NpRCswCeUp2zbkZb4gLKPrwD8P5X45+pOEqK7YPDipFmwUhJLcD6T43DeBk4YcWN NxjA3cV3+LZ9/Zc4ugaiNnBrkcW9C+9Z3g4lYedNppKwphbnbRS1I3sm1XbH92xE7nEb baaOeTKuMU4fr8W+uCF96DB1d1meKO/42W0IhUCuZFJO3cKjPMv1i8j6oR5D0AmVxBrN 4HwvJIDtFnLfHCCwrknN9q8tnmoXqOqXo/ufjROxvPSciCZwqzxx/1TkZ92B5Y4Geuur dEYQ== X-Gm-Message-State: ANoB5pneYY8LN29Y7s4T6zInvWQdHB0lqj2h6BkPif8sauQgUVAV8LHB qKs3xgTE0llNSwC9Hjv7sXQsqw== X-Received: by 2002:a05:6000:16c2:b0:241:c56c:b485 with SMTP id h2-20020a05600016c200b00241c56cb485mr10018000wrf.566.1669112507036; Tue, 22 Nov 2022 02:21:47 -0800 (PST) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:e011:9e81:66f1:3415]) by smtp.gmail.com with ESMTPSA id o3-20020a5d4083000000b002366e8eee11sm13432873wrp.101.2022.11.22.02.21.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Nov 2022 02:21:46 -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 v2 06/15] tty: serial: qcom-geni-serial: refactor qcom_geni_serial_isr() Date: Tue, 22 Nov 2022 11:21:16 +0100 Message-Id: <20221122102125.142075-7-brgl@bgdev.pl> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20221122102125.142075-1-brgl@bgdev.pl> References: <20221122102125.142075-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=unavailable 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?1750191452246192242?= X-GMAIL-MSGID: =?utf-8?q?1750191452246192242?= 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: