<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/mtd, branch v6.19</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>Merge tag 'mtd/fixes-for-6.19-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux</title>
<updated>2026-01-29T22:08:36+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-01-29T22:08:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e9f6ac972ec0139a7988fe713740a957aea5d999'/>
<id>e9f6ac972ec0139a7988fe713740a957aea5d999</id>
<content type='text'>
Pull MTD fix from Miquel Raynal:
 "A single late MTD fix, which reverts a fix that turned out to be
  incorrect.

  The observations of the committer was that the number of IDs to be
  used to probe a chip was incorrect. It happened to be a limitation of
  his controller, not a chip issue. Restore the chip description, a
  solution must be found somewhere else"

* tag 'mtd/fixes-for-6.19-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux:
  Revert "mtd: spinand: esmt: fix id code for F50D1G41LB"
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull MTD fix from Miquel Raynal:
 "A single late MTD fix, which reverts a fix that turned out to be
  incorrect.

  The observations of the committer was that the number of IDs to be
  used to probe a chip was incorrect. It happened to be a limitation of
  his controller, not a chip issue. Restore the chip description, a
  solution must be found somewhere else"

* tag 'mtd/fixes-for-6.19-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux:
  Revert "mtd: spinand: esmt: fix id code for F50D1G41LB"
</pre>
</div>
</content>
</entry>
<entry>
<title>treewide: Update email address</title>
<updated>2026-01-11T16:09:11+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@kernel.org</email>
</author>
<published>2026-01-11T15:53:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2e4b28c48f88ce9e263957b1d944cf5349952f88'/>
<id>2e4b28c48f88ce9e263957b1d944cf5349952f88</id>
<content type='text'>
In a vain attempt to consolidate the email zoo switch everything to the
kernel.org account.

Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In a vain attempt to consolidate the email zoo switch everything to the
kernel.org account.

Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "mtd: spinand: esmt: fix id code for F50D1G41LB"</title>
<updated>2025-12-16T08:08:28+00:00</updated>
<author>
<name>Ziyang Huang</name>
<email>hzyitc@outlook.com</email>
</author>
<published>2025-12-02T15:05:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2f6d2c8d9ac05a7a1c02333f6ad30868246880d8'/>
<id>2f6d2c8d9ac05a7a1c02333f6ad30868246880d8</id>
<content type='text'>
This reverts commit dd26402642a0899fde59ea6b0852fad3d799b4cc.

The issue George met is due to the limit of QPIC, not the issue of the
flash chip.

QPIC only supports 4 bytes ID. So the fifth byte is always 0.

If we use spi-gpio, the fifth byte can be read correctly.

Signed-off-by: Ziyang Huang &lt;hzyitc@outlook.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit dd26402642a0899fde59ea6b0852fad3d799b4cc.

The issue George met is due to the limit of QPIC, not the issue of the
flash chip.

QPIC only supports 4 bytes ID. So the fifth byte is always 0.

If we use spi-gpio, the fifth byte can be read correctly.

Signed-off-by: Ziyang Huang &lt;hzyitc@outlook.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'ubifs-for-linus-6.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs</title>
<updated>2025-12-08T23:50:27+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2025-12-08T23:50:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=70e3083ec686100682c146346efc2b3780d717df'/>
<id>70e3083ec686100682c146346efc2b3780d717df</id>
<content type='text'>
Pull UBI and UBIFS updates from Richard Weinberger:
 "UBIFS:
   - Misc code cleanups such as removal of unnecessary variables

  UBI:
   - No longer program unused bit in UBI headers"

* tag 'ubifs-for-linus-6.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs:
  ubifs: vmalloc(array_size()) -&gt; vmalloc_array()
  ubi: fastmap: fix ubi-&gt;fm memory leak
  mtd: ubi: skip programming unused bits in ubi headers
  ubifs: Remove unnecessary variable assignments
  ubifs: Simplify the code using ubifs_crc_node
  ubifs: Remove unnecessary parameters '*c'
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull UBI and UBIFS updates from Richard Weinberger:
 "UBIFS:
   - Misc code cleanups such as removal of unnecessary variables

  UBI:
   - No longer program unused bit in UBI headers"

* tag 'ubifs-for-linus-6.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs:
  ubifs: vmalloc(array_size()) -&gt; vmalloc_array()
  ubi: fastmap: fix ubi-&gt;fm memory leak
  mtd: ubi: skip programming unused bits in ubi headers
  ubifs: Remove unnecessary variable assignments
  ubifs: Simplify the code using ubifs_crc_node
  ubifs: Remove unnecessary parameters '*c'
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'mtd/for-6.19' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux</title>
<updated>2025-12-04T19:07:46+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2025-12-04T19:07:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=edd2b9832d604a234b60a4910c7496f351cd1e12'/>
<id>edd2b9832d604a234b60a4910c7496f351cd1e12</id>
<content type='text'>
Pull mtd updates from Miquel Raynal:
 "Core MTD changes:

   - We must ignore error -ENOENT from parsers on subpartitions which is
     a legitimate return value

   - PM support is added to the intel-dg driver

  Raw NAND changes:

   - The major change in this is the support for the Allwinner H616 NAND
     controller, which lead to numerous changes and cleanups in the
     driver.

   - Another notable change in this driver is the use of field_get() and
     field_prep(), but since the global support for this helpers is
     going to be merged in the same release as we start using these
     helpers, we undefine them in the first place to avoid warnings.

   - Marvell drivers layout handling changes have also landed, they fix
     previous definitions and abuses that have been made previously,
     which implied to relax the ECC parameters validation in the core a
     bit.

   - The Cadence NAND controller driver gets NV-DDR interface support.

  SPI NAND changes:

   - Support for FudanMicro FM25S01BI3 and ESMT F50L1G41LC is added.

  SPI NOR changes:

   - Fix SMPT parsing for S25FS-S flash family. They report variable
     dummy cycles for reads. This results in the default of 0 being
     used. This works for other Infineon chips, but not for the S25FS-S
     family. They need 8 dummy cycles. Add fixup hooks to specify that.
     Also add fixup hooks to fix incorrect map ID data in SFDP.

   - Add support for a bunch of Winbond flashes. Their block protection
     information is not discoverable, so they need to have an entry in
     the flash tables to describe that.

   - Some cleanups for Micron flash support.

   - Add support for Micron mt35xu01gbba.

   - Some SPI controllers like the Intel one on the PCI bus do not
     support the read CR opcode (0x35). Do not use the opcode if the
     controller does not support it.

  Aside from these main changes, there is the usual load of API updates,
  kdoc fixes, potential memory leaks fixes, etc"

* tag 'mtd/for-6.19' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: (51 commits)
  mtd: sm_ftl: Fix typo in comment in sm_read_lba
  mtd: sm_ftl: Replace deprecated strncpy with sysfs_emit in sm_attr_show
  mtd: lpddr_cmds: fix signed shifts in lpddr_cmds
  mtd: docg3: fix kernel-doc warnings
  mtd: spinand: add support for FudanMicro FM25S01BI3
  mtd: rawnand: renesas: Handle devm_pm_runtime_enable() errors
  mtd: nand: realtek-ecc: Fix Kconfig dependencies
  mtd: rawnand: sunxi: #undef field_{get,prep}() before local definition
  mailmap: update Pratyush Yadav's email address
  mtd: spi-nor: core: Check read CR support
  mtd: spi-nor: micron-st: add TODO for fixing mt35xu02gcba
  mtd: spi-nor: micron-st: add mt35xu01gbba support
  mtd: spi-nor: micron-st: use SFDP of mt35xu512aba
  mtd: spi-nor: micron-st: move set_octal_dtr to late_init()
  mtd: spi-nor: micron-st: rename the die_late_init functions
  mtd: spinand: esmt: add support for F50L1G41LC
  mtd: rawnand: lpc32xx_slc: Convert to use devm_gpiod_get_optional()
  mtd: mtdpart: ignore error -ENOENT from parsers on subpartitions
  mtd: maps: pcmciamtd: fix potential memory leak in pcmciamtd_detach()
  mtd: spi-nor: spansion: SMPT fixups for S25FS-S
  ...
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull mtd updates from Miquel Raynal:
 "Core MTD changes:

   - We must ignore error -ENOENT from parsers on subpartitions which is
     a legitimate return value

   - PM support is added to the intel-dg driver

  Raw NAND changes:

   - The major change in this is the support for the Allwinner H616 NAND
     controller, which lead to numerous changes and cleanups in the
     driver.

   - Another notable change in this driver is the use of field_get() and
     field_prep(), but since the global support for this helpers is
     going to be merged in the same release as we start using these
     helpers, we undefine them in the first place to avoid warnings.

   - Marvell drivers layout handling changes have also landed, they fix
     previous definitions and abuses that have been made previously,
     which implied to relax the ECC parameters validation in the core a
     bit.

   - The Cadence NAND controller driver gets NV-DDR interface support.

  SPI NAND changes:

   - Support for FudanMicro FM25S01BI3 and ESMT F50L1G41LC is added.

  SPI NOR changes:

   - Fix SMPT parsing for S25FS-S flash family. They report variable
     dummy cycles for reads. This results in the default of 0 being
     used. This works for other Infineon chips, but not for the S25FS-S
     family. They need 8 dummy cycles. Add fixup hooks to specify that.
     Also add fixup hooks to fix incorrect map ID data in SFDP.

   - Add support for a bunch of Winbond flashes. Their block protection
     information is not discoverable, so they need to have an entry in
     the flash tables to describe that.

   - Some cleanups for Micron flash support.

   - Add support for Micron mt35xu01gbba.

   - Some SPI controllers like the Intel one on the PCI bus do not
     support the read CR opcode (0x35). Do not use the opcode if the
     controller does not support it.

  Aside from these main changes, there is the usual load of API updates,
  kdoc fixes, potential memory leaks fixes, etc"

* tag 'mtd/for-6.19' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: (51 commits)
  mtd: sm_ftl: Fix typo in comment in sm_read_lba
  mtd: sm_ftl: Replace deprecated strncpy with sysfs_emit in sm_attr_show
  mtd: lpddr_cmds: fix signed shifts in lpddr_cmds
  mtd: docg3: fix kernel-doc warnings
  mtd: spinand: add support for FudanMicro FM25S01BI3
  mtd: rawnand: renesas: Handle devm_pm_runtime_enable() errors
  mtd: nand: realtek-ecc: Fix Kconfig dependencies
  mtd: rawnand: sunxi: #undef field_{get,prep}() before local definition
  mailmap: update Pratyush Yadav's email address
  mtd: spi-nor: core: Check read CR support
  mtd: spi-nor: micron-st: add TODO for fixing mt35xu02gcba
  mtd: spi-nor: micron-st: add mt35xu01gbba support
  mtd: spi-nor: micron-st: use SFDP of mt35xu512aba
  mtd: spi-nor: micron-st: move set_octal_dtr to late_init()
  mtd: spi-nor: micron-st: rename the die_late_init functions
  mtd: spinand: esmt: add support for F50L1G41LC
  mtd: rawnand: lpc32xx_slc: Convert to use devm_gpiod_get_optional()
  mtd: mtdpart: ignore error -ENOENT from parsers on subpartitions
  mtd: maps: pcmciamtd: fix potential memory leak in pcmciamtd_detach()
  mtd: spi-nor: spansion: SMPT fixups for S25FS-S
  ...
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'nand/for-6.19' into mtd/next</title>
<updated>2025-11-29T13:10:16+00:00</updated>
<author>
<name>Miquel Raynal</name>
<email>miquel.raynal@bootlin.com</email>
</author>
<published>2025-11-29T13:10:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=801b0840b09d93c51d23df9f92c063979058c153'/>
<id>801b0840b09d93c51d23df9f92c063979058c153</id>
<content type='text'>
Raw NAND changes:

* The major change in this MR will be the support for the Allwinner H616
  NAND controller, which lead to numerous changes and cleanups in the
  driver.

* Another notable change on this driver is the use of
  field_get()/field_prep(), but since the global support for this
  helpers is going to be merged in the same release as we start using
  these helpers, it implies undefining them in the first place to avoid
  warnings. Depending on the merging order (Yuri's bitmap branch or
  mtd/next), a temporary warning may arise.

* Marvell drivers layout handling changes have also landed, they fix
  previous definitions and abuses that have been made previously, which
  implied to relax the ECC parameters validation in the core a bit.

* The Cadence NAND controller driver gets NV-DDR interface support.

SPI NAND changes:

* Support for FudanMicro FM25S01BI3 and ESMT F50L1G41LC is added.

Aside from these main changes, there is the usual load of fixes and API
updates.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Raw NAND changes:

* The major change in this MR will be the support for the Allwinner H616
  NAND controller, which lead to numerous changes and cleanups in the
  driver.

* Another notable change on this driver is the use of
  field_get()/field_prep(), but since the global support for this
  helpers is going to be merged in the same release as we start using
  these helpers, it implies undefining them in the first place to avoid
  warnings. Depending on the merging order (Yuri's bitmap branch or
  mtd/next), a temporary warning may arise.

* Marvell drivers layout handling changes have also landed, they fix
  previous definitions and abuses that have been made previously, which
  implied to relax the ECC parameters validation in the core a bit.

* The Cadence NAND controller driver gets NV-DDR interface support.

SPI NAND changes:

* Support for FudanMicro FM25S01BI3 and ESMT F50L1G41LC is added.

Aside from these main changes, there is the usual load of fixes and API
updates.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'spi-nor/for-6.19' of https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux into mtd/next</title>
<updated>2025-11-29T13:06:31+00:00</updated>
<author>
<name>Miquel Raynal</name>
<email>miquel.raynal@bootlin.com</email>
</author>
<published>2025-11-29T13:06:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=de95c587981a9870a81e8e74c273aa72397d97ad'/>
<id>de95c587981a9870a81e8e74c273aa72397d97ad</id>
<content type='text'>
SPI NOR changes for 6.19

Notable changes:

- Fix SMPT parsing for S25FS-S flash family. They report variable dummy
  cycles for reads. This results in the default of 0 being used. This
  works for other Infineon chips, but not for the S25FS-S family. They
  need 8 dummy cycles. Add fixup hooks to specify that. Also add fixup
  hooks to fix incorrect map ID data in SFDP.

- Add support for a bunch of Winbond flashes. Their block protection
  information is not discoverable, so they need to have an entry in the
  flash tables to describe that.

- Some cleanups for Micron flash support.

- Add support for Micron mt35xu01gbba.

- Some SPI controllers like the Intel one on the PCI bus do not support
  the read CR opcode (0x35). Do not use the opcode if the controller
  does not support it.

# -----BEGIN PGP SIGNATURE-----
#
# iHUEABYKAB0WIQQTlUWNzXGEo3bFmyIR4drqP028CQUCaSjP+QAKCRAR4drqP028
# CfGsAQC5Vj+FaeQHyY+yywqM5wxE+xj6mMCDNixd2FVYlf5b7wEA2/9bpiHjy3qi
# 4MZmFJNcE+XsxReWDTBTZ6VbrjDlqg0=
# =M+s4
# -----END PGP SIGNATURE-----
# gpg: Signature made jeu. 27 nov. 2025 23:26:01 CET
# gpg:                using EDDSA key 1395458DCD7184A376C59B2211E1DAEA3F4DBC09
# gpg: Good signature from "Pratyush Yadav &lt;p.yadav@ti.com&gt;" [expired]
# gpg:                 aka "Pratyush Yadav &lt;me@yadavpratyush.com&gt;" [expired]
# gpg: p.yadav@ti.com: Verified 5 signatures in the past 3 years.  Encrypted 0 messages.
# gpg: me@yadavpratyush.com: Verified 5 signatures in the past 3 years.  Encrypted
#      0 messages.
# gpg: Note: This key has expired!
# Primary key fingerprint: 805C 3923 2FBE 108C 49E1  663C F650 3556 C11B 1CCD
#      Subkey fingerprint: 1395 458D CD71 84A3 76C5  9B22 11E1 DAEA 3F4D BC09
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
SPI NOR changes for 6.19

Notable changes:

- Fix SMPT parsing for S25FS-S flash family. They report variable dummy
  cycles for reads. This results in the default of 0 being used. This
  works for other Infineon chips, but not for the S25FS-S family. They
  need 8 dummy cycles. Add fixup hooks to specify that. Also add fixup
  hooks to fix incorrect map ID data in SFDP.

- Add support for a bunch of Winbond flashes. Their block protection
  information is not discoverable, so they need to have an entry in the
  flash tables to describe that.

- Some cleanups for Micron flash support.

- Add support for Micron mt35xu01gbba.

- Some SPI controllers like the Intel one on the PCI bus do not support
  the read CR opcode (0x35). Do not use the opcode if the controller
  does not support it.

# -----BEGIN PGP SIGNATURE-----
#
# iHUEABYKAB0WIQQTlUWNzXGEo3bFmyIR4drqP028CQUCaSjP+QAKCRAR4drqP028
# CfGsAQC5Vj+FaeQHyY+yywqM5wxE+xj6mMCDNixd2FVYlf5b7wEA2/9bpiHjy3qi
# 4MZmFJNcE+XsxReWDTBTZ6VbrjDlqg0=
# =M+s4
# -----END PGP SIGNATURE-----
# gpg: Signature made jeu. 27 nov. 2025 23:26:01 CET
# gpg:                using EDDSA key 1395458DCD7184A376C59B2211E1DAEA3F4DBC09
# gpg: Good signature from "Pratyush Yadav &lt;p.yadav@ti.com&gt;" [expired]
# gpg:                 aka "Pratyush Yadav &lt;me@yadavpratyush.com&gt;" [expired]
# gpg: p.yadav@ti.com: Verified 5 signatures in the past 3 years.  Encrypted 0 messages.
# gpg: me@yadavpratyush.com: Verified 5 signatures in the past 3 years.  Encrypted
#      0 messages.
# gpg: Note: This key has expired!
# Primary key fingerprint: 805C 3923 2FBE 108C 49E1  663C F650 3556 C11B 1CCD
#      Subkey fingerprint: 1395 458D CD71 84A3 76C5  9B22 11E1 DAEA 3F4D BC09
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: sm_ftl: Fix typo in comment in sm_read_lba</title>
<updated>2025-11-29T12:50:35+00:00</updated>
<author>
<name>Thorsten Blum</name>
<email>thorsten.blum@linux.dev</email>
</author>
<published>2025-11-24T12:31:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2158890a1af19e13ed222cda3623c8a11d3ec3b4'/>
<id>2158890a1af19e13ed222cda3623c8a11d3ec3b4</id>
<content type='text'>
s/is/if/

Signed-off-by: Thorsten Blum &lt;thorsten.blum@linux.dev&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
s/is/if/

Signed-off-by: Thorsten Blum &lt;thorsten.blum@linux.dev&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: sm_ftl: Replace deprecated strncpy with sysfs_emit in sm_attr_show</title>
<updated>2025-11-29T12:50:25+00:00</updated>
<author>
<name>Thorsten Blum</name>
<email>thorsten.blum@linux.dev</email>
</author>
<published>2025-11-23T18:21:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f3dc4d9898bc98e3cf569f038d90a5fec7bfc44a'/>
<id>f3dc4d9898bc98e3cf569f038d90a5fec7bfc44a</id>
<content type='text'>
strncpy() is deprecated [1] for NUL-terminated destination buffers
because it does not guarantee NUL termination. It also unnecessarily
NUL-pads the destination buffer if the source is shorter. Replace it
with sysfs_emit() using the "%.*s" format specifier and supply the
length 'sm_attr-&gt;len' to improve sm_attr_show().

Return the number of characters actually written to 'buf' instead of
'sm_attr-&gt;len'.

Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1]
Signed-off-by: Thorsten Blum &lt;thorsten.blum@linux.dev&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
strncpy() is deprecated [1] for NUL-terminated destination buffers
because it does not guarantee NUL termination. It also unnecessarily
NUL-pads the destination buffer if the source is shorter. Replace it
with sysfs_emit() using the "%.*s" format specifier and supply the
length 'sm_attr-&gt;len' to improve sm_attr_show().

Return the number of characters actually written to 'buf' instead of
'sm_attr-&gt;len'.

Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1]
Signed-off-by: Thorsten Blum &lt;thorsten.blum@linux.dev&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: lpddr_cmds: fix signed shifts in lpddr_cmds</title>
<updated>2025-11-29T12:50:19+00:00</updated>
<author>
<name>Ivan Stepchenko</name>
<email>sid@itb.spb.ru</email>
</author>
<published>2025-11-21T11:54:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c909fec69f84b39e63876c69b9df2c178c6b76ba'/>
<id>c909fec69f84b39e63876c69b9df2c178c6b76ba</id>
<content type='text'>
There are several places where a value of type 'int' is shifted by
lpddr-&gt;chipshift. lpddr-&gt;chipshift is derived from QINFO geometry and
might reach 31 when QINFO reports a 2 GiB size - the maximum supported by
LPDDR(1) compliant chips. This may cause unexpected sign-extensions when
casting the integer value to the type of 'unsigned long'.

Use '1UL &lt;&lt; lpddr-&gt;chipshift' and cast 'j' to unsigned long before
shifting so the computation is performed at the destination width.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: c68264711ca6 ("[MTD] LPDDR Command set driver")
Signed-off-by: Ivan Stepchenko &lt;sid@itb.spb.ru&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are several places where a value of type 'int' is shifted by
lpddr-&gt;chipshift. lpddr-&gt;chipshift is derived from QINFO geometry and
might reach 31 when QINFO reports a 2 GiB size - the maximum supported by
LPDDR(1) compliant chips. This may cause unexpected sign-extensions when
casting the integer value to the type of 'unsigned long'.

Use '1UL &lt;&lt; lpddr-&gt;chipshift' and cast 'j' to unsigned long before
shifting so the computation is performed at the destination width.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: c68264711ca6 ("[MTD] LPDDR Command set driver")
Signed-off-by: Ivan Stepchenko &lt;sid@itb.spb.ru&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
