* [PATCH master 1/2] nvmem: regmap: fix use of uninitialized space with nvmem_regmap_register
@ 2021-06-19 3:32 Ahmad Fatoum
2021-06-19 3:32 ` [PATCH master 2/2] nvmem: fix mismatch between extern and inline stub prototypes Ahmad Fatoum
2021-06-21 5:02 ` [PATCH master 1/2] nvmem: regmap: fix use of uninitialized space with nvmem_regmap_register Sascha Hauer
0 siblings, 2 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2021-06-19 3:32 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
Looking through all instances of struct nvmem_config in the tree shows
that only the new nvmem_regmap_register failed to initialize all
members, e.g. config::read_only was uninitialized. Fix this up.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
drivers/nvmem/regmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvmem/regmap.c b/drivers/nvmem/regmap.c
index 346d2516f3c3..641e6413ba0b 100644
--- a/drivers/nvmem/regmap.c
+++ b/drivers/nvmem/regmap.c
@@ -60,7 +60,7 @@ static struct nvmem_bus nvmem_regmap_bus = {
struct nvmem_device *nvmem_regmap_register(struct regmap *map, const char *name)
{
- struct nvmem_config config;
+ struct nvmem_config config = {};
/* Can be retrofitted if needed */
if (regmap_get_reg_stride(map) != regmap_get_val_bytes(map))
--
2.29.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH master 2/2] nvmem: fix mismatch between extern and inline stub prototypes
2021-06-19 3:32 [PATCH master 1/2] nvmem: regmap: fix use of uninitialized space with nvmem_regmap_register Ahmad Fatoum
@ 2021-06-19 3:32 ` Ahmad Fatoum
2021-06-21 5:02 ` [PATCH master 1/2] nvmem: regmap: fix use of uninitialized space with nvmem_regmap_register Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2021-06-19 3:32 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
Building with nvmem cell support disabled shows a mismatch in the stub
prototype. Fix it up.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
include/linux/nvmem-consumer.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/nvmem-consumer.h b/include/linux/nvmem-consumer.h
index 5d3d72837be0..5f44cf00cdff 100644
--- a/include/linux/nvmem-consumer.h
+++ b/include/linux/nvmem-consumer.h
@@ -74,7 +74,7 @@ static inline void *nvmem_cell_get_and_read(struct device_node *np,
}
static inline int nvmem_cell_write(struct nvmem_cell *cell,
- const char *buf, size_t len)
+ void *buf, size_t len)
{
return -EOPNOTSUPP;
}
--
2.29.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH master 1/2] nvmem: regmap: fix use of uninitialized space with nvmem_regmap_register
2021-06-19 3:32 [PATCH master 1/2] nvmem: regmap: fix use of uninitialized space with nvmem_regmap_register Ahmad Fatoum
2021-06-19 3:32 ` [PATCH master 2/2] nvmem: fix mismatch between extern and inline stub prototypes Ahmad Fatoum
@ 2021-06-21 5:02 ` Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2021-06-21 5:02 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: barebox
On Sat, Jun 19, 2021 at 05:32:11AM +0200, Ahmad Fatoum wrote:
> Looking through all instances of struct nvmem_config in the tree shows
> that only the new nvmem_regmap_register failed to initialize all
> members, e.g. config::read_only was uninitialized. Fix this up.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> drivers/nvmem/regmap.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks
Sascha
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-06-21 5:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-19 3:32 [PATCH master 1/2] nvmem: regmap: fix use of uninitialized space with nvmem_regmap_register Ahmad Fatoum
2021-06-19 3:32 ` [PATCH master 2/2] nvmem: fix mismatch between extern and inline stub prototypes Ahmad Fatoum
2021-06-21 5:02 ` [PATCH master 1/2] nvmem: regmap: fix use of uninitialized space with nvmem_regmap_register Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox