Message ID | 20230907110305.2096052-1-masahiroy@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ab0a:0:b0:3f2:4152:657d with SMTP id m10csp41757vqo; Thu, 7 Sep 2023 10:24:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE+yoPaDjQgMXj/6JWFEDpicsF3Q/RvmGIhadiGA/obJgGCQUaN8AoF8gNGD2V88k0CNd7Z X-Received: by 2002:a05:6a20:320a:b0:13e:7a0a:36d8 with SMTP id hl10-20020a056a20320a00b0013e7a0a36d8mr332853pzc.9.1694107474924; Thu, 07 Sep 2023 10:24:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694107474; cv=none; d=google.com; s=arc-20160816; b=WAN2hM6C78G2a+MzcwF97y2WN1/Ng2DQPnXIQehfw6DWnny8lm+kQ8CiQqgpcAncv+ WXFqXbSKPIEM7qku6bf87xYi/HwFRiM851q9JL5LgmPDpOWo9WaMG/hK/MPv0XP64TKD vqUYhn2IRZZ2SjVf9epiF9H3b+bDg3GgHXbvKzlUkd+UYSQuXCIj6DhOAcwP0o75tENn VorW+WwpMGUioDH1iITbrOfQlDPDwUTS/qfBVl6QbEPrc43cGYYinZxH7+nYP4tz3+mH rPU6aTMx2zb2v/TX2bQdpqC3c1dMFsimvd2MKbxaxrh8b0+glYyX9NfR0LsTVUisy8cl GX/A== 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=s7WQRllpyMF4DIV+9RXY470MrlrKBNjMiQ3E2p3fW+o=; fh=i/ssIGqENGGc3lD56u2mFPrypDNAZR/jtSJg90MT5WQ=; b=h2KbbKhxU0bmhS4NXf5V0WpAE73fGukZfcvY0wzagBs/aLs/abGTZGZH8A8vIrTSbz TIocPNgcsb/zVyjC/zDlZbeYh2wV90wgfHyoOKhxyNusUN3TbhfZ0Ni3jF9k4lI7Wab3 CvBe2xGk+gPvphB4WWbb6GRv0mWJhTiwsA6wfSC/nMijkPrsSzIEWOUYDtWLMfDtjKxG vtHdbOxId4GIIGyFOYWlT2CqTsmdrn9o69swkVYZLq9+Vmf+TXKD6W3fXyzHdlw+XUYT ncajwTtrx2jl8KXoe/BYVL4eFiS2/zAEFkTB5jLWR4aqNLjBcRrHbDfBTr2I+C/EaFUH BMwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LApz67d4; 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 m9-20020a654389000000b00563d791d978si13182651pgp.750.2023.09.07.10.24.29; Thu, 07 Sep 2023 10:24:34 -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=LApz67d4; 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 S240639AbjIGQcN (ORCPT <rfc822;ouuuleilei@gmail.com> + 37 others); Thu, 7 Sep 2023 12:32:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233163AbjIGQbk (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 7 Sep 2023 12:31:40 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E72613588 for <linux-kernel@vger.kernel.org>; Thu, 7 Sep 2023 09:21:14 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A690BC116B6; Thu, 7 Sep 2023 11:03:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694084591; bh=x231l01soUhHZY1UintuQFo1TgQhxF9ul7C5Syudzfk=; h=From:To:Cc:Subject:Date:From; b=LApz67d4TPv9yWMhOatFYjd6W6cDCqjGkHuICPHJ5MvXidHZbhWTpCzMT9KBx0e/S pgY/uX4vQYRE/OQHL2n69IPcpH4zG5WEi640v42iDsBcUeV7pdmVbndTAwdYSyHHje OcoPnvTjZL8qMq9ACwP623nBMGewXRlVrdJENXKoT8D4p856+GNmbm5MZMAKFiHk2x SH1l0usRbjsB8yVeTcKEy3q3kwEdz2Bv0H4087raT3PAysjehl6AGk6wAbGCBhF6xk rW+G32PJCGQEq/bGD7LVTxGylwoezMaN87urvH47Xy8iJUA9EbUSYC0z1IZP9N1V/l /g0wby+UCVkOg== From: Masahiro Yamada <masahiroy@kernel.org> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-kernel@vger.kernel.org, "Rafael J . Wysocki" <rafael@kernel.org>, Andy Shevchenko <andy@kernel.org>, Masahiro Yamada <masahiroy@kernel.org> Subject: [PATCH] devres: rename the first parameter of devm_add_action_or_reset() Date: Thu, 7 Sep 2023 20:03:05 +0900 Message-Id: <20230907110305.2096052-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS 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: INBOX X-GMAIL-THRID: 1776400439368840498 X-GMAIL-MSGID: 1776400439368840498 |
Series |
devres: rename the first parameter of devm_add_action_or_reset()
|
|
Commit Message
Masahiro Yamada
Sept. 7, 2023, 11:03 a.m. UTC
Fix a possible mistake in commit 410e7088e971 ("devres: Pass unique name
of the resource to devm_add_action_or_reset()").
The first parameter of devm_add_action_or_reset() is the associated
device. The name 'release' is confusing because it is often used for
dr_release_t in the devres context.
Rename it to 'dev'. No functional change intended.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
include/linux/device.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
On Thu, Sep 07, 2023 at 08:03:05PM +0900, Masahiro Yamada wrote: > Fix a possible mistake in commit 410e7088e971 ("devres: Pass unique name > of the resource to devm_add_action_or_reset()"). > > The first parameter of devm_add_action_or_reset() is the associated > device. The name 'release' is confusing because it is often used for > dr_release_t in the devres context. > > Rename it to 'dev'. No functional change intended. ... > -#define devm_add_action_or_reset(release, action, data) \ > - __devm_add_action_or_reset(release, action, data, #action) > +#define devm_add_action_or_reset(dev, action, data) \ > + __devm_add_action_or_reset(dev, action, data, #action) What about devm_add_action() and Co?
On Thu, Sep 7, 2023 at 11:24 PM Andy Shevchenko <andy@kernel.org> wrote: > > On Thu, Sep 07, 2023 at 08:03:05PM +0900, Masahiro Yamada wrote: > > Fix a possible mistake in commit 410e7088e971 ("devres: Pass unique name > > of the resource to devm_add_action_or_reset()"). > > > > The first parameter of devm_add_action_or_reset() is the associated > > device. The name 'release' is confusing because it is often used for > > dr_release_t in the devres context. > > > > Rename it to 'dev'. No functional change intended. > > ... > > > -#define devm_add_action_or_reset(release, action, data) \ > > - __devm_add_action_or_reset(release, action, data, #action) > > +#define devm_add_action_or_reset(dev, action, data) \ > > + __devm_add_action_or_reset(dev, action, data, #action) > > What about devm_add_action() and Co? I will fix devm_add_action too. Thanks. > -- > With Best Regards, > Andy Shevchenko > >
diff --git a/include/linux/device.h b/include/linux/device.h index 56d93a1ffb7b..1fa0e9cb5e01 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -403,8 +403,8 @@ static inline int __devm_add_action_or_reset(struct device *dev, void (*action)( return ret; } -#define devm_add_action_or_reset(release, action, data) \ - __devm_add_action_or_reset(release, action, data, #action) +#define devm_add_action_or_reset(dev, action, data) \ + __devm_add_action_or_reset(dev, action, data, #action) /** * devm_alloc_percpu - Resource-managed alloc_percpu