From patchwork Fri Nov 18 12:25:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 22301 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp165685wrr; Fri, 18 Nov 2022 04:28:00 -0800 (PST) X-Google-Smtp-Source: AA0mqf6VKA1g/2F5D3C0Sty0yWy7Lca2YO2MSn2CrKNJGr56p3pkPLytwUTq1c0+okoqnpp4ZdZ+ X-Received: by 2002:a63:144c:0:b0:474:bda:699b with SMTP id 12-20020a63144c000000b004740bda699bmr6328312pgu.366.1668774480099; Fri, 18 Nov 2022 04:28:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668774480; cv=none; d=google.com; s=arc-20160816; b=QZQNTAgaZ5TQRqKKE8VnzpbhwSj48h3kX7clvFbCPJNErUYpyVSPEiQEfU0CaEzftO 68hQMdEO+/i1Q6iCb7RWiLqZtYPVthVI5ZXfXVMYp3wBcie9s3o9xUQm8TjfcMNqb17D chw8SWwjsnaYW/X9BfImrVnF4wYmGSpDMCb76QonmFCoSMgt3wTIPXNZmCiFAgufLXip Cn+FjGv8eTMv7EqODxTKgtGQdbQvH9Jgp+8lFV8hkSj6jK4nmy0/GPTvKjsCI57giip1 R+yTtG7Flz2K12TJR2Oeq/MdMivAIkTJ+xTmrxO4nUnbtqFiq6LTwfW7JgM03H9ZDA35 gtQQ== 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=zJiQI08Pb3pmpY28T3+Fd6ggBQFLoumFh4Lv/NyHmzg=; b=DkTz6z6g4NmsD82wj4yNT8lZb3F6baOijo7ft20TmTowCyUcAsjNDGpg4dHrmdSBnf wqu9GHHTxqiY9dljJOZ2asC8wCc57mdiTguNeBHL/NEfSGkyQc81wJJu1OSHa3XiYyaw hjqZovwUd/aJSz/02SjDHv4HLJ4f8f2PbNTQsDbZaQtu48UBhAJZP+EgYimVcS+SKUtD MiCVvQRcbO5rnYURMqYbglIZOjAockgLnrOxnofMEFjSNDvh+5nbTMZiHoMtkGtwh19D lZO5ts6xdeKKvUTxWzZRjYFEOFrbatDSimDRU5Uwrya+1bgav2hDxK32vn3KMOj/Ef0m bwdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20210112.gappssmtp.com header.s=20210112 header.b="NTwSgH/p"; 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 rm1-20020a17090b3ec100b0020ad4d5b9e8si7907050pjb.89.2022.11.18.04.27.46; Fri, 18 Nov 2022 04:28:00 -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="NTwSgH/p"; 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 S241034AbiKRM0n (ORCPT + 99 others); Fri, 18 Nov 2022 07:26:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241542AbiKRM01 (ORCPT ); Fri, 18 Nov 2022 07:26:27 -0500 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8605D9737D for ; Fri, 18 Nov 2022 04:26:08 -0800 (PST) Received: by mail-wr1-x430.google.com with SMTP id a14so9049120wru.5 for ; Fri, 18 Nov 2022 04:26:08 -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=zJiQI08Pb3pmpY28T3+Fd6ggBQFLoumFh4Lv/NyHmzg=; b=NTwSgH/pPCy0rx9k8+4HSIGh4YIOeNP51I2+IQZNCer+bRZZJMrHL4W8MOAZaSlcHa CQ3/fD/YOF7RVGFCC9csekJzz7aov9U4qd78L338s5sACCKRMpjk7BFjGdD7JViUsqKE Nc4YU02rLOIRMxsypwq3fAN7CJWgOTIE/AZHR110qhWm5SWYkZgOL2ghf/y9GdG5oQ6Z e7OYrK88Uok9baa7uaJTzMVwDpfgce8jdDZi8QKiBjpOCuNJ7x1L+2Si/dUbc1pHN2ol erzGM6k83Pov8QlyGvBpFXV3Xm6xzcPIICPjbeblWIjZRX7mbUVasH1o5J3PV/xC9OlN CS4A== 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=zJiQI08Pb3pmpY28T3+Fd6ggBQFLoumFh4Lv/NyHmzg=; b=PE0YQv1oyH1mG1vFDUcqHQJVEv6XacwnG89BNPVk/yQPFwR3uQGn3FisTM2cF2rXWP yWQ2XMp15C6/HieFCxjKX6b79Qdkvo6+AEkbwwONqOG+82kGdDMEBX2kKCEwg1GKUDNC 0Cg/uoaJpZpVOBT9AUAUTihfeOANV8nAVpNl6fIJ22Iq7ErTStxc5wtgGNXTRyDjKLs0 1M3kj/W92/yFK2tcFJEYeLVePAB+j2Hg/5qTHrQqiRCjxmgP3Cw8klUMChBY3JW3hk6Y 1xlOTizT3I6swU9snPdA49lgm3WBbcT5ggy02G04rQ6rOv+pB5rwg9uijcxUsOdSObDe jK8g== X-Gm-Message-State: ANoB5pl1Sr4RZNh60DDwEzMTLHiXMPJ9pvSh6oDUVBnogWE4OSMBQHiq Qv5XfHzkp5ipJMGjZyy8frY5nw== X-Received: by 2002:a5d:678c:0:b0:235:14dc:5e14 with SMTP id v12-20020a5d678c000000b0023514dc5e14mr4302820wru.252.1668774368100; Fri, 18 Nov 2022 04:26:08 -0800 (PST) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:b10c:1279:a704:75d4]) by smtp.gmail.com with ESMTPSA id f19-20020a05600c155300b003c6f3e5ba42sm9873958wmg.46.2022.11.18.04.26.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Nov 2022 04:26:07 -0800 (PST) From: Bartosz Golaszewski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Greg Kroah-Hartman , Jiri Slaby , Srinivas Kandagatla , Vinod Koul , Alex Elder Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-serial@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH 06/15] tty: serial: qcom-geni-serial: refactor qcom_geni_serial_isr() Date: Fri, 18 Nov 2022 13:25:30 +0100 Message-Id: <20221118122539.384993-7-brgl@bgdev.pl> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20221118122539.384993-1-brgl@bgdev.pl> References: <20221118122539.384993-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?1749836869209743220?= X-GMAIL-MSGID: =?utf-8?q?1749836869209743220?= 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 dd1491a72deb..22c1869c60f4 100644 --- a/drivers/tty/serial/qcom_geni_serial.c +++ b/drivers/tty/serial/qcom_geni_serial.c @@ -824,20 +824,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: