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: <20241224-const_dfc_done-v5-2-6623037414d4@quicinc.com>
Date: Tue, 24 Dec 2024 21:05:01 +0800
From: Zijun Hu <zijun_hu@...oud.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: 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>, 
 Zijun Hu <zijun_hu@...oud.com>, 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>, 
 Jonathan Cameron <Jonathan.Cameron@...wei.com>
Subject: [PATCH v5 02/12] slimbus: core: Constify slim_eaddr_equal()

From: Zijun Hu <quic_zijuhu@...cinc.com>

bool slim_eaddr_equal(struct slim_eaddr *a, struct slim_eaddr *b)
does not modify @*a or @*b.

To prepare for constifying API device_find_child() later.

Constify this comparison function by simply changing its
parameter type to 'const struct slim_eaddr *'.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@...wei.com>
Signed-off-by: Zijun Hu <quic_zijuhu@...cinc.com>
---
 drivers/slimbus/core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/slimbus/core.c b/drivers/slimbus/core.c
index 65e5515f7555e2eb840fedaf2dc4cc5d76dbc089..b5d5bbb9fdb6614ffd578f5754226b50e394f0df 100644
--- a/drivers/slimbus/core.c
+++ b/drivers/slimbus/core.c
@@ -328,7 +328,8 @@ void slim_report_absent(struct slim_device *sbdev)
 }
 EXPORT_SYMBOL_GPL(slim_report_absent);
 
-static bool slim_eaddr_equal(struct slim_eaddr *a, struct slim_eaddr *b)
+static bool slim_eaddr_equal(const struct slim_eaddr *a,
+			     const struct slim_eaddr *b)
 {
 	return (a->manf_id == b->manf_id &&
 		a->prod_code == b->prod_code &&

-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ