All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mtd: Avoid magic values
@ 2023-03-07 19:25 Miquel Raynal
  2023-03-07 20:31 ` Michael Walle
  2023-03-22 16:08 ` Miquel Raynal
  0 siblings, 2 replies; 3+ messages in thread
From: Miquel Raynal @ 2023-03-07 19:25 UTC (permalink / raw)
  To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
	Pratyush Yadav, Michael Walle, linux-mtd
  Cc: Miquel Raynal

Nvmem producer config ID "-1" is actually defined, so use the definition
rather than hardcoding it with a magic value.

Suggested-by: Michael Walle <michael@walle.cc>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
 drivers/mtd/mtdcore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
index e4e102585021..3f6fc45be1d2 100644
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -519,7 +519,7 @@ static int mtd_nvmem_add(struct mtd_info *mtd)
 	struct device_node *node = mtd_get_of_node(mtd);
 	struct nvmem_config config = {};
 
-	config.id = -1;
+	config.id = NVMEM_DEVID_NONE;
 	config.dev = &mtd->dev;
 	config.name = dev_name(&mtd->dev);
 	config.owner = THIS_MODULE;
-- 
2.34.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mtd: Avoid magic values
  2023-03-07 19:25 [PATCH] mtd: Avoid magic values Miquel Raynal
@ 2023-03-07 20:31 ` Michael Walle
  2023-03-22 16:08 ` Miquel Raynal
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Walle @ 2023-03-07 20:31 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
	Pratyush Yadav, linux-mtd

Am 2023-03-07 20:25, schrieb Miquel Raynal:
> Nvmem producer config ID "-1" is actually defined, so use the 
> definition
> rather than hardcoding it with a magic value.
> 
> Suggested-by: Michael Walle <michael@walle.cc>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>

Reviewed-by: Michael Walle <michael@walle.cc>

-michael

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mtd: Avoid magic values
  2023-03-07 19:25 [PATCH] mtd: Avoid magic values Miquel Raynal
  2023-03-07 20:31 ` Michael Walle
@ 2023-03-22 16:08 ` Miquel Raynal
  1 sibling, 0 replies; 3+ messages in thread
From: Miquel Raynal @ 2023-03-22 16:08 UTC (permalink / raw)
  To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	Tudor Ambarus, Pratyush Yadav, Michael Walle, linux-mtd

On Tue, 2023-03-07 at 19:25:36 UTC, Miquel Raynal wrote:
> Nvmem producer config ID "-1" is actually defined, so use the definition
> rather than hardcoding it with a magic value.
> 
> Suggested-by: Michael Walle <michael@walle.cc>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> Reviewed-by: Michael Walle <michael@walle.cc>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next.

Miquel

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-22 16:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-07 19:25 [PATCH] mtd: Avoid magic values Miquel Raynal
2023-03-07 20:31 ` Michael Walle
2023-03-22 16:08 ` Miquel Raynal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.