mirror-linux/drivers/platform/chrome
Francesco Dolcini fed99212ac treewide, serdev: change receive_buf() return type to size_t
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.

The need for this clean-up was noticed while fixing a warning, see
commit 94d0539425 ("Bluetooth: btnxpuart: fix recv_buf() return value").
Changing the callback prototype to return an unsigned seems the best way
to document the API and ensure that is properly used.

GNSS drivers implementation of serdev receive_buf() callback return
directly the return value of gnss_insert_raw(). gnss_insert_raw()
returns a signed int, however this is not an issue since the value
returned is always positive, because of the kfifo_in() implementation.
gnss_insert_raw() could be changed to return also an unsigned, however
this is not implemented here as request by the GNSS maintainer Johan
Hovold.

Suggested-by: Jiri Slaby <jirislaby@kernel.org>
Link: https://lore.kernel.org/all/087be419-ec6b-47ad-851a-5e1e3ea5cfcc@kernel.org/
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> #for-iio
Reviewed-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Acked-by: Maximilian Luz <luzmaximilian@gmail.com>  # for platform/surface
Acked-by: Lee Jones <lee@kernel.org>
Acked-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20240122180551.34429-1-francesco@dolcini.it
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-01-27 18:13:53 -08:00
..
wilco_ec platform/chrome/wilco_ec: Remove usage of the deprecated ida_simple_xx() API 2023-12-18 12:44:38 +08:00
Kconfig platform/chrome: kunit: make EC protocol tests independent 2023-10-05 18:11:36 +08:00
Makefile platform/chrome: kunit: make EC protocol tests independent 2023-10-05 18:11:36 +08:00
chromeos_acpi.c platform/chrome: chromeos_acpi: print hex string for ACPI_TYPE_BUFFER 2023-08-10 11:10:56 +08:00
chromeos_laptop.c
chromeos_privacy_screen.c
chromeos_pstore.c
chromeos_tbmc.c
cros_ec.c platform/chrome: cros_ec_lpc: Separate host command and irq disable 2023-10-28 11:13:25 +08:00
cros_ec.h platform/chrome: cros_ec_lpc: Separate host command and irq disable 2023-10-28 11:13:25 +08:00
cros_ec_chardev.c platform/chrome: cros_ec_chardev: Convert to platform remove callback returning void 2023-09-28 13:18:06 +08:00
cros_ec_debugfs.c platform/chrome: cros_ec_debugfs: Fix permissions for panicinfo 2023-11-21 21:10:44 +01:00
cros_ec_i2c.c platform/chrome: Switch i2c drivers back to use .probe() 2023-05-29 08:37:29 +08:00
cros_ec_ishtp.c platform/chrome: cros_ec_ishtp: use helper functions for connection 2023-12-06 11:33:46 +01:00
cros_ec_lightbar.c platform/chrome: cros_ec_lightbar: Convert to platform remove callback returning void 2023-09-28 13:18:06 +08:00
cros_ec_lpc.c platform/chrome: cros_ec_lpc: Separate host command and irq disable 2023-10-28 11:13:25 +08:00
cros_ec_lpc_mec.c
cros_ec_lpc_mec.h
cros_ec_proto.c platform/chrome: cros_ec_proto: Mark outdata as const 2023-10-04 11:40:54 +08:00
cros_ec_proto_test.c platform/chrome: kunit: make EC protocol tests independent 2023-10-05 18:11:36 +08:00
cros_ec_proto_test_util.c platform/chrome: kunit: make EC protocol tests independent 2023-10-05 18:11:36 +08:00
cros_ec_proto_test_util.h platform/chrome: kunit: make EC protocol tests independent 2023-10-05 18:11:36 +08:00
cros_ec_rpmsg.c
cros_ec_sensorhub.c
cros_ec_sensorhub_ring.c platform/chrome: sensorhub: Implement quickselect for median calculation 2023-11-13 12:46:42 +08:00
cros_ec_sensorhub_trace.h
cros_ec_spi.c platform/chrome: cros_ec_spi: Use %*ph for printing hexdump of a small buffer 2023-06-13 12:28:36 +08:00
cros_ec_sysfs.c platform/chrome: cros_ec_sysfs: Convert to platform remove callback returning void 2023-09-28 13:18:06 +08:00
cros_ec_trace.c
cros_ec_trace.h
cros_ec_typec.c USB/Thunderbolt changes for 6.7-rc1 2023-11-03 16:00:42 -10:00
cros_ec_typec.h
cros_ec_uart.c treewide, serdev: change receive_buf() return type to size_t 2024-01-27 18:13:53 -08:00
cros_ec_vbc.c platform/chrome: cros_ec_vbc: Fix -Warray-bounds warnings 2023-12-15 16:02:49 +08:00
cros_hps_i2c.c platform/chrome: Switch i2c drivers back to use .probe() 2023-05-29 08:37:29 +08:00
cros_kbd_led_backlight.c
cros_typec_switch.c platform/chrome: cros_typec_switch: Convert to platform remove callback returning void 2023-09-28 13:18:06 +08:00
cros_typec_vdm.c platform/chrome: cros_typec_vdm: Mark port_amode_ops const 2023-10-04 11:40:54 +08:00
cros_typec_vdm.h platform/chrome: cros_typec_vdm: Mark port_amode_ops const 2023-10-04 11:40:54 +08:00
cros_usbpd_logger.c platform/chrome: cros_usbpd_logger: Convert to platform remove callback returning void 2023-09-28 13:18:07 +08:00
cros_usbpd_notify.c platform/chrome: cros_usbpd_notify: Convert to platform remove callback returning void 2023-09-28 13:18:07 +08:00