From patchwork Tue May 30 16:20:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lizhe X-Patchwork-Id: 100976 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2305700vqr; Tue, 30 May 2023 09:27:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6/6sp6K4jRlUM94kfJYpBKSWkyAAkjuI5gpYPkcZb5bGlzMVdLVsbQQTXIKfVPBkaGHV0c X-Received: by 2002:a05:6a20:1610:b0:111:90f6:a847 with SMTP id l16-20020a056a20161000b0011190f6a847mr3352007pzj.38.1685464047311; Tue, 30 May 2023 09:27:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685464047; cv=none; d=google.com; s=arc-20160816; b=XSHNRNc2Pv0fJgT7244jLTGiLjlInjKEsExaWNa+YJ64h9LsPk1vlYdjni9O8Er0/V aqP3Fv4peysJm8IIWJEPxisiAGw8UqoMTGdfuzOcJkgzHx4Fn//2VqBAaPlv0svMbKoA LE49ANLs6mz0HHBQYy17r9jkLfwyfm3e+7BjELsCBXOCTjgWJ+ahnxuIc4qFDyCzRL25 1DbcicN5rfF0MZM+gEbs1iu8o+wNEfKDEcAyGu1shvRAFtaFMAfWvkQQAgsxWFyPv/uV C7htga2w4adjpmW/VRGl7kjbAiK3WnT0fKc8nh162VRc35oQoPfvWo2DVfHvZdMnysxm tFrw== 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=vhfIFhE13Fc+wDrJgXsIzemMaQvvvIuYkC9VN/VOpw9pcB5j9YFhSMWNl71kX9WdRF U8MC3/1p6EyHoSxE2cetb3TdOkNoK84KPsxS+iLaIpg+sPo0UuP+DYs/SrwMnfI+f/Yw hcb1TfUuPVNYgimsLRZ/Rirfk23h7q9uSiFgDharYJ/oo1xTgXuWYsvjWVC0FtE2TMf0 cx8xOmcA+jXfXnffSMhye59otBkFFlkAcG2znhD/PXETUjYgurxQUqDAluJ4c/qvYNTe IxkVpo5W0h5JdAJKRlmC82QfuF5yildyDzVTs1WgzGr09kd24cNlWjtKGO5h/1Duw3Gp aCfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=hbgaKTL4; 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 g13-20020a17090a7d0d00b002473e331f90si11298264pjl.46.2023.05.30.09.27.12; Tue, 30 May 2023 09:27:27 -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=hbgaKTL4; 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 S231354AbjE3QWH (ORCPT + 99 others); Tue, 30 May 2023 12:22:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230521AbjE3QWB (ORCPT ); Tue, 30 May 2023 12:22:01 -0400 Received: from m12.mail.163.com (m12.mail.163.com [220.181.12.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 161C49D; Tue, 30 May 2023 09:21:58 -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=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-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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767337148815344996?= X-GMAIL-MSGID: =?utf-8?q?1767337148815344996?= 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;