From patchwork Wed Jan 25 19:50:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Schneider-Pargmann X-Patchwork-Id: 48276 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp456084wrn; Wed, 25 Jan 2023 11:52:05 -0800 (PST) X-Google-Smtp-Source: AMrXdXv9rebfTBTTqZ0rSKxOTyo8jabs6X8/lDCzq2dlRX8HFdpSlz99ZRQxm5o6mJHv8cRC+P+Y X-Received: by 2002:a17:902:e845:b0:192:f45e:4197 with SMTP id t5-20020a170902e84500b00192f45e4197mr44986484plg.31.1674676325157; Wed, 25 Jan 2023 11:52:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674676325; cv=none; d=google.com; s=arc-20160816; b=bDtbsJ5V/KVOIdJLYgwNGuiXSCagILn5nJA7ZvYMZWFNoJnp0CNFOiJkXugej/nq6p EfDwUFu4TvQ/pDieOKCqULiQIuUR6/eufooUBh3zx1rf4wwQaqLhB8Eh45x1B98zyJjT yGCtYPnFevq0g15ieGKRh2OVEQEhn5e+9VERYZJYiPG//+6JZ18fHUYxVGV4Xyu2Za7j lfvAx7SKS4WLsV4ifHA1IaDfVC7qXjn1d5znAK67mirSE+BMpFvwesa2LP3J1u+ib0ms KsyHjFKGTcsQMN80uoxlXidreJHLDydLvHBym2PlSCTsaCtPpT3YZQcbqXWfcsEkBvFb 30FQ== 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=4ZXxLGpYkNLGcR4LovdInInPDGQW3TFLwetgUaPjssQ=; b=ctPQ1Q5WabKp0TjbaBPwtaoYqad6F1UTXqq3RprFiCZ00sXzy5mVnwuxaX5FYVRSle I8mEm1kdGkaXtz2Pk6ealQM0w06bY8/3aTwGJxxLDgyA730qgwfHI3+NI3NxysTBE9+V GDcMJh8DHQJyYz4Fa6NJ+jsiUsBOtuBBUqWdoXvOh7kylnsfdV+xLMAQ3ECT3D4rjOCE PuvRjy9OtLEOKBKnVhxxe+F1KUBH/gubK6sIUks7flT/Zo48tkA8hF0/ppRMab9vmJVK eSRIs/Np4pphfNOCWmOV7gp646c5UqzP+G+x51LyN4d8pOEaL0fUXV11kQGFQt7fvs9c fsrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=W23tRwv4; 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 q6-20020a17090311c600b001925d6fdfe3si7202424plh.142.2023.01.25.11.51.53; Wed, 25 Jan 2023 11:52:05 -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=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=W23tRwv4; 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 S235777AbjAYTvU (ORCPT + 99 others); Wed, 25 Jan 2023 14:51:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235339AbjAYTvL (ORCPT ); Wed, 25 Jan 2023 14:51:11 -0500 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A13622ED61 for ; Wed, 25 Jan 2023 11:51:09 -0800 (PST) Received: by mail-ej1-x62b.google.com with SMTP id nd31so35223ejc.8 for ; Wed, 25 Jan 2023 11:51:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.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=4ZXxLGpYkNLGcR4LovdInInPDGQW3TFLwetgUaPjssQ=; b=W23tRwv4tlQnu6fkwQN0QX5jysPCG+Kz3MLqdQNRukYPtFbsJNAHdRBnwI+8nIIOS3 SWLRhvPidwFEPSuwytVvoN+lZNLPna9ZbzZ2YZiiRIJlsthFLOHanspC1t8rFcxYz2MQ hncplSZ7Z+DF687j8Tn0jdT1waGrR/Wjbf25ruiTrzFPqQszyRFhFA1XMLqfarPVXnqm WVrZ5YB/3sCX9/QvcTdOnMzNsJ4aWekhryMF9T/AA8tlO7qIQBtNB1hw9eZiMaCtWehp NP9xE+AKDsGD4cGULtD0L9N0c8LOOgQdXmzhJN3iG4OthKEQviuL4dbfuL0peRTzS/kQ /sXA== 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=4ZXxLGpYkNLGcR4LovdInInPDGQW3TFLwetgUaPjssQ=; b=QfDmWoQ+bLJeaqMiCWeJJRX0DS5qEAKBZAsi3mMjxVVypBlvmwAp7UWVwlBA8KZ00k L117Joss1xY980nbRkRci591NVutPxltGPmP3FuB4M4nX+G9hUeuh3r9oaZv8ga1rI77 7AR0FHIX+50J66HsyTpWlHxMaeRsGtEag6gdPTvP430oA6HL2ajGKPSnu5+iprNiJblC K13STvCtQ+ZZJlSvDTdP11DT7jVMHAV5aXLx2iOLxWk9kFDXn9fgxI4TUUYNCTvMq/3N WkSjo4swdKpv9eaDm+/nmbtTtMzcwGNzQg4mBieBtcH5JDtZiN9zq6A3Vdi5V+CR3lt7 F6fg== X-Gm-Message-State: AFqh2krCSMYdpBdRr/3miEXMreZq+u4lfZ7i7oY4DlFG0mElrftZTqUh Kjoh+ZsfTJhjXD+TUcRiR1hBEA== X-Received: by 2002:a17:906:774f:b0:870:94e:13f9 with SMTP id o15-20020a170906774f00b00870094e13f9mr35455819ejn.0.1674676268196; Wed, 25 Jan 2023 11:51:08 -0800 (PST) Received: from blmsp.fritz.box ([2001:4091:a247:815f:ef74:e427:628a:752c]) by smtp.gmail.com with ESMTPSA id s15-20020a170906454f00b00872c0bccab2sm2778830ejq.35.2023.01.25.11.51.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Jan 2023 11:51:07 -0800 (PST) From: Markus Schneider-Pargmann To: Marc Kleine-Budde , Chandrasekar Ramakrishnan , Wolfgang Grandegger Cc: Vincent MAILHOL , linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Markus Schneider-Pargmann Subject: [PATCH v2 04/18] can: m_can: Always acknowledge all interrupts Date: Wed, 25 Jan 2023 20:50:45 +0100 Message-Id: <20230125195059.630377-5-msp@baylibre.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230125195059.630377-1-msp@baylibre.com> References: <20230125195059.630377-1-msp@baylibre.com> 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_PASS 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?1756025402475305898?= X-GMAIL-MSGID: =?utf-8?q?1756025402475305898?= The code already exits the function on !ir before this condition. No need to check again if anything is set as IR_ALL_INT is 0xffffffff. Signed-off-by: Markus Schneider-Pargmann --- drivers/net/can/m_can/m_can.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c index 33abe938c30b..2df39dfa309b 100644 --- a/drivers/net/can/m_can/m_can.c +++ b/drivers/net/can/m_can/m_can.c @@ -1083,8 +1083,7 @@ static irqreturn_t m_can_isr(int irq, void *dev_id) return IRQ_NONE; /* ACK all irqs */ - if (ir & IR_ALL_INT) - m_can_write(cdev, M_CAN_IR, ir); + m_can_write(cdev, M_CAN_IR, ir); if (cdev->ops->clear_interrupts) cdev->ops->clear_interrupts(cdev);