public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Zijun Hu <zijun_hu@icloud.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	 "Rafael J. Wysocki" <rafael@kernel.org>,
	Tejun Heo <tj@kernel.org>,  Josef Bacik <josef@toxicpanda.com>,
	Jens Axboe <axboe@kernel.dk>,  Boris Burkov <boris@bur.io>,
	Davidlohr Bueso <dave@stgolabs.net>,
	 Jonathan Cameron <jonathan.cameron@huawei.com>,
	 Dave Jiang <dave.jiang@intel.com>,
	 Alison Schofield <alison.schofield@intel.com>,
	 Vishal Verma <vishal.l.verma@intel.com>,
	Ira Weiny <ira.weiny@intel.com>,
	 Dan Williams <dan.j.williams@intel.com>
Cc: Zijun Hu <zijun_hu@icloud.com>,
	linux-kernel@vger.kernel.org,  cgroups@vger.kernel.org,
	linux-block@vger.kernel.org,  linux-cxl@vger.kernel.org,
	Zijun Hu <quic_zijuhu@quicinc.com>,  Fan Ni <fan.ni@samsung.com>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>
Subject: [PATCH v5 4/8] driver core: Rename declaration parameter name for API device_find_child() cluster
Date: Tue, 24 Dec 2024 21:37:23 +0800	[thread overview]
Message-ID: <20241224-class_fix-v5-4-9eaaf7abe843@quicinc.com> (raw)
In-Reply-To: <20241224-class_fix-v5-0-9eaaf7abe843@quicinc.com>

From: Zijun Hu <quic_zijuhu@quicinc.com>

For APIs:
device_find_child()
device_for_each_child()
device_for_each_child_reverse()

Their declaration has parameter name 'dev', but their defination
changes the name to 'parent'.

Rename declaration name to defination 'parent' to make both have
the same name.

Reviewed-by: Fan Ni <fan.ni@samsung.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
---
 include/linux/device.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/linux/device.h b/include/linux/device.h
index 0e0bc9bfe0d15a8734bf3d34106300f4df6b5364..a9d928398895b062094b94f2c188cbe9951d7ac1 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -1074,14 +1074,14 @@ void device_del(struct device *dev);
 
 DEFINE_FREE(device_del, struct device *, if (_T) device_del(_T))
 
-int device_for_each_child(struct device *dev, void *data,
+int device_for_each_child(struct device *parent, void *data,
 			  int (*fn)(struct device *dev, void *data));
-int device_for_each_child_reverse(struct device *dev, void *data,
+int device_for_each_child_reverse(struct device *parent, void *data,
 				  int (*fn)(struct device *dev, void *data));
 int device_for_each_child_reverse_from(struct device *parent,
 				       struct device *from, const void *data,
 				       int (*fn)(struct device *, const void *));
-struct device *device_find_child(struct device *dev, const void *data,
+struct device *device_find_child(struct device *parent, const void *data,
 				 device_match_t match);
 struct device *device_find_child_by_name(struct device *parent,
 					 const char *name);

-- 
2.34.1


  parent reply	other threads:[~2024-12-24 13:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-24 13:37 [PATCH v5 0/8] driver core: class: Fix bug and code improvements for class APIs Zijun Hu
2024-12-24 13:37 ` [PATCH v5 1/8] driver core: class: Fix wild pointer dereferences in API class_dev_iter_next() Zijun Hu
2024-12-24 13:37 ` [PATCH v5 2/8] blk-cgroup: Fix class @block_class's subsystem refcount leakage Zijun Hu
2024-12-24 13:37 ` [PATCH v5 3/8] driver core: Move true expression out of if condition in 3 device finding APIs Zijun Hu
2024-12-24 13:37 ` Zijun Hu [this message]
2024-12-24 13:37 ` [PATCH v5 5/8] driver core: Correct parameter check for API device_for_each_child_reverse_from() Zijun Hu
2024-12-24 16:27   ` Jonathan Cameron
2024-12-24 13:37 ` [PATCH v5 6/8] driver core: Correct API device_for_each_child_reverse_from() prototype Zijun Hu
2024-12-24 13:37 ` [PATCH v5 7/8] driver core: Introduce device_iter_t for device iterating APIs Zijun Hu
2024-12-24 13:37 ` [PATCH v5 8/8] driver core: Move two simple APIs for finding child device to header Zijun Hu
2024-12-24 16:28   ` Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241224-class_fix-v5-4-9eaaf7abe843@quicinc.com \
    --to=zijun_hu@icloud.com \
    --cc=alison.schofield@intel.com \
    --cc=axboe@kernel.dk \
    --cc=boris@bur.io \
    --cc=cgroups@vger.kernel.org \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=dave@stgolabs.net \
    --cc=fan.ni@samsung.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=ira.weiny@intel.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=josef@toxicpanda.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=quic_zijuhu@quicinc.com \
    --cc=rafael@kernel.org \
    --cc=tj@kernel.org \
    --cc=vishal.l.verma@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox