From patchwork Fri Jun 16 14:50:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 109182 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1407884vqr; Fri, 16 Jun 2023 08:04:50 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6/eRjzHNIPghF4rBXmk3ZwOBfFhyNLWV5mVtnRbu5jLlP9QuE5al0Fk7M7qy+aPKibczS7 X-Received: by 2002:a17:902:9a0b:b0:1b0:663e:4b10 with SMTP id v11-20020a1709029a0b00b001b0663e4b10mr1864000plp.64.1686927889794; Fri, 16 Jun 2023 08:04:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686927889; cv=none; d=google.com; s=arc-20160816; b=TmVnuI6PBj2jgqCAL3xs2VoghPw8KL7O6M7+zvUZFs8qKbgiSoP0iCNTR+DlUDyL2f C479+80Jz0+3r2xVkO5c/C1y/cn/JR9CCjWyeFrkc1jUFDORi+aFpnAfgoaYtEZ1ob2j Jj0O+8g3MNcqzNsRNHRh3imkTrV5/1NqyCWuSC9ZZONC+aLhzkRHXZwN2Izfqw25mcss 6hIotdlZ74d+TkLnOfcFzCY84+CfSYlpjRgC03KfD6N4OV3vkIok+zH62sjBmKtmbjM8 JAcvx5WyONmjnU0RWfSt8ri59ZN7uEO0/ZDd4dZaJC54A7+lLG2yB5pOfl8H9phzyKZc ALbQ== 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=9Zl76wLNVyHrmV++/Os1bzrvc2ks+JUUWvZhpt75qoI=; b=VeExkBpvBgJcai6id5/RMGh1MCaiLn5Ccyvm9/FMs+w3KtRok+OcClElehHpOfnbrY 8bxlDWxWLQ8TkA+A5Dg3GFntNtsZnzHNoqIX68Lhb0gLGUweBfgaGCCkziR1PAQUDGO8 HXNppKENtOYqbW+SPIA0Pz09A7IBHFr/MCJurGxLL2Js98l7XrGL63TfKAHC5eFrY2ey LUlL2A+tl7uYXorFYVhk2dlzIpPTOiBOkEa52WB5G4aTYnJt3K0x8E0EC8vivDiIxjBI bDbuNXE0ALgeXn8jKOfdoVMv1yQCetYOVRGFh2moZ36j16OGRYsgKT9u7Go8sBtShCcI 8wTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cbYt5RWI; 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=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z10-20020a170903018a00b001a637615a89si15910088plg.561.2023.06.16.08.04.26; Fri, 16 Jun 2023 08:04:49 -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=@kernel.org header.s=k20201202 header.b=cbYt5RWI; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345782AbjFPOuw (ORCPT + 99 others); Fri, 16 Jun 2023 10:50:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345755AbjFPOuo (ORCPT ); Fri, 16 Jun 2023 10:50:44 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A13330FB; Fri, 16 Jun 2023 07:50:43 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B9E3763E14; Fri, 16 Jun 2023 14:50:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 761F6C433C8; Fri, 16 Jun 2023 14:50:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686927041; bh=iuzlJEXzgeFTJGc5anLsg53cYdFe9bM3LmN+rmOZxp0=; h=From:To:Cc:Subject:Date:From; b=cbYt5RWImunf6NH1W7o6L6MOYTWCXbHE/y+qRRmQKVcaPhRW2HX5icfdniiamszNn VMaXGYtz8Q/kfO0k3bxBEuLoQyFreRK03b4zybq7hib5/jhb3VtQ6nD1DGojhstaFN m67cJvqgqZnColKg3JhSiJRjaBo7ImapUF2D6RDJDkUSpZK3+IQfAK8DFCG1YgseoJ bjHap2/fnSC2IJOjoBFqyaPjQ0rNuE4YeSmgcQ89ePVYXTk8ct+1xuXDy6ehrFvoJT SDZ6iEOs6F8MGlBrpaOXWGLH68VGKzUsRIJVHygovxkm4qUECH/OchC4gzagqAEoaf T8tWnZWrz09/A== From: Arnd Bergmann To: Shubhrajyoti Datta , Linus Walleij , Bartosz Golaszewski , Michal Simek , Manikanta Guntupalli Cc: Arnd Bergmann , Srinivas Neeli , Andy Shevchenko , linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] gpio: synq: remove unused zynq_gpio_irq_reqres/zynq_gpio_irq_relres Date: Fri, 16 Jun 2023 16:50:33 +0200 Message-Id: <20230616145036.3910153-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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?1768872098652410473?= X-GMAIL-MSGID: =?utf-8?q?1768872098652410473?= From: Arnd Bergmann The driver now uses the generic request/release callbacks, so the custom ones are no longer called. When building with -Woverride-init, gcc produces a warning about the duplicate entries: In file included from drivers/gpio/gpio-zynq.c:10: include/linux/gpio/driver.h:621:43: error: initialized field overwritten [-Werror=override-init] 621 | .irq_request_resources = gpiochip_irq_reqres, \ | ^~~~~~~~~~~~~~~~~~~ drivers/gpio/gpio-zynq.c:611:9: note: in expansion of macro 'GPIOCHIP_IRQ_RESOURCE_HELPERS' 611 | GPIOCHIP_IRQ_RESOURCE_HELPERS, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/gpio/driver.h:621:43: note: (near initialization for 'zynq_gpio_level_irqchip.irq_request_resources') 621 | .irq_request_resources = gpiochip_irq_reqres, \ | ^~~~~~~~~~~~~~~~~~~ drivers/gpio/gpio-zynq.c:625:9: note: in expansion of macro 'GPIOCHIP_IRQ_RESOURCE_HELPERS' 625 | GPIOCHIP_IRQ_RESOURCE_HELPERS, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/gpio/driver.h:622:43: error: initialized field overwritten [-Werror=override-init] 622 | .irq_release_resources = gpiochip_irq_relres | ^~~~~~~~~~~~~~~~~~~ Removing the old ones has no effect on the driver but avoids the warnings. Fixes: f569143935378 ("gpio: zynq: fix zynqmp_gpio not an immutable chip warning") Signed-off-by: Arnd Bergmann Reviewed-by: Linus Walleij --- drivers/gpio/gpio-zynq.c | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/drivers/gpio/gpio-zynq.c b/drivers/gpio/gpio-zynq.c index c334e46033bae..0a7264aabe488 100644 --- a/drivers/gpio/gpio-zynq.c +++ b/drivers/gpio/gpio-zynq.c @@ -575,26 +575,6 @@ static int zynq_gpio_set_wake(struct irq_data *data, unsigned int on) return 0; } -static int zynq_gpio_irq_reqres(struct irq_data *d) -{ - struct gpio_chip *chip = irq_data_get_irq_chip_data(d); - int ret; - - ret = pm_runtime_resume_and_get(chip->parent); - if (ret < 0) - return ret; - - return gpiochip_reqres_irq(chip, d->hwirq); -} - -static void zynq_gpio_irq_relres(struct irq_data *d) -{ - struct gpio_chip *chip = irq_data_get_irq_chip_data(d); - - gpiochip_relres_irq(chip, d->hwirq); - pm_runtime_put(chip->parent); -} - /* irq chip descriptor */ static const struct irq_chip zynq_gpio_level_irqchip = { .name = DRIVER_NAME, @@ -604,8 +584,6 @@ static const struct irq_chip zynq_gpio_level_irqchip = { .irq_unmask = zynq_gpio_irq_unmask, .irq_set_type = zynq_gpio_set_irq_type, .irq_set_wake = zynq_gpio_set_wake, - .irq_request_resources = zynq_gpio_irq_reqres, - .irq_release_resources = zynq_gpio_irq_relres, .flags = IRQCHIP_EOI_THREADED | IRQCHIP_EOI_IF_HANDLED | IRQCHIP_MASK_ON_SUSPEND | IRQCHIP_IMMUTABLE, GPIOCHIP_IRQ_RESOURCE_HELPERS, @@ -619,8 +597,6 @@ static const struct irq_chip zynq_gpio_edge_irqchip = { .irq_unmask = zynq_gpio_irq_unmask, .irq_set_type = zynq_gpio_set_irq_type, .irq_set_wake = zynq_gpio_set_wake, - .irq_request_resources = zynq_gpio_irq_reqres, - .irq_release_resources = zynq_gpio_irq_relres, .flags = IRQCHIP_MASK_ON_SUSPEND | IRQCHIP_IMMUTABLE, GPIOCHIP_IRQ_RESOURCE_HELPERS, };