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: <20240210215147.77629-3-michael.zaidman@gmail.com>
Date: Sat, 10 Feb 2024 23:51:30 +0200
From: Michael Zaidman <michael.zaidman@...il.com>
To: chrysh@...istina-quast.de,
	daniel.beer@...rinstitute.com,
	jikos@...nel.org
Cc: linux-kernel@...r.kernel.org,
	linux-input@...r.kernel.org,
	linux-serial@...r.kernel.org,
	ilpo.jarvinen@...ux.intel.com,
	johan@...nel.org,
	gregkh@...uxfoundation.org,
	equinox@...c24.net,
	michael.zaidman@...il.com
Subject: [PATCH v1 02/19] hid-ft260: fix Wformat warning

Fixed compilation warning introduced by "hid-ft260: Add serial driver" patch
    https://lore.kernel.org/all/20231218093153.192268-1-contact@christina-quast.de/

  You are using:           gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0
  CC [M]  /home/michael/sw/hid-ft260/hid-ft260.o
In file included from ./include/linux/kernel.h:30,
                 from ./arch/x86/include/asm/percpu.h:27,
                 from ./arch/x86/include/asm/preempt.h:6,
                 from ./include/linux/preempt.h:79,
                 from ./include/linux/spinlock.h:56,
                 from ./include/linux/mmzone.h:8,
                 from ./include/linux/gfp.h:7,
                 from ./include/linux/slab.h:16,
                 from ./include/linux/hid.h:19,
                 from ./include/uapi/linux/hidraw.h:19,
                 from ./include/linux/hidraw.h:8,
                 from /home/michael/sw/hid-ft260/hid-ft260.c:12:
/home/michael/sw/hid-ft260/hid-ft260.c: In function ‘ft260_uart_write’:
/include/linux/kern_levels.h:5:25: warning: format ‘%ld’ expects argument of type ‘long int’,
but argument 3 has type ‘int’ [-Wformat=]
    5 | #define KERN_SOH        "\001"          /* ASCII Start Of Header */
      |                         ^~~~~~
/include/linux/printk.h:427:25: note: in definition of macro ‘printk_index_wrap’
  427 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
      |                         ^~~~
/include/linux/printk.h:528:9: note: in expansion of macro ‘printk’
  528 |         printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
      |         ^~~~~~
/include/linux/kern_levels.h:14:25: note: in expansion of macro ‘KERN_SOH’
   14 | #define KERN_INFO       KERN_SOH "6"    /* informational */
      |                         ^~~~~~~~
/include/linux/printk.h:528:16: note: in expansion of macro ‘KERN_INFO’
  528 |         printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
      |                ^~~~~~~~~
/home/michael/sw/hid-ft260/hid-ft260.c:38:25: note: in expansion of macro ‘pr_info’
   38 |                         pr_info("%s: " format, __func__, ##arg);          \
      |                         ^~~~~~~
/home/michael/sw/hid-ft260/hid-ft260.c:1231:9: note: in expansion of macro ‘ft260_dbg’
 1231 |         ft260_dbg("count: %ld, len: %d", count, len);
      |         ^~~~~~~~~

Signed-off-by: Michael Zaidman <michael.zaidman@...il.com>
---
 drivers/hid/hid-ft260.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hid/hid-ft260.c b/drivers/hid/hid-ft260.c
index 7273d401337a..a67c625c9165 100644
--- a/drivers/hid/hid-ft260.c
+++ b/drivers/hid/hid-ft260.c
@@ -1228,7 +1228,7 @@ static int ft260_uart_write(struct tty_struct *tty, const unsigned char *buf,
 	int len, ret;
 
 	len = kfifo_in_locked(&port->xmit_fifo, buf, count, &port->write_lock);
-	ft260_dbg("count: %ld, len: %d", count, len);
+	ft260_dbg("count: %d, len: %d", count, len);
 
 	ret = ft260_uart_transmit_chars(port);
 	if (ret < 0) {
-- 
2.40.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ