Thread (13 messages) 13 messages, 4 authors, 2023-12-18

Re: [PATCH v1] treewide, serdev: change receive_buf() return type to size_t

From: Johan Hovold <johan@kernel.org>
Date: 2023-12-15 13:36:37
Also in: chrome-platform, linux-arm-kernel, linux-bluetooth, linux-iio, linux-mediatek, linux-serial, linux-sound, lkml, platform-driver-x86

On Thu, Dec 14, 2023 at 06:01:46PM +0100, Francesco Dolcini wrote:
From: Francesco Dolcini <redacted>

receive_buf() is called from ttyport_receive_buf() that expects values
">= 0" from serdev_controller_receive_buf(), change its return type from
ssize_t to size_t.

Suggested-by: Jiri Slaby <jirislaby@kernel.org>
Link: https://lore.kernel.org/all/087be419-ec6b-47ad-851a-5e1e3ea5cfcc@kernel.org/ (local)
Signed-off-by: Francesco Dolcini <redacted>
---
 drivers/gnss/core.c                        |  6 +++---
 drivers/gnss/serial.c                      |  4 ++--
 drivers/gnss/sirf.c                        |  6 +++---
quoted hunk ↗ jump to hunk
diff --git a/drivers/gnss/core.c b/drivers/gnss/core.c
index 48f2ee0f78c4..9b8a0605ec76 100644
--- a/drivers/gnss/core.c
+++ b/drivers/gnss/core.c
@@ -317,10 +317,10 @@ EXPORT_SYMBOL_GPL(gnss_deregister_device);
  *
  * Must not be called for a closed device.
  */
-int gnss_insert_raw(struct gnss_device *gdev, const unsigned char *buf,
-				size_t count)
+size_t gnss_insert_raw(struct gnss_device *gdev, const unsigned char *buf,
+		       size_t count)
 {
-	int ret;
+	size_t ret;
 
 	ret = kfifo_in(&gdev->read_fifo, buf, count);
 
Why are you changing this function? This is part of the GNSS interface
and has nothing to do with the rest of this patch.

Greg, please drop this one again until this has been resolved.

Johan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help