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-next>] [day] [month] [year] [list]
Message-Id: <20250111-mips_ejtag_fdc-fix-v1-1-f4282a5ce239@aosc.io>
Date: Sat, 11 Jan 2025 01:38:51 +0800
From: Kexy Biscuit <kexybiscuit@...c.io>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>, 
 Jiri Slaby <jirislaby@...nel.org>, Serge Semin <fancer.lancer@...il.com>, 
 Thomas Bogendoerfer <tsbogend@...ha.franken.de>
Cc: linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org, 
 Kexy Biscuit <kexybiscuit@...c.io>
Subject: [PATCH] tty: mips_ejtag_fdc: Fix another passing incompatible
 pointer type warning

mips_ejtag_fdc_encode() method was changed to accept u8** since
ce7cbd9a6c81, but not all occurrences were changed to adapt it.

Some of the warnings or errors was fixed in a previous commit, this
commit fixes one more of them.

drivers/tty/mips_ejtag_fdc.c: In function ‘kgdbfdc_push_one’:
drivers/tty/mips_ejtag_fdc.c:1224:38: error: passing argument 1 of ‘mips_ejtag_fdc_encode’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 1224 |         word = mips_ejtag_fdc_encode(bufs, &kgdbfdc_wbuflen, 1);
      |                                      ^~~~
      |                                      |
      |                                      const char **
drivers/tty/mips_ejtag_fdc.c:216:57: note: expected ‘const u8 **’ {aka ‘const unsigned char **’} but argument is of type ‘const char **’
  216 | static struct fdc_word mips_ejtag_fdc_encode(const u8 **ptrs,
      |                                              ~~~~~~~~~~~^~~~

Fixes: ce7cbd9a6c81 ("tty: mips_ejtag_fdc: use u8 for character pointers")
Fixes: 188942f05ce4 ("tty: mips_ejtag_fdc: Fix passing incompatible pointer type warning")
Signed-off-by: Kexy Biscuit <kexybiscuit@...c.io>
---
 drivers/tty/mips_ejtag_fdc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/mips_ejtag_fdc.c b/drivers/tty/mips_ejtag_fdc.c
index afbf7738c7c47c3377560a3288fa95083dd1c6b0..1cc775e74f92d2c5e7a7b4bb500ff2ae758da8e0 100644
--- a/drivers/tty/mips_ejtag_fdc.c
+++ b/drivers/tty/mips_ejtag_fdc.c
@@ -1215,7 +1215,7 @@ static int kgdbfdc_read_char(void)
 /* push an FDC word from write buffer to TX FIFO */
 static void kgdbfdc_push_one(void)
 {
-	const char *bufs[1] = { kgdbfdc_wbuf };
+	const u8 *bufs[1] = { kgdbfdc_wbuf };
 	struct fdc_word word;
 	void __iomem *regs;
 	unsigned int i;

---
base-commit: 2144da25584eb10b84252230319b5783f6a83041
change-id: 20250111-mips_ejtag_fdc-fix-49bb1b5ef1bf

Best regards,
-- 
Kexy Biscuit <kexybiscuit@...c.io>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ