mirror-linux/drivers/platform/surface
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
..
aggregator treewide, serdev: change receive_buf() return type to size_t 2024-01-27 18:13:53 -08:00
Kconfig platform/surface: aggregator: Move subsystem hub drivers to their own module 2022-07-02 11:23:25 +02:00
Makefile platform/surface: aggregator: Move subsystem hub drivers to their own module 2022-07-02 11:23:25 +02:00
surface3-wmi.c platform/surface: surface3-wmi: Convert to platform remove callback returning void 2023-09-21 18:31:18 +02:00
surface3_power.c platform/surface: surface3_power: Switch back to use struct i2c_driver's .probe() 2023-06-13 12:32:16 +02:00
surface_acpi_notify.c ACPI: utils: Introduce helper for _DEP list lookup 2023-12-19 18:25:00 +01:00
surface_aggregator_cdev.c platform/surface: aggregator-cdev: Convert to platform remove callback returning void 2023-09-21 18:31:19 +02:00
surface_aggregator_hub.c platform/surface: aggregator_registry: Fix target-ID of base-hub 2023-02-02 22:48:20 +01:00
surface_aggregator_registry.c platform/surface: aggregator-registry: Convert to platform remove callback returning void 2023-09-21 18:31:19 +02:00
surface_aggregator_tabletsw.c platform/surface: aggregator_tabletsw: Add support for book mode in POS subsystem 2023-05-30 11:20:30 +02:00
surface_dtx.c platform/surface: dtx: Convert to platform remove callback returning void 2023-09-21 18:31:19 +02:00
surface_gpe.c platform/surface: gpe: Convert to platform remove callback returning void 2023-09-21 18:31:19 +02:00
surface_hotplug.c platform/surface: hotplug: Convert to platform remove callback returning void 2023-09-21 18:31:19 +02:00
surface_platform_profile.c platform/surface: platform_profile: Propagate error if profile registration fails 2023-10-18 15:30:54 +02:00
surfacepro3_button.c ACPI: make remove callback of ACPI driver void 2022-11-23 19:11:22 +01:00