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 E7497C77B7A for ; Tue, 30 May 2023 16:22:02 +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:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=qJCPObM4RJy/U4lcIgff9jjGDz6lYu0H7u6vA/yX0M4=; b=yQxB+NRCxTG4KR B13A8IxDnrU1cGfaTq4puUr6540GlHWSMkmcz3hJadlbxwavq3/JQ+u4NRmeRW/wLpxN/iGeP3e/q J2WShDi03vlIlAmgvtGADLE/S4ODVN2hTFKJblW58sT0ZvWIuhFs/ZTaxCSKDHucoqq2KEbeaw+i9 l1wNhJydRg8KhM+jPgCs7ghpOR26stn2R+NzQJnyhH8NEDAOjfKMoGWvcbUXdiTkymFMSZWvxWVLl l3+VFJoTi5RTu9UrugM/6ajibr71pdbeyh8pTBnr2bosQdw6Fso91J8WkUsSsht7N1h8j/AO26DwB kwMl+wlKB2RuSRtFnWUg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q426M-00EYGB-1e; Tue, 30 May 2023 16:21:38 +0000 Received: from m12.mail.163.com ([220.181.12.196]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q426K-00EYFQ-10 for linux-arm-kernel@lists.infradead.org; Tue, 30 May 2023 16:21:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=ru5cR PmsF9ZMmZyJkpTmhO87sRRfpND2S5AIZbRneS8=; b=hbgaKTL4OdWrbkFZELrqA mQC+RbpjIo2yYZixv5gmZbNify5YQpkeZt+cg9cV5IK+NliPHjJD4flcoMMImgVw hsuuo72k2wier9iOeZrHLP8Cuwhah41soLks8C5JC12mBN6abVRqVIYsHIYrcNet LnAK/aQMLnnOQTfzYDg5XE= Received: from lizhe.. (unknown [120.245.132.246]) by zwqz-smtp-mta-g2-2 (Coremail) with SMTP id _____wB39k5TInZkiwMYBA--.49914S4; Wed, 31 May 2023 00:21:06 +0800 (CST) From: Lizhe To: andrew@lunn.ch, sebastian.hesselbarth@gmail.com, gregory.clement@bootlin.com, linux@armlinux.org.uk, thierry.reding@gmail.com, u.kleine-koenig@pengutronix.de, linus.walleij@linaro.org, brgl@bgdev.pl Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org, linux-gpio@vger.kernel.org, Lizhe Subject: [PATCH] drivers/gpio : Remove redundant clearing of IRQ_TYPE_SENSE_MASK Date: Wed, 31 May 2023 00:20:34 +0800 Message-Id: <20230530162034.4004-1-sensor1010@163.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CM-TRANSID: _____wB39k5TInZkiwMYBA--.49914S4 X-Coremail-Antispam: 1Uf129KBjvdXoW7GFy8uF1xGF4rZF1fZw1fZwb_yoWDKwb_Cw n5Kay3Xw4rtFn8ZrnIka1xZrZFyw4DW3Z5urn5t3ZxArn5Zr13ursrW3WSyFW5Zr4I9FWU tayrCr4avFW7AjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7xRKGQ6JUUUUU== X-Originating-IP: [120.245.132.246] X-CM-SenderInfo: 5vhq20jurqiii6rwjhhfrp/xtbBXhN-q1aEBo2lAwAAsm X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230530_092136_791260_31CCCA90 X-CRM114-Status: UNSURE ( 9.33 ) X-CRM114-Notice: Please train this message. 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 Before executing microchip_sgpio_irq_set_type(), type has already been cleared IRQ_TYPE_SENSE_MASK, see __irq_set_trigger(). Signed-off-by: Lizhe --- arch/arm/plat-orion/gpio.c | 1 - drivers/gpio/gpio-mvebu.c | 1 - 2 files changed, 2 deletions(-) diff --git a/arch/arm/plat-orion/gpio.c b/arch/arm/plat-orion/gpio.c index 595e9cb33c1d..863fa497b1a2 100644 --- a/arch/arm/plat-orion/gpio.c +++ b/arch/arm/plat-orion/gpio.c @@ -364,7 +364,6 @@ static int gpio_irq_set_type(struct irq_data *d, u32 type) return -EINVAL; } - type &= IRQ_TYPE_SENSE_MASK; if (type == IRQ_TYPE_NONE) return -EINVAL; diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c index a68f682aec01..34fd007b0308 100644 --- a/drivers/gpio/gpio-mvebu.c +++ b/drivers/gpio/gpio-mvebu.c @@ -505,7 +505,6 @@ static int mvebu_gpio_irq_set_type(struct irq_data *d, unsigned int type) if ((u & BIT(pin)) == 0) return -EINVAL; - type &= IRQ_TYPE_SENSE_MASK; if (type == IRQ_TYPE_NONE) return -EINVAL; -- 2.34.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel