[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2b0fe939-03aa-4c84-bfd9-b91edc9bfcb8@icloud.com>
Date: Tue, 17 Dec 2024 22:18:33 +0800
From: Zijun Hu <zijun_hu@...oud.com>
To: Jonathan Cameron <Jonathan.Cameron@...wei.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>, Tejun Heo <tj@...nel.org>,
Josef Bacik <josef@...icpanda.com>, Jens Axboe <axboe@...nel.dk>,
Boris Burkov <boris@....io>, Davidlohr Bueso <dave@...olabs.net>,
Alison Schofield <alison.schofield@...el.com>,
Vishal Verma <vishal.l.verma@...el.com>, Ira Weiny <ira.weiny@...el.com>,
Dan Williams <dan.j.williams@...el.com>, linux-kernel@...r.kernel.org,
cgroups@...r.kernel.org, linux-block@...r.kernel.org,
linux-cxl@...r.kernel.org, Zijun Hu <quic_zijuhu@...cinc.com>
Subject: Re: [PATCH v3 7/9] driver core: Correct parameter check for API
device_for_each_child_reverse_from()
On 2024/12/16 23:23, Jonathan Cameron wrote:
>> Correct the API's parameter @parent check by (!parent || !parent->p).
>>
>> Signed-off-by: Zijun Hu <quic_zijuhu@...cinc.com>
> Given that 'from' implies continuation of an iteration I can see why
> it might not ever be relevant to check parent. It's harmless, but to
> my mind unnecessary.
the extra check !parent has no overhead and make this check consistent
with others in the cluster. (^^)
Powered by blists - more mailing lists