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>] [day] [month] [year] [list]
Message-ID: <ff858783dd1a716f2ca661fb4a814fad8cb1480a.1749561996.git.geert+renesas@glider.be>
Date: Tue, 10 Jun 2025 15:28:04 +0200
From: Geert Uytterhoeven <geert+renesas@...der.be>
To: Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
	Thomas Weißschuh <linux@...ssschuh.net>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-mips@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Geert Uytterhoeven <geert+renesas@...der.be>
Subject: [PATCH] MIPS: txx9: Constify bin_attribute arguments of txx9_sram_{read,write}()

If CONFIG_MACH_TX49XX=y:

    arch/mips/txx9/generic/setup.c: In function ‘txx9_sramc_init’:
    arch/mips/txx9/generic/setup.c:839:32: error: assignment to ‘ssize_t (*)(struct file *, struct kobject *, const struct bin_attribute *, char *, loff_t,  size_t)’ {aka ‘long int (*)(struct file *, struct kobject *, const struct bin_attribute *, char *, long long int,  long unsigned int)’} from incompatible pointer type ‘ssize_t (*)(struct file *, struct kobject *, struct bin_attribute *, char *, loff_t,  size_t)’ {aka ‘long int (*)(struct file *, struct kobject *, struct bin_attribute *, char *, long long int,  long unsigned int)’} [-Werror=incompatible-pointer-types]
      839 |         dev->bindata_attr.read = txx9_sram_read;
	  |                                ^
    arch/mips/txx9/generic/setup.c:840:33: error: assignment to ‘ssize_t (*)(struct file *, struct kobject *, const struct bin_attribute *, char *, loff_t,  size_t)’ {aka ‘long int (*)(struct file *, struct kobject *, const struct bin_attribute *, char *, long long int,  long unsigned int)’} from incompatible pointer type ‘ssize_t (*)(struct file *, struct kobject *, struct bin_attribute *, char *, loff_t,  size_t)’ {aka ‘long int (*)(struct file *, struct kobject *, struct bin_attribute *, char *, long long int,  long unsigned int)’} [-Werror=incompatible-pointer-types]
      840 |         dev->bindata_attr.write = txx9_sram_write;
	  |                                 ^

Fixes: 97d06802d10a2827 ("sysfs: constify bin_attribute argument of bin_attribute::read/write()")
Signed-off-by: Geert Uytterhoeven <geert+renesas@...der.be>
---
 arch/mips/txx9/generic/setup.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/mips/txx9/generic/setup.c b/arch/mips/txx9/generic/setup.c
index 0586ca7668b42eaa..5a37e8b234a39c14 100644
--- a/arch/mips/txx9/generic/setup.c
+++ b/arch/mips/txx9/generic/setup.c
@@ -776,7 +776,7 @@ struct txx9_sramc_dev {
 };
 
 static ssize_t txx9_sram_read(struct file *filp, struct kobject *kobj,
-			      struct bin_attribute *bin_attr,
+			      const struct bin_attribute *bin_attr,
 			      char *buf, loff_t pos, size_t size)
 {
 	struct txx9_sramc_dev *dev = bin_attr->private;
@@ -791,7 +791,7 @@ static ssize_t txx9_sram_read(struct file *filp, struct kobject *kobj,
 }
 
 static ssize_t txx9_sram_write(struct file *filp, struct kobject *kobj,
-			       struct bin_attribute *bin_attr,
+			       const struct bin_attribute *bin_attr,
 			       char *buf, loff_t pos, size_t size)
 {
 	struct txx9_sramc_dev *dev = bin_attr->private;
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ