A while back I started the introduction of the 'spi_delay' data type:
https://lore.kernel.org/linux-spi/20190926105147.7839-1-alexandru.ardelean@…
Users of the 'delay_usecs' were removed from drivers.
Now it's time to remove the 'delay_usecs' from the SPI subsystem and use
only the 'delay' field.
This changeset adapts all SPI drivers to do without 'delay_usecs'.
Additionally, for greybus we need to adapt it to use the 'delay' in
nano-seconds and convert it to micro-seconds.
Alexandru Ardelean (10):
spi: spi-axi-spi-engine: remove usage of delay_usecs
spi: bcm63xx-spi: don't check 'delay_usecs' field
spi: spi-bcm-qspi: replace 'delay_usecs' with 'delay.value' check
spi: spi-sh: replace 'delay_usecs' with 'delay.value' in pr_debug
spi: spi-tegra20-flash: don't check 'delay_usecs' field for spi
transfer
staging: greybus: spilib: use 'spi_delay_to_ns' for getting xfer delay
spi: spi-falcon: remove check for 'delay_usecs'
spi: fsl-espi: remove usage of 'delay_usecs' field
spi: core: remove 'delay_usecs' field from spi_transfer
spi: docs: update info about 'delay_usecs'
Documentation/spi/spi-summary.rst | 7 +++++--
drivers/spi/spi-axi-spi-engine.c | 12 ++++--------
drivers/spi/spi-bcm-qspi.c | 2 +-
drivers/spi/spi-bcm63xx.c | 2 +-
drivers/spi/spi-falcon.c | 2 +-
drivers/spi/spi-fsl-espi.c | 17 +++++------------
drivers/spi/spi-sh.c | 4 ++--
drivers/spi/spi-tegra20-sflash.c | 3 +--
drivers/spi/spi.c | 1 -
drivers/staging/greybus/spilib.c | 5 ++++-
include/linux/spi/spi.h | 12 ------------
11 files changed, 24 insertions(+), 43 deletions(-)
--
2.29.2
In gb_operation_response_send, get an extra reference
before gb_message_send() with this comment "/* Reference will
be dropped when message has been sent. */". Therefore, we
should drop the got reference not only in the error branch,
but also in the complete branch.
Signed-off-by: Lv Yunlong <lyl2019(a)mail.ustc.edu.cn>
---
drivers/greybus/operation.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/greybus/operation.c b/drivers/greybus/operation.c
index 8459e9bc0749..500b3fe53a04 100644
--- a/drivers/greybus/operation.c
+++ b/drivers/greybus/operation.c
@@ -855,6 +855,10 @@ static int gb_operation_response_send(struct gb_operation *operation,
if (ret)
goto err_put_active;
+ /*Drop reference after message send completes. */
+ gb_operation_put_active(operation);
+ gb_operation_put(operation);
+
return 0;
err_put_active:
--
2.25.1
In gb_operation_response_send, get an extra reference
before gb_message_send() with this comment "/* Reference will
be dropped when message has been sent. */". Therefore, we
should drop the got reference not only in the error branch,
but also in the complete branch.
Signed-off-by: Lv Yunlong <lyl2019(a)mail.ustc.edu.cn>
---
drivers/greybus/operation.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/greybus/operation.c b/drivers/greybus/operation.c
index 296f0b93d171..500b3fe53a04 100644
--- a/drivers/greybus/operation.c
+++ b/drivers/greybus/operation.c
@@ -855,7 +855,7 @@ static int gb_operation_response_send(struct gb_operation *operation,
if (ret)
goto err_put_active;
- /*Drop reference after message send successfully. */
+ /*Drop reference after message send completes. */
gb_operation_put_active(operation);
gb_operation_put(operation);
--
2.25.1
This series converts all existing users of strlcpy in drivers/staging to use
strscpy instead.
strlcpy is marked as deprecated in Documentation/process/deprecated.rst, and
there is no functional difference when the caller expects truncation (when not
checking the return value). strscpy is relatively better as it also avoids
scanning the whole source string.
This silences the related checkpatch warnings from:
5dbdb2d87c29 ("checkpatch: prefer strscpy to strlcpy")
The conversions were performed in two steps:
1. The following coccinelle script was used to identify and replace call sites
that expect truncation.
$ spatch --sp-file strscpy.cocci --include-headers --dir --in-place drivers/staging
@strscpy@
expression dest, src, size;
@@
-strlcpy(dest, src, size);
+strscpy(dest, src, size);
2. Each individual automated conversion was rechecked manually for correctness.
Kumar Kartikeya Dwivedi (13):
staging: comedi: Switch from strlcpy to strscpy
staging: greybus: Switch from strlcpy to strscpy
staging: fsl-dpaa2: Switch from strlcpy to strscpy
staging: most: Switch from strlcpy to strscpy
staging: nvec: Switch from strlcpy to strscpy
staging: octeon: Switch from strlcpy to strscpy
staging: olpc_dcon: Switch from strlcpy to strscpy
staging: rtl8188eu: Switch from strlcpy to strscpy
staging: rtl8192e: Switch from strlcpy to strscpy
staging: rtl8192u: Switch from strlcpy to strscpy
staging: rtl8712: Switch from strlcpy to strscpy
staging: sm750fb: Switch from strlcpy to strscpy
staging: wimax: Switch from strlcpy to strscpy
drivers/staging/comedi/comedi_fops.c | 4 ++--
drivers/staging/fsl-dpaa2/ethsw/ethsw-ethtool.c | 6 +++---
drivers/staging/greybus/audio_helper.c | 2 +-
drivers/staging/greybus/audio_module.c | 2 +-
drivers/staging/greybus/audio_topology.c | 6 +++---
drivers/staging/greybus/power_supply.c | 2 +-
drivers/staging/greybus/spilib.c | 4 ++--
drivers/staging/most/sound/sound.c | 2 +-
drivers/staging/most/video/video.c | 6 +++---
drivers/staging/nvec/nvec_ps2.c | 4 ++--
drivers/staging/octeon/ethernet-mdio.c | 6 +++---
drivers/staging/olpc_dcon/olpc_dcon.c | 2 +-
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 2 +-
drivers/staging/rtl8192e/rtl8192e/rtl_ethtool.c | 6 +++---
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c | 2 +-
drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 2 +-
drivers/staging/sm750fb/sm750.c | 2 +-
drivers/staging/wimax/i2400m/netdev.c | 6 +++---
drivers/staging/wimax/i2400m/usb.c | 4 ++--
19 files changed, 35 insertions(+), 35 deletions(-)
--
2.29.2