linux/drivers/platform/chrome
Tzung-Bi Shih ddec8e9e90 platform/chrome: cros_ec_spi: drop unneeded BUG_ON()
In the context, the following conditions are always false:

- `todo` < 0
Suppose that EC_SPI_FRAME_START is found at the last byte of transfer.

In the case, `ptr` == `end` - 1.  As a result, `todo` must be 0.

- `todo` > `ec_dev->din_size`
Suppose that there is no preamble bytes.  EC_SPI_FRAME_START is found at
the first byte of transfer.

In the case, `end` == `ptr` + EC_MSG_PREAMBLE_COUNT.
As a result, `todo` == EC_MSG_PREAMBLE_COUNT - 1.
However, it already checked `ec_dev->din_size` < EC_MSG_PREAMBLE_COUNT at
the beginning of function.

Drop the unneeded BUG_ON().

Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Link: https://lore.kernel.org/r/20220513044143.1045728-7-tzungbi@kernel.org
2022-05-16 10:01:51 +08:00
..
wilco_ec platform/chrome: wilco_ec: convert stream-like files from nonseekable_open -> stream_open 2021-03-30 18:25:22 +02:00
chromeos_acpi.c platform/chrome: Add ChromeOS ACPI device driver 2022-05-13 19:42:30 +08:00
chromeos_laptop.c platform/chrome: chromeos_laptop - Prepare complete software nodes 2021-04-10 21:43:02 +02:00
chromeos_privacy_screen.c platform/chrome: Add driver for ChromeOS privacy-screen 2022-01-10 12:17:37 +01:00
chromeos_pstore.c chrome platform changes for 5.8 2020-06-04 10:54:45 -07:00
chromeos_tbmc.c platform/chrome: chromeos_tbmc: Report wake events 2019-09-12 16:01:35 +02:00
cros_ec_chardev.c platform/chrome: Re-introduce cros_ec_cmd_xfer and use it for ioctls 2022-04-19 11:27:20 +08:00
cros_ec_debugfs.c platform/chrome: cros_ec_debugfs: detach log reader wq from devm 2022-03-31 16:56:48 -07:00
cros_ec_i2c.c platform/chrome: cros_ec_i2c: drop BUG_ON() in cros_ec_pkt_xfer_i2c() 2022-05-16 10:01:51 +08:00
cros_ec_ishtp.c platform/chrome: correct cros_ec_prepare_tx() usage 2022-05-16 10:01:51 +08:00
cros_ec_lightbar.c platform/chrome: Constify static attribute_group structs 2021-01-20 16:19:17 +01:00
cros_ec_lpc_mec.c platform/chrome: cros_ec_lpc: Use DEFINE_MUTEX() for mutex lock 2021-04-21 10:00:30 +02:00
cros_ec_lpc_mec.h platform/chrome: cros_ec: Remove cros_ec dependency in lpc_mec 2019-02-11 10:07:40 +01:00
cros_ec_lpc.c platform/chrome: correct cros_ec_prepare_tx() usage 2022-05-16 10:01:51 +08:00
cros_ec_proto.c platform/chrome: cros_ec_proto: drop BUG_ON() in cros_ec_get_host_event() 2022-05-16 10:01:51 +08:00
cros_ec_rpmsg.c platform/chrome: correct cros_ec_prepare_tx() usage 2022-05-16 10:01:51 +08:00
cros_ec_sensorhub_ring.c platform: chrome: Split trace include file 2022-03-31 16:56:29 -07:00
cros_ec_sensorhub_trace.h platform: chrome: Split trace include file 2022-03-31 16:56:29 -07:00
cros_ec_sensorhub.c platform/chrome: cros_ec_sensorhub: simplify getting .driver_data 2021-09-27 09:18:58 +02:00
cros_ec_spi.c platform/chrome: cros_ec_spi: drop unneeded BUG_ON() 2022-05-16 10:01:51 +08:00
cros_ec_sysfs.c platform/chrome: cros_ec_sysfs: Add cold-ap-off to sysfs reboot. 2021-01-20 16:19:17 +01:00
cros_ec_trace.c platform/chrome: cros_ec: Add command for regulator control. 2020-06-15 22:40:14 +01:00
cros_ec_trace.h platform: chrome: Split trace include file 2022-03-31 16:56:29 -07:00
cros_ec_typec.c platform/chrome: cros_ec_typec: Check for EC driver 2022-05-10 22:47:40 +00:00
cros_ec_vbc.c platform/chrome: Constify static attribute_group structs 2021-01-20 16:19:17 +01:00
cros_ec.c platform/chrome: cros_ec: append newline to all logs 2022-04-18 15:39:27 +08:00
cros_ec.h platform/chrome: cros_ec: Make cros_ec_unregister() return void 2022-02-09 13:00:43 +00:00
cros_kbd_led_backlight.c platform/chrome: cros_kbd_led_backlight: switch to SPDX identifier 2019-02-01 10:13:06 +01:00
cros_usbpd_logger.c platform/chrome: cros_usbpd_logger: Add __printf annotation to append_str() 2020-05-04 14:02:01 -07:00
cros_usbpd_notify.c platform/chrome: cros_ec_proto: Add version for ec_command 2021-09-30 10:09:47 +02:00
Kconfig platform/chrome: Add ChromeOS ACPI device driver 2022-05-13 19:42:30 +08:00
Makefile platform/chrome: Add ChromeOS ACPI device driver 2022-05-13 19:42:30 +08:00