Skip to contentSkip to conversation

i2c-for-5.20-part2

GIT PULL Merged Wolfram Sang 4 participants 8 messages Aug 13, 2022 – Aug 14, 2022 I2C subsystem host drivers

lore
Share & tools
lore
#0 lore raw

The following changes since commit ffcf9c5700e49c0aee42dcba9a12ba21338e8136:

  x86: link vdso and boot with -z noexecstack --no-warn-rwx-segments (2022-08-10 18:30:09 -0700)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git tags/i2c-for-5.20-part2

for you to fetch changes up to fe99b819487dba848cddd3d4bf4beb8e653d7e9c:

docs: i2c: i2c-sysfs: fix hyperlinks (2022-08-11 23:25:05 +0200)

----------------------------------------------------------------
* two driver fixes for issues introduced this cycle
* one trivial driver improvement regarding ACPI
* more DTS conversion and additions
* documentation updates
* subsystem-wide move from strlcpy to strscpy

----------------------------------------------------------------
Chris Pringle (1):
i2c: kempld: Support ACPI I2C device declaration

Conor Dooley (1):
i2c: microchip-corei2c: fix erroneous late ack send

Kewei Xu (2):
dt-bindings: i2c: update bindings for mt8188 soc
i2c: mediatek: add i2c compatible for MT8188

Krzysztof Kozlowski (1):
dt-bindings: i2c: qcom,i2c-cci: convert to dtschema

Luca Ceresoli (7):
docs: i2c: i2c-protocol: update introductory paragraph
docs: i2c: i2c-protocol,smbus-protocol: remove nonsense words
docs: i2c: i2c-protocol: remove unused legend items
docs: i2c: smbus-protocol: improve DataLow/DataHigh definition
docs: i2c: instantiating-devices: add syntax coloring to dts and C blocks
docs: i2c: i2c-sysfs: improve wording
docs: i2c: i2c-sysfs: fix hyperlinks

Robin Reckmann (1):
i2c: qcom-geni: Fix GPI DMA buffer sync-back

Wolfram Sang (2):
i2c: move drivers from strlcpy to strscpy
i2c: move core from strlcpy to strscpy

with much appreciated quality assurance from
----------------------------------------------------------------
AngeloGioacchino Del Regno (1):
(Rev.) i2c: mediatek: add i2c compatible for MT8188

Bagas Sanjaya (1):
(Rev.) docs: i2c: smbus-protocol: improve DataLow/DataHigh definition

Caleb Connolly (1):
(Test) i2c: qcom-geni: Fix GPI DMA buffer sync-back

Konrad Dybcio (1):
(Rev.) i2c: qcom-geni: Fix GPI DMA buffer sync-back

Lewis Hanly (1):
(Test) i2c: microchip-corei2c: fix erroneous late ack send

Luca Weiss (1):
(Test) i2c: qcom-geni: Fix GPI DMA buffer sync-back

Matthias Brugger (1):
(Rev.) dt-bindings: i2c: update bindings for mt8188 soc

Qii Wang (2):
(Rev.) i2c: mediatek: add i2c compatible for MT8188 (Rev.) dt-bindings: i2c: update bindings for mt8188 soc

Rob Herring (1):
(Rev.) dt-bindings: i2c: qcom,i2c-cci: convert to dtschema

 .../devicetree/bindings/i2c/i2c-mt65xx.yaml        |   1 +
 .../devicetree/bindings/i2c/i2c-qcom-cci.txt       |  96 --------
 .../devicetree/bindings/i2c/qcom,i2c-cci.yaml      | 242 +++++++++++++++++++++
 Documentation/i2c/i2c-protocol.rst                 |  11 +-
 Documentation/i2c/i2c-sysfs.rst                    |  24 +-
 Documentation/i2c/instantiating-devices.rst        |  16 +-
 Documentation/i2c/smbus-protocol.rst               |   6 +-
 MAINTAINERS                                        |   2 +-
 drivers/i2c/busses/i2c-altera.c                    |   2 +-
 drivers/i2c/busses/i2c-aspeed.c                    |   2 +-
 drivers/i2c/busses/i2c-au1550.c                    |   2 +-
 drivers/i2c/busses/i2c-axxia.c                     |   2 +-
 drivers/i2c/busses/i2c-bcm-kona.c                  |   2 +-
 drivers/i2c/busses/i2c-brcmstb.c                   |   2 +-
 drivers/i2c/busses/i2c-cbus-gpio.c                 |   2 +-
 drivers/i2c/busses/i2c-cht-wc.c                    |   2 +-
 drivers/i2c/busses/i2c-cros-ec-tunnel.c            |   2 +-
 drivers/i2c/busses/i2c-davinci.c                   |   2 +-
 drivers/i2c/busses/i2c-digicolor.c                 |   2 +-
 drivers/i2c/busses/i2c-eg20t.c                     |   2 +-
 drivers/i2c/busses/i2c-emev2.c                     |   2 +-
 drivers/i2c/busses/i2c-exynos5.c                   |   2 +-
 drivers/i2c/busses/i2c-gpio.c                      |   2 +-
 drivers/i2c/busses/i2c-highlander.c                |   2 +-
 drivers/i2c/busses/i2c-hix5hd2.c                   |   2 +-
 drivers/i2c/busses/i2c-i801.c                      |   4 +-
 drivers/i2c/busses/i2c-ibm_iic.c                   |   2 +-
 drivers/i2c/busses/i2c-icy.c                       |   2 +-
 drivers/i2c/busses/i2c-imx-lpi2c.c                 |   2 +-
 drivers/i2c/busses/i2c-kempld.c                    |   1 +
 drivers/i2c/busses/i2c-lpc2k.c                     |   2 +-
 drivers/i2c/busses/i2c-meson.c                     |   2 +-
 drivers/i2c/busses/i2c-microchip-corei2c.c         |   2 +-
 drivers/i2c/busses/i2c-mt65xx.c                    |  45 +++-
 drivers/i2c/busses/i2c-mt7621.c                    |   2 +-
 drivers/i2c/busses/i2c-mv64xxx.c                   |   2 +-
 drivers/i2c/busses/i2c-mxs.c                       |   2 +-
 drivers/i2c/busses/i2c-nvidia-gpu.c                |   2 +-
 drivers/i2c/busses/i2c-omap.c                      |   2 +-
 drivers/i2c/busses/i2c-opal.c                      |   4 +-
 drivers/i2c/busses/i2c-parport.c                   |   2 +-
 drivers/i2c/busses/i2c-pxa.c                       |   2 +-
 drivers/i2c/busses/i2c-qcom-geni.c                 |   7 +-
 drivers/i2c/busses/i2c-qup.c                       |   2 +-
 drivers/i2c/busses/i2c-rcar.c                      |   2 +-
 drivers/i2c/busses/i2c-riic.c                      |   2 +-
 drivers/i2c/busses/i2c-rk3x.c                      |   2 +-
 drivers/i2c/busses/i2c-s3c2410.c                   |   2 +-
 drivers/i2c/busses/i2c-sh_mobile.c                 |   2 +-
 drivers/i2c/busses/i2c-simtec.c                    |   2 +-
 drivers/i2c/busses/i2c-taos-evm.c                  |   2 +-
 drivers/i2c/busses/i2c-tegra-bpmp.c                |   2 +-
 drivers/i2c/busses/i2c-tegra.c                     |   2 +-
 drivers/i2c/busses/i2c-uniphier-f.c                |   2 +-
 drivers/i2c/busses/i2c-uniphier.c                  |   2 +-
 drivers/i2c/busses/i2c-versatile.c                 |   2 +-
 drivers/i2c/busses/i2c-wmt.c                       |   2 +-
 drivers/i2c/i2c-core-base.c                        |   2 +-
 drivers/i2c/i2c-smbus.c                            |   2 +-
 59 files changed, 370 insertions(+), 181 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/i2c/i2c-qcom-cci.txt
 create mode 100644 Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
#1 lore raw
Quoted 2 lines · Wolfram Sang

* subsystem-wide move from strlcpy to strscpy

Hmm.

Looking around, we still do have a lot of those 'strlcpy()' users, but 99% of them don't use the return value.

And since 'strlcpy()' is complete and utter garbage exactly *BECAUSE* of the bad return value (it returns the length of the source string - but an untrusted and possibly unterminated source string is often the *problem* in the first place), that would make it fairly easy to convert the rest.

I see two possibilities:

(a) fix strlcpy() by making it return 'void', and leave all those 99%
of users alone, and convert the (few) cases that actually look at the return value to strscpy

(b) auto-convert (with a coccinelle script) all the 'strlcpy()' users
that don't care about the return value, and leave a few broken users of strlcpy around

I think (b) is the simpler thing, but I have no idea how to write a coccinelle patch that basically does "if return value of strlcpy is not used, convert the strlcpy to a strscpy".

I'd love to get rid of strlcpy() entirely, since it's such a horribly badly designed thing.

Linus

#2 lore raw
Quoted 8 lines

(b) auto-convert (with a coccinelle script) all the 'strlcpy()' users
that don't care about the return value, and leave a few broken users of strlcpy around

I think (b) is the simpler thing, but I have no idea how to write a coccinelle patch that basically does "if return value of strlcpy is not used, convert the strlcpy to a strscpy".

That shouldn't be hard. I'll give it a try tomorrow.

#3 lore raw
Quoted 10 lines · Wolfram Sang
Quoted 8 lines

(b) auto-convert (with a coccinelle script) all the 'strlcpy()' users
that don't care about the return value, and leave a few broken users of strlcpy around

I think (b) is the simpler thing, but I have no idea how to write a coccinelle patch that basically does "if return value of strlcpy is not used, convert the strlcpy to a strscpy".

That shouldn't be hard. I'll give it a try tomorrow.

So, I tried right away and it was really as easy as expected:

===
@@
@@
- strlcpy
+ strscpy
(...);
===

The ';' at the end ensures that spatch only looks for complete statements not containing anything more than expressed.

I pushed out a branch for the testbots now:

git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/strlcpy

Patch granularity might not be perfect currently, but for testing this should do.

All the best,

Wolfram

#4 lore raw
Quoted 22 lines · Wolfram Sang
Quoted 10 lines · Wolfram Sang
Quoted 8 lines

(b) auto-convert (with a coccinelle script) all the 'strlcpy()' users
that don't care about the return value, and leave a few broken users of strlcpy around

I think (b) is the simpler thing, but I have no idea how to write a coccinelle patch that basically does "if return value of strlcpy is not used, convert the strlcpy to a strscpy".

That shouldn't be hard. I'll give it a try tomorrow.

So, I tried right away and it was really as easy as expected:

===
@@
@@
- strlcpy
+ strscpy
(...);
===

Quoted 2 lines

The ';' at the end ensures that spatch only looks for complete statements not containing anything more than expressed.

This is correct.

julia

Quoted 13 lines

I pushed out a branch for the testbots now:

git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/strlcpy

Patch granularity might not be perfect currently, but for testing this should do.

All the best,

Wolfram

#5 lore raw
In reply to Wolfram Sang
Quoted 4 lines

I pushed out a branch for the testbots now:

git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/strlcpy

Pushed again with patches for userspace programs in 'tools/' and 'arch/um/os-Linux' removed. That was too late yesterday to notice them.

#6 lore raw
Quoted 3 lines

Pushed again with patches for userspace programs in 'tools/' and 'arch/um/os-Linux' removed. That was too late yesterday to notice them.

Got a 'success' message now from the buildbot for the above branch.

merge bot Merged
#7 lore raw
In reply to Wolfram Sang
The pull request you sent on Sat, 13 Aug 2022 17:42:27 +0200:

The pull request you sent on Sat, 13 Aug 2022 17:42:27 +0200:

Quoted 1 line

git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git tags/i2c-for-5.20-part2

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/04734361953b8cc30d5552c1abe907ccfc8bc0fa

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html