lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <18dd5368-d583-44f3-8dd4-74c669ef3bf9@icloud.com>
Date: Thu, 5 Dec 2024 08:31:58 +0800
From: Zijun Hu <zijun_hu@...oud.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: 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, 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 00/11] driver core: Constify API device_find_child()

On 2024/12/5 08:10, Zijun Hu wrote:
> This patch series is to constify the following API:

This patch series is based on the lasted mainline commit
Commit: feffde684ac2 ("Merge tag 'for-6.13-rc1-tag' of
git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux")
to avoid potential conflict as much as possible.

> struct device *device_find_child(struct device *dev, void *data,
> 		int (*match)(struct device *dev, void *data));
> To :
> struct device *device_find_child(struct device *dev, const void *data,
> 				 device_match_t match);
> typedef int (*device_match_t)(struct device *dev, const void *data);
> 
> Why to constify the API?
> 
> - Protect caller's match data @*data which is for comparison and lookup
>   and the API does not actually need to modify @*data.
> 
> - Make the API's parameters (@match)() and @data have the same type as
>   all of other device finding APIs (bus|class|driver)_find_device().
> 
> - All kinds of existing device matching functions can be directly taken
>   as the API's argument, they were exported by driver core.
> 
> What to do?
> 
> - Patches [1/11, 3/11] prepare for constifying the API.
> 
> - Patch 4/11 constifies the API and adapt for its various subsystem usages.
> 
> - Remaining do cleanup for several usages with benefits brought above.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ