Hi everyone.
Is anyone else experiencing delays receiving email from this list?
I just received a bunch today (April 30) with some emails dating back as
far as Jan 15.
Thanks,
Mark
--
On Sat, Apr 27, 2019 at 05:27:25AM +0200, Nicholas Mc Guire wrote:
> wait_for_completion_timeout() returns unsigned long (0 on timeout or
> remaining jiffies) not int.
>
Yeah, but it's fine though because 10000 / 256 fits into int without a
problem.
I'm not sure this sort of patch is worth it when it's just a style
debate instead of a bugfix. I'm a little bit torn about this. In
Smatch, I run into this issue one in a while where Smatch doesn't know
if the timeout is less than int. Right now I hacked the DB to say that
these functions always return < INT_MAX.
Anyway, for sure the commit message should say that it's just a cleanup
and not a bugfix.
regards,
dan carpenter
From: Moses Christopher <moseschristopherb(a)gmail.com>
- Resolve the following warning from the Kconfig,
"WARNING: prefer 'help' over '---help---' for new help texts"
Signed-off-by: Moses Christopher <moseschristopherb(a)gmail.com>
---
drivers/staging/greybus/Kconfig | 44 ++++++++++++++++++++---------------------
1 file changed, 22 insertions(+), 22 deletions(-)
diff --git a/drivers/staging/greybus/Kconfig b/drivers/staging/greybus/Kconfig
index b571e4e8060b..2f5061b565a6 100644
--- a/drivers/staging/greybus/Kconfig
+++ b/drivers/staging/greybus/Kconfig
@@ -1,7 +1,7 @@
menuconfig GREYBUS
tristate "Greybus support"
depends on SYSFS
- ---help---
+ help
This option enables the Greybus driver core. Greybus is an
hardware protocol that was designed to provide Unipro with a
sane application layer. It was originally designed for the
@@ -19,7 +19,7 @@ if GREYBUS
config GREYBUS_ES2
tristate "Greybus ES3 USB host controller"
depends on USB
- ---help---
+ help
Select this option if you have a Toshiba ES3 USB device that
acts as a Greybus "host controller". This device is a bridge
from a USB device to a Unipro network.
@@ -30,7 +30,7 @@ config GREYBUS_ES2
config GREYBUS_AUDIO
tristate "Greybus Audio Class driver"
depends on SOUND
- ---help---
+ help
Select this option if you have a device that follows the
Greybus Audio Class specification.
@@ -39,7 +39,7 @@ config GREYBUS_AUDIO
config GREYBUS_BOOTROM
tristate "Greybus Bootrom Class driver"
- ---help---
+ help
Select this option if you have a device that follows the
Greybus Bootrom Class specification.
@@ -49,7 +49,7 @@ config GREYBUS_BOOTROM
config GREYBUS_CAMERA
tristate "Greybus Camera Class driver"
depends on MEDIA_SUPPORT && LEDS_CLASS_FLASH && BROKEN
- ---help---
+ help
Select this option if you have a device that follows the
Greybus Camera Class specification.
@@ -59,7 +59,7 @@ config GREYBUS_CAMERA
config GREYBUS_FIRMWARE
tristate "Greybus Firmware Download Class driver"
depends on SPI
- ---help---
+ help
Select this option if you have a device that follows the
Greybus Firmware Download Class specification.
@@ -69,7 +69,7 @@ config GREYBUS_FIRMWARE
config GREYBUS_HID
tristate "Greybus HID Class driver"
depends on HID && INPUT
- ---help---
+ help
Select this option if you have a device that follows the
Greybus HID Class specification.
@@ -79,7 +79,7 @@ config GREYBUS_HID
config GREYBUS_LIGHT
tristate "Greybus LED Class driver"
depends on LEDS_CLASS
- ---help---
+ help
Select this option if you have a device that follows the
Greybus LED Class specification.
@@ -88,7 +88,7 @@ config GREYBUS_LIGHT
config GREYBUS_LOG
tristate "Greybus Debug Log Class driver"
- ---help---
+ help
Select this option if you have a device that follows the
Greybus Debug Log Class specification.
@@ -97,7 +97,7 @@ config GREYBUS_LOG
config GREYBUS_LOOPBACK
tristate "Greybus Loopback Class driver"
- ---help---
+ help
Select this option if you have a device that follows the
Greybus Debug Log Class specification.
@@ -107,7 +107,7 @@ config GREYBUS_LOOPBACK
config GREYBUS_POWER
tristate "Greybus Powersupply Class driver"
depends on POWER_SUPPLY
- ---help---
+ help
Select this option if you have a device that follows the
Greybus Powersupply Class specification.
@@ -116,7 +116,7 @@ config GREYBUS_POWER
config GREYBUS_RAW
tristate "Greybus Raw Class driver"
- ---help---
+ help
Select this option if you have a device that follows the
Greybus Raw Class specification.
@@ -125,7 +125,7 @@ config GREYBUS_RAW
config GREYBUS_VIBRATOR
tristate "Greybus Vibrator Motor Class driver"
- ---help---
+ help
Select this option if you have a device that follows the
Greybus Vibrator Motor Class specification.
@@ -134,7 +134,7 @@ config GREYBUS_VIBRATOR
menuconfig GREYBUS_BRIDGED_PHY
tristate "Greybus Bridged PHY Class drivers"
- ---help---
+ help
Select this option to pick from a variety of Greybus Bridged
PHY class drivers. These drivers emulate a number of
different "traditional" busses by tunneling them over Greybus.
@@ -149,7 +149,7 @@ config GREYBUS_GPIO
tristate "Greybus GPIO Bridged PHY driver"
depends on GPIOLIB
select GPIOLIB_IRQCHIP
- ---help---
+ help
Select this option if you have a device that follows the
Greybus GPIO Bridged PHY Class specification.
@@ -159,7 +159,7 @@ config GREYBUS_GPIO
config GREYBUS_I2C
tristate "Greybus I2C Bridged PHY driver"
depends on I2C
- ---help---
+ help
Select this option if you have a device that follows the
Greybus I2C Bridged PHY Class specification.
@@ -169,7 +169,7 @@ config GREYBUS_I2C
config GREYBUS_PWM
tristate "Greybus PWM Bridged PHY driver"
depends on PWM
- ---help---
+ help
Select this option if you have a device that follows the
Greybus PWM Bridged PHY Class specification.
@@ -179,7 +179,7 @@ config GREYBUS_PWM
config GREYBUS_SDIO
tristate "Greybus SDIO Bridged PHY driver"
depends on MMC
- ---help---
+ help
Select this option if you have a device that follows the
Greybus SDIO Bridged PHY Class specification.
@@ -189,7 +189,7 @@ config GREYBUS_SDIO
config GREYBUS_SPI
tristate "Greybus SPI Bridged PHY driver"
depends on SPI
- ---help---
+ help
Select this option if you have a device that follows the
Greybus SPI Bridged PHY Class specification.
@@ -199,7 +199,7 @@ config GREYBUS_SPI
config GREYBUS_UART
tristate "Greybus UART Bridged PHY driver"
depends on TTY
- ---help---
+ help
Select this option if you have a device that follows the
Greybus UART Bridged PHY Class specification.
@@ -209,7 +209,7 @@ config GREYBUS_UART
config GREYBUS_USB
tristate "Greybus USB Host Bridged PHY driver"
depends on USB
- ---help---
+ help
Select this option if you have a device that follows the
Greybus USB Host Bridged PHY Class specification.
@@ -221,7 +221,7 @@ endif # GREYBUS_BRIDGED_PHY
config GREYBUS_ARCHE
tristate "Greybus Arche Platform driver"
depends on USB_HSIC_USB3613 || COMPILE_TEST
- ---help---
+ help
Select this option if you have an Arche device.
To compile this code as a module, chose M here: the module
--
2.11.0
Make use of the struct_size() helper instead of an open-coded version
in order to avoid any potential type mistakes, in particular in the
context in which this code is being used.
So, replace code of the following form:
sizeof(*resp) + props_count * sizeof(struct gb_power_supply_props_desc)
with:
struct_size(resp, props, props_count)
This code was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva <gustavo(a)embeddedor.com>
---
Changes in v2:
- Rebase on top of 47830c1127ef ("staging: greybus: power_supply: fix prop-descriptor request size")
drivers/staging/greybus/power_supply.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/greybus/power_supply.c b/drivers/staging/greybus/power_supply.c
index ae5c0285a942..34b40a409ea3 100644
--- a/drivers/staging/greybus/power_supply.c
+++ b/drivers/staging/greybus/power_supply.c
@@ -520,8 +520,8 @@ static int gb_power_supply_prop_descriptors_get(struct gb_power_supply *gbpsy)
op = gb_operation_create(connection,
GB_POWER_SUPPLY_TYPE_GET_PROP_DESCRIPTORS,
- sizeof(*req), sizeof(*resp) + props_count *
- sizeof(struct gb_power_supply_props_desc),
+ sizeof(*req),
+ struct_size(resp, props, props_count),
GFP_KERNEL);
if (!op)
return -ENOMEM;
--
2.21.0
Make use of the struct_size() helper instead of an open-coded version
in order to avoid any potential type mistakes, in particular in the
context in which this code is being used.
So, replace code of the following form:
sizeof(*resp) + props_count * sizeof(struct gb_power_supply_props_desc)
with:
struct_size(resp, props, props_count)
This code was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva <gustavo(a)embeddedor.com>
---
drivers/staging/greybus/power_supply.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/greybus/power_supply.c b/drivers/staging/greybus/power_supply.c
index 0529e5628c24..40cc2d462ba0 100644
--- a/drivers/staging/greybus/power_supply.c
+++ b/drivers/staging/greybus/power_supply.c
@@ -520,8 +520,8 @@ static int gb_power_supply_prop_descriptors_get(struct gb_power_supply *gbpsy)
op = gb_operation_create(connection,
GB_POWER_SUPPLY_TYPE_GET_PROP_DESCRIPTORS,
- sizeof(req), sizeof(*resp) + props_count *
- sizeof(struct gb_power_supply_props_desc),
+ sizeof(req),
+ struct_size(resp, props, props_count),
GFP_KERNEL);
if (!op)
return -ENOMEM;
--
2.21.0