[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2f8abbad-a70c-4ff0-94c7-8a8a37ad0845@icloud.com>
Date: Fri, 3 Jan 2025 08:29:43 +0800
From: Zijun Hu <zijun_hu@...oud.com>
To: Fan Ni <nifan.cxl@...il.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Linus Walleij <linus.walleij@...aro.org>, Bartosz Golaszewski
<brgl@...ev.pl>, Uwe Kleine-König <ukleinek@...nel.org>,
James Bottomley <James.Bottomley@...senpartnership.com>,
Thomas Weißschuh <thomas@...ch.de>,
linux-kernel@...r.kernel.org, nvdimm@...ts.linux.dev,
linux-sound@...r.kernel.org, sparclinux@...r.kernel.org,
linux-block@...r.kernel.org, linux-cxl@...r.kernel.org,
linux1394-devel@...ts.sourceforge.net, arm-scmi@...r.kernel.org,
linux-efi@...r.kernel.org, linux-gpio@...r.kernel.org,
dri-devel@...ts.freedesktop.org, linux-mediatek@...ts.infradead.org,
linux-hwmon@...r.kernel.org, linux-media@...r.kernel.org,
linux-pwm@...r.kernel.org, linux-remoteproc@...r.kernel.org,
linux-scsi@...r.kernel.org, linux-usb@...r.kernel.org,
linux-serial@...r.kernel.org, netdev@...r.kernel.org,
Zijun Hu <quic_zijuhu@...cinc.com>,
Alison Schofield <alison.schofield@...el.com>
Subject: Re: [PATCH v4 01/11] libnvdimm: Replace namespace_match() with
device_find_child_by_name()
On 2025/1/3 02:17, Fan Ni wrote:
>> -
>> static bool is_idle(struct device *dev, struct nd_namespace_common *ndns)
>> {
>> struct nd_region *nd_region = to_nd_region(dev->parent);
>> @@ -168,7 +161,7 @@ ssize_t nd_namespace_store(struct device *dev,
>> goto out;
>> }
>>
>> - found = device_find_child(dev->parent, name, namespace_match);
>> + found = device_find_child_by_name(dev->parent, name);
> Looks good to me.
> Just one general question.
> The function device_find_child checks parent and parent->p, but
> device_find_child_by_name only checks parent although they share the
> code except the match function. Why that?
>
Thank you Fan for code review.
I did not touch device_find_child_by_name() parameter checking at
that time.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=903c44939abc02e2f3d6f2ad65fa090f7e5df5b6
since
[PATCH v5 05/12] will come finally.
https://lore.kernel.org/all/20241224-const_dfc_done-v5-5-6623037414d4@quicinc.com/
> Fan
Powered by blists - more mailing lists