mtd: mchp48l640: silence some uninitialized variable warnings
Subsystems (2)
PATCH 1/1 mtd: mchp48l640: silence some uninitialized variable warnings
Smatch complains that zero length read/writes will lead to an uninitalized return value. I don't know if that's possible, but it's nicer to return a zero literal anyway so let's do that.
---
People, when we add a new driver can we make sure the first commit uses the new prefered subsystem prefix? For example,
"mtd: mchp48l640: add support for microchip 48l640 EERAM"
^^^^^^^^^^
Otherwise it's not clear to me what I should use as a patch prefix.
drivers/mtd/devices/mchp48l640.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mtd/devices/mchp48l640.c +2 -2
@@ -229,7 +229,7 @@ static int mchp48l640_write(struct mtd_info *mtd, loff_t to, size_t len, woff += ws; } -return ret; +return 0 ; } static int mchp48l640_read_page(struct mtd_info *mtd, loff_t from, size_t len,
@@ -286,7 +286,7 @@ static int mchp48l640_read(struct mtd_info *mtd, loff_t from, size_t len, woff += ws; } -return ret; +return 0 ; };static const struct mchp48_caps mchp48l640_caps = {
Signature · 1 line
2.30.2
Hello Dan,
Quoted 6 lines · Dan Carpenter
Smatch complains that zero length read/writes will lead to an uninitalized return value. I don't know if that's possible, but it's nicer to return a zero literal anyway so let's do that.
Fixes 88d125026753 ("mtd: devices: add support for microchip 48l640 EERAM")Signed-off-by Dan Carpenter <[email protected]>
Quoted 7 lines
---
People, when we add a new driver can we make sure the first commit uses the new prefered subsystem prefix? For example,"mtd: mchp48l640: add support for microchip 48l640 EERAM"
^^^^^^^^^^Otherwise it's not clear to me what I should use as a patch prefix.
Ok, sorry...
Hmm... Colin already sent a fix for this, see:
https://lists.infradead.org/pipermail/linux-mtd/2021-June/087140.html
bye,
Heiko
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: [email protected]
Fabio Estevam
Reviewed-byQuoted 18 lines · Heiko Schocher
Hello Dan,
Quoted 6 lines · Dan Carpenter
Smatch complains that zero length read/writes will lead to an uninitalized return value. I don't know if that's possible, but it's nicer to return a zero literal anyway so let's do that.
Fixes 88d125026753 ("mtd: devices: add support for microchip 48l640 EERAM")Signed-off-by Dan Carpenter <[email protected]>Quoted 7 lines
---
People, when we add a new driver can we make sure the first commit uses the new prefered subsystem prefix? For example,"mtd: mchp48l640: add support for microchip 48l640 EERAM"
^^^^^^^^^^Otherwise it's not clear to me what I should use as a patch prefix.
Quoted 5 lines
Ok, sorry...
Hmm... Colin already sent a fix for this, see:
https://lists.infradead.org/pipermail/linux-mtd/2021-June/087140.html
Yes, both patches work, but I think Dan's solution is a bit clearer, so:
Thanks
Quoted 23 lines · Fabio Estevam
Quoted 22 lines · Heiko Schocher
Hello Dan,
Quoted 6 lines · Dan Carpenter
Smatch complains that zero length read/writes will lead to an uninitalized return value. I don't know if that's possible, but it's nicer to return a zero literal anyway so let's do that.
Fixes 88d125026753 ("mtd: devices: add support for microchip 48l640 EERAM")Signed-off-by Dan Carpenter <[email protected]>Quoted 7 lines
---
People, when we add a new driver can we make sure the first commit uses the new prefered subsystem prefix? For example,"mtd: mchp48l640: add support for microchip 48l640 EERAM"
^^^^^^^^^^Otherwise it's not clear to me what I should use as a patch prefix.
Ok, sorry...
Hmm... Colin already sent a fix for this, see:
Quoted 8 lines
Yes, both patches work, but I think Dan's solution is a bit clearer, so:
Reviewed-by Fabio Estevam <[email protected]>Thanks
Yep, I'm good with that.
Heiko Schocher
Reviewed-byHello Colin, Dan,
Quoted 26 lines · Colin Ian King
Quoted 25 lines · Fabio Estevam
Quoted 23 lines · Heiko Schocher
Hello Dan,
Quoted 6 lines · Dan Carpenter
Smatch complains that zero length read/writes will lead to an uninitalized return value. I don't know if that's possible, but it's nicer to return a zero literal anyway so let's do that.
Fixes 88d125026753 ("mtd: devices: add support for microchip 48l640 EERAM")Signed-off-by Dan Carpenter <[email protected]>Quoted 7 lines
---
People, when we add a new driver can we make sure the first commit uses the new prefered subsystem prefix? For example,"mtd: mchp48l640: add support for microchip 48l640 EERAM"
^^^^^^^^^^Otherwise it's not clear to me what I should use as a patch prefix.
Ok, sorry...
Hmm... Colin already sent a fix for this, see:
https://lists.infradead.org/pipermail/linux-mtd/2021-June/087140.html
Quoted 7 lines
Quoted 6 lines
Yes, both patches work, but I think Dan's solution is a bit clearer, so:
Reviewed-by Fabio Estevam <[email protected]>Thanks
Yep, I'm good with that.
+1
bye,
Heiko
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: [email protected]
Quoted 8 lines · Dan Carpenter
Smatch complains that zero length read/writes will lead to an uninitalized return value. I don't know if that's possible, but it's nicer to return a zero literal anyway so let's do that.
Fixes 88d125026753 ("mtd: devices: add support for microchip 48l640 EERAM")Signed-off-by Dan Carpenter <[email protected]>Reviewed-by Fabio Estevam <[email protected]>Reviewed-by Heiko Schocher <[email protected]>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/fixes, thanks.
Miquel