[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d4d49b0c-7766-4f06-b098-ceee54ceeefb@icloud.com>
Date: Thu, 5 Dec 2024 21:16:12 +0800
From: Zijun Hu <zijun_hu@...oud.com>
To: Uwe Kleine-König <ukleinek@...nel.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.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, open-iscsi@...glegroups.com,
linux-usb@...r.kernel.org, linux-serial@...r.kernel.org,
netdev@...r.kernel.org, Zijun Hu <quic_zijuhu@...cinc.com>
Subject: Re: [PATCH v3 04/11] driver core: Constify API device_find_child()
then adapt for various usages
On 2024/12/5 18:41, Uwe Kleine-König wrote:
> On Thu, Dec 05, 2024 at 08:10:13AM +0800, Zijun Hu wrote:
>> diff --git a/arch/sparc/kernel/vio.c b/arch/sparc/kernel/vio.c
>> index 07933d75ac815160a2580dce39fde7653a9502e1..1a1a9d6b8f2e8dfedefafde846315a06a167fbfb 100644
>> --- a/arch/sparc/kernel/vio.c
>> +++ b/arch/sparc/kernel/vio.c
>> @@ -419,13 +419,13 @@ struct vio_remove_node_data {
>> u64 node;
>> };
>>
>> -static int vio_md_node_match(struct device *dev, void *arg)
>> +static int vio_md_node_match(struct device *dev, const void *arg)
>> {
>> struct vio_dev *vdev = to_vio_dev(dev);
>> - struct vio_remove_node_data *node_data;
>> + const struct vio_remove_node_data *node_data;
>> u64 node;
>>
>> - node_data = (struct vio_remove_node_data *)arg;
existing code has such cast
>> + node_data = (const struct vio_remove_node_data *)arg;
>
i just follow existing code here.
> You can just drop the cast here. But maybe that is better be done i a
> separate change.
>
agree, removing such casts may be another topic.
>> node = vio_vdev_node(node_data->hp, vdev);
>>
>
> Best regards
> Uwe
Powered by blists - more mailing lists