Message ID | 20230602162258.63853-1-andriy.shevchenko@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1150786vqr; Fri, 2 Jun 2023 09:29:21 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7K8/RrdV1AiWmSb5aupU6nAuL5T0cwDVwxUpSad9ybBHWwJ2VWaxx1ozKpueLA+Ev+W7Sb X-Received: by 2002:a17:902:c405:b0:1b0:aec3:ed34 with SMTP id k5-20020a170902c40500b001b0aec3ed34mr364590plk.52.1685723361470; Fri, 02 Jun 2023 09:29:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685723361; cv=none; d=google.com; s=arc-20160816; b=T37R+B/SvjuxEvYJePf7VxP8YX+Jn6bbdF6lJXpv0sX0KYjPDDk8tFQjIQfj2HHeQP xCDtRT7QELitYGZa6AMKNtJcCEnbbtFoYGrGZCT03D/IBHXWsfj0CzzHPO5AicYEJxG3 Fg7e+YsS83GgFysoNKAu1/cncFWfxBst9DJCx+heRvdirZ3caIkwuJ85NNBBqeTNnlKz K3wtFDTdHlz8Nn3I0x94l9EVoymwyqmoMgYno3pFDIVMXmSdA10O8gSvqzvEedqJKiQP yPIEK89GhF7o2uL5V63fixr9rasROP6keDadYY7kMWcIloSCFf3hGvCMeVUH6HrMp97X 3oMg== 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=boR3A6rc3muSibTbmN2FNUChqnmzGV/m4xsgWnPDyao=; b=o6CVVgk/utc8KIOfVFBy0CMz3u/kxJ4DuMGW4e0O1s8rjuPTlQ8LdXWcHfmmte0KDg dBS3xSPM1pUCRSI8YyYdiQZ05IfABd8u8hlyK3krDOhVDP87+cIkx83c6YWuP5lJMAH8 q6Ny+Vph65y4R51KZiCIO6LUHGk5hS/eOV/7/Az7R6pVFj2TG1BGaOYym8LJ2MKJEEBI BXySFBkkecFCqATXOX3QbgBlmz+fy38U1cv5LPNiKTplSCv5ka/LlaQ1uWcIbS7sKUqA 1u641FL0NeZweqtZZXZjUZ4hcYYI9C8CHEoNNwHL+AFzechogrC+i4jih9/Fmk90bZOE VjWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Up1ywTy7; 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=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i12-20020a17090332cc00b001b19ceca240si1131203plr.169.2023.06.02.09.29.07; Fri, 02 Jun 2023 09:29:21 -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=@intel.com header.s=Intel header.b=Up1ywTy7; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236671AbjFBQXT (ORCPT <rfc822;limurcpp@gmail.com> + 99 others); Fri, 2 Jun 2023 12:23:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236669AbjFBQXP (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 2 Jun 2023 12:23:15 -0400 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3EA71134; Fri, 2 Jun 2023 09:23:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1685722988; x=1717258988; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=D6Q5rWGlpmHtwgVhN5Hie8Q59qagQZGIMKL1f1NJt28=; b=Up1ywTy7RRBKFG9CRzBRSc1c3jIjZUSDsJYlUu1C9n9Ui82bT19/7GrQ 9hgz+STt6aTZawW4a31cbsvY3WrTYO4DW0RrREZ21eHtU5ZXsDpNpWkD+ IP/ny+dwp5DAdLGEyqrewMyIkVsJAkXJgjznjuX/E1spEOe9zeyw/tEpv /yYI7SNjRM0Q2yOKxx9k0NjDEclyxe8OITNbZOX+6+PKwHAU4y/lZHeZr BYRSTDFjU51SHdzvIT7EsE6B2xpxj5z3qVssq18/qel9VRrq+ncRnsz4j /PPcS74+DNki8ZbJQq2d1683DVj64sZknIW7xbXMix/d7t/KOS2oM6AaR w==; X-IronPort-AV: E=McAfee;i="6600,9927,10729"; a="336271614" X-IronPort-AV: E=Sophos;i="6.00,213,1681196400"; d="scan'208";a="336271614" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jun 2023 09:22:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10729"; a="852214151" X-IronPort-AV: E=Sophos;i="6.00,213,1681196400"; d="scan'208";a="852214151" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 02 Jun 2023 09:22:53 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 7488A467; Fri, 2 Jun 2023 19:22:59 +0300 (EEST) From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> To: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Linus Walleij <linus.walleij@linaro.org>, Bartosz Golaszewski <brgl@bgdev.pl> Subject: [PATCH v1 1/1] gpiolib: Do not unexport GPIO on freeing Date: Fri, 2 Jun 2023 19:22:58 +0300 Message-Id: <20230602162258.63853-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.40.0.1.gaa8946217a0b MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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?1767609059338223522?= X-GMAIL-MSGID: =?utf-8?q?1767609059338223522?= |
Series |
[v1,1/1] gpiolib: Do not unexport GPIO on freeing
|
|
Commit Message
Andy Shevchenko
June 2, 2023, 4:22 p.m. UTC
Since the legacy exporting is gone with 2f804aca4832 ("gpiolib:
Kill unused GPIOF_EXPORT and Co") there is no need to unexport
GPIO on freeing. Remove that call.
Note, the other users of this functionality do that explicitly,
except one SH boardfile which doesn't free GPIO anyways, so it
is safe to drop the call.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/gpio/gpiolib.c | 2 --
1 file changed, 2 deletions(-)
Comments
On Fri, Jun 02, 2023 at 07:22:58PM +0300, Andy Shevchenko wrote: > Since the legacy exporting is gone with 2f804aca4832 ("gpiolib: > Kill unused GPIOF_EXPORT and Co") there is no need to unexport > GPIO on freeing. Remove that call. > > Note, the other users of this functionality do that explicitly, > except one SH boardfile which doesn't free GPIO anyways, so it > is safe to drop the call. Note, that this might be squashed with the above mentioned commit, because I haven't checked current users I didn't do the removal in that patch. But this will probably needs rebase which is not good thing process wise. So, just my 2 cents in case.
On Fri, Jun 02, 2023 at 07:29:00PM +0300, Andy Shevchenko wrote: > On Fri, Jun 02, 2023 at 07:22:58PM +0300, Andy Shevchenko wrote: > > Since the legacy exporting is gone with 2f804aca4832 ("gpiolib: > > Kill unused GPIOF_EXPORT and Co") there is no need to unexport > > GPIO on freeing. Remove that call. > > Note, the other users of this functionality do that explicitly, > > except one SH boardfile which doesn't free GPIO anyways, so it Actually OMAP3 as well with the same idea, once requested those never freed. Bart, should I update the commit message? > > is safe to drop the call. > > Note, that this might be squashed with the above mentioned commit, because > I haven't checked current users I didn't do the removal in that patch. > > But this will probably needs rebase which is not good thing process wise. > So, just my 2 cents in case.
On Fri, Jun 2, 2023 at 6:22 PM Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote: > Since the legacy exporting is gone with 2f804aca4832 ("gpiolib: > Kill unused GPIOF_EXPORT and Co") there is no need to unexport > GPIO on freeing. Remove that call. > > Note, the other users of this functionality do that explicitly, > except one SH boardfile which doesn't free GPIO anyways, so it > is safe to drop the call. > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Makes sense! Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Yours, Linus Walleij
On Fri, Jun 2, 2023 at 6:34 PM Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote: > > On Fri, Jun 02, 2023 at 07:29:00PM +0300, Andy Shevchenko wrote: > > On Fri, Jun 02, 2023 at 07:22:58PM +0300, Andy Shevchenko wrote: > > > Since the legacy exporting is gone with 2f804aca4832 ("gpiolib: > > > Kill unused GPIOF_EXPORT and Co") there is no need to unexport > > > GPIO on freeing. Remove that call. > > > > Note, the other users of this functionality do that explicitly, > > > except one SH boardfile which doesn't free GPIO anyways, so it > > Actually OMAP3 as well with the same idea, once requested those never freed. > Bart, should I update the commit message? > > > > is safe to drop the call. > > > > Note, that this might be squashed with the above mentioned commit, because > > I haven't checked current users I didn't do the removal in that patch. > > > > But this will probably needs rebase which is not good thing process wise. > > So, just my 2 cents in case. > > -- > With Best Regards, > Andy Shevchenko > > I did it myself when applying, thanks! Bart
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index a8da38ee721a..7a9c9934365a 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -2117,8 +2117,6 @@ static bool gpiod_free_commit(struct gpio_desc *desc) might_sleep(); - gpiod_unexport(desc); - spin_lock_irqsave(&gpio_lock, flags); gc = desc->gdev->chip;