Message ID | 20230519171611.6810-1-sensor1010@163.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1397377vqo; Fri, 19 May 2023 10:22:07 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ79GZOCD1RVRMXz8qeMTe3DcFmsMVEU5it5Tfi//Fa1RA07f5E1n+kMmeCJJKeqKKfkdsBj X-Received: by 2002:a05:6a20:6a14:b0:107:1805:feea with SMTP id p20-20020a056a206a1400b001071805feeamr3027848pzk.37.1684516926821; Fri, 19 May 2023 10:22:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684516926; cv=none; d=google.com; s=arc-20160816; b=LPHHMJI53Dov2nmfupexXgwvbhwsqN5G/oAJZ0JL1OCidpHsIuPE2PS9bafJKWeopu Bhg6AWzKkUJK3LR1c9d8rKqAzn0naCJ9BGcCfs35Jz+zT4UmB0iDoWPyZG56F+0VLlfW iHoK5CSJARHZuD2Xb+qm6xMbmNya4st8GP8OL9y54Mh7eDICHd/2kZnYdKx9q2lm3Cno grw2WoNHos18uWCvCBpIg+c23voOJ7NRzADZpa9MUNG7iOHc5drCJhCO7F838Mvinecj sHFnVu5XpiHE2UtP+2r5rumABp68wySl3h9cXm72u3nX1XkCAlPt5yqB0608XqNwvZhF FcTg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=ru5cRPmsF9ZMmZyJkpTmhO87sRRfpND2S5AIZbRneS8=; b=PuCVJLWpQ2zeztIOapz2JSX8hUf8t2N6INuDWWLekwgHvk9fU0VHCp7jpvwpsZQOwA FG1N+cA6XvOsy+zHAw8RE43+OkZ5SL/e7wPhv+2rlAuHWWAVjQOo+XCtiuojPEQCmH6u HhUesCXC3JnrIjJPMwe8QyjNK8FhVXakumgYMDspnZ0YbciLcLiMbH/YE3MDeWGwL6i7 d3QklY32Nmqv77sEOXIeM0qg+wZB1KdFnkiebbbBT1Zm4PZYzGfuvo0lTI+MnUVi/NAi bJoS7y8tSghwsgj0E2NQymNFYeXTAWmxnQxbfzu75ncjgFpcJ0szQRIsYsix1wHZk8kB FFGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b="bQ/oHxfJ"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i133-20020a636d8b000000b005300dbf81d5si221738pgc.496.2023.05.19.10.21.53; Fri, 19 May 2023 10:22:06 -0700 (PDT) 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=@163.com header.s=s110527 header.b="bQ/oHxfJ"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230013AbjESRRb (ORCPT <rfc822;wlfightup@gmail.com> + 99 others); Fri, 19 May 2023 13:17:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229887AbjESRRa (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 19 May 2023 13:17:30 -0400 Received: from m12.mail.163.com (m12.mail.163.com [220.181.12.198]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 333AF103; Fri, 19 May 2023 10:17:28 -0700 (PDT) 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=bQ/oHxfJne6jh2qRAo3sJ DIGM3BeIyQS4NwLwTtBLv7uJZ40NmH11M7SaHCtIpQkipYii1pRcvvV/UjWaytxe EKzo0p7wyF7u96AYzwRmfOl3KE00TThbwfejCSnN4WFzhm4XprXnMy9l87/VcqTA rzmV02ufCu8gDUdAhOTLv4= Received: from lizhe.. (unknown [120.245.132.248]) by zwqz-smtp-mta-g2-0 (Coremail) with SMTP id _____wC3XiPdrmdkLUBgAA--.35714S4; Sat, 20 May 2023 01:16:37 +0800 (CST) From: Lizhe <sensor1010@163.com> 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 <sensor1010@163.com> Subject: [PATCH] drivers/gpio : Remove redundant clearing of IRQ_TYPE_SENSE_MASK Date: Sat, 20 May 2023 01:16:11 +0800 Message-Id: <20230519171611.6810-1-sensor1010@163.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: _____wC3XiPdrmdkLUBgAA--.35714S4 X-Coremail-Antispam: 1Uf129KBjvdXoW7GFy8uF1xGF4rZF1fZw1fZwb_yoWDKwb_Cw n5Kay3Xw4rtFn8ZrnIka1xZrZFyw4DW3Z5urn5t3ZxArn5Zr13ursrW3WSyFW5Zr4I9FWU tayrCr4avFW7AjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7xRK6wZ7UUUUU== X-Originating-IP: [120.245.132.248] X-CM-SenderInfo: 5vhq20jurqiii6rwjhhfrp/xtbBohV0q1aEIQz7awAAsH X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766344020710908471?= X-GMAIL-MSGID: =?utf-8?q?1766344020710908471?= |
Series |
drivers/gpio : Remove redundant clearing of IRQ_TYPE_SENSE_MASK
|
|
Commit Message
Lizhe
May 19, 2023, 5:16 p.m. UTC
Before executing microchip_sgpio_irq_set_type(),
type has already been cleared IRQ_TYPE_SENSE_MASK, see __irq_set_trigger().
Signed-off-by: Lizhe <sensor1010@163.com>
---
arch/arm/plat-orion/gpio.c | 1 -
drivers/gpio/gpio-mvebu.c | 1 -
2 files changed, 2 deletions(-)
Comments
On Fri, May 19, 2023 at 7:17 PM Lizhe <sensor1010@163.com> wrote: > > Before executing microchip_sgpio_irq_set_type(), > type has already been cleared IRQ_TYPE_SENSE_MASK, see __irq_set_trigger(). > > Signed-off-by: Lizhe <sensor1010@163.com> > --- > 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 > Please split it into two patches. I can apply the second part but arch/arm is beyond my jurisdiction. While at it: is this platform even used at all? If so, then maybe we could migrate this driver to drivers/gpio/? Bart
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;