linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd: physmap_of_gemini: remove defined but not used symbol 'syscon_match'
@ 2020-04-03  8:15 Jason Yan
  2020-04-27 13:53 ` Miquel Raynal
  0 siblings, 1 reply; 4+ messages in thread
From: Jason Yan @ 2020-04-03  8:15 UTC (permalink / raw)
  To: miquel.raynal, richard, vigneshr, tglx, linux-mtd; +Cc: Jason Yan

It's not used by anyone now, remove it. Fix the following gcc warning:

drivers/mtd/maps/physmap-gemini.c:49:34: warning: ‘syscon_match’ defined
but not used [-Wunused-const-variable=]
 static const struct of_device_id syscon_match[] = {
                                  ^~~~~~~~~~~~

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
 drivers/mtd/maps/physmap-gemini.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/mtd/maps/physmap-gemini.c b/drivers/mtd/maps/physmap-gemini.c
index a289c8b5cabf..d4a46e159d38 100644
--- a/drivers/mtd/maps/physmap-gemini.c
+++ b/drivers/mtd/maps/physmap-gemini.c
@@ -46,11 +46,6 @@
 
 #define FLASH_PARALLEL_HIGH_PIN_CNT	(1 << 20)	/* else low pin cnt */
 
-static const struct of_device_id syscon_match[] = {
-	{ .compatible = "cortina,gemini-syscon" },
-	{ },
-};
-
 struct gemini_flash {
 	struct device *dev;
 	struct pinctrl *p;
-- 
2.17.2


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

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

* Re: [PATCH] mtd: physmap_of_gemini: remove defined but not used symbol 'syscon_match'
  2020-04-03  8:15 [PATCH] mtd: physmap_of_gemini: remove defined but not used symbol 'syscon_match' Jason Yan
@ 2020-04-27 13:53 ` Miquel Raynal
  2020-04-28 14:16   ` Linus Walleij
  0 siblings, 1 reply; 4+ messages in thread
From: Miquel Raynal @ 2020-04-27 13:53 UTC (permalink / raw)
  To: Jason Yan; +Cc: richard, tglx, linux-mtd, vigneshr, Linus Walleij

Hi Jason,

+ Linus W.

Jason Yan <yanaijie@huawei.com> wrote on Fri, 3 Apr 2020 16:15:44 +0800:

> It's not used by anyone now, remove it. Fix the following gcc warning:
> 
> drivers/mtd/maps/physmap-gemini.c:49:34: warning: ‘syscon_match’ defined
> but not used [-Wunused-const-variable=]
>  static const struct of_device_id syscon_match[] = {
>                                   ^~~~~~~~~~~~
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Jason Yan <yanaijie@huawei.com>
> ---

I am not sure this is the right solution. This compatible has been
added in this driver by Linus in 9d3b5086f6d4 ("mtd: physmap_of_gemini:
Handle pin control"). I believe he had a good reason to do so but you
are right that it is not used. Linus, any input?

>  drivers/mtd/maps/physmap-gemini.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/drivers/mtd/maps/physmap-gemini.c b/drivers/mtd/maps/physmap-gemini.c
> index a289c8b5cabf..d4a46e159d38 100644
> --- a/drivers/mtd/maps/physmap-gemini.c
> +++ b/drivers/mtd/maps/physmap-gemini.c
> @@ -46,11 +46,6 @@
>  
>  #define FLASH_PARALLEL_HIGH_PIN_CNT	(1 << 20)	/* else low pin cnt */
>  
> -static const struct of_device_id syscon_match[] = {
> -	{ .compatible = "cortina,gemini-syscon" },
> -	{ },
> -};
> -
>  struct gemini_flash {
>  	struct device *dev;
>  	struct pinctrl *p;

Thanks,
Miquèl

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

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

* Re: [PATCH] mtd: physmap_of_gemini: remove defined but not used symbol 'syscon_match'
  2020-04-27 13:53 ` Miquel Raynal
@ 2020-04-28 14:16   ` Linus Walleij
  2020-04-28 14:20     ` Miquel Raynal
  0 siblings, 1 reply; 4+ messages in thread
From: Linus Walleij @ 2020-04-28 14:16 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: Richard Weinberger, Thomas Gleixner, linux-mtd, Vignesh R, Jason Yan

On Mon, Apr 27, 2020 at 3:53 PM Miquel Raynal <miquel.raynal@bootlin.com> wrote:
> Jason Yan <yanaijie@huawei.com> wrote on Fri, 3 Apr 2020 16:15:44 +0800:
>
> > It's not used by anyone now, remove it. Fix the following gcc warning:
> >
> > drivers/mtd/maps/physmap-gemini.c:49:34: warning: ‘syscon_match’ defined
> > but not used [-Wunused-const-variable=]
> >  static const struct of_device_id syscon_match[] = {
> >                                   ^~~~~~~~~~~~
> >
> > Reported-by: Hulk Robot <hulkci@huawei.com>
> > Signed-off-by: Jason Yan <yanaijie@huawei.com>
> > ---
>
> I am not sure this is the right solution. This compatible has been
> added in this driver by Linus in 9d3b5086f6d4 ("mtd: physmap_of_gemini:
> Handle pin control"). I believe he had a good reason to do so but you
> are right that it is not used. Linus, any input?

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

It's probably just a remnant of earlier development, sorry for that.
We now locate the syscon by phandle:
rmap = syscon_regmap_lookup_by_phandle(np, "syscon");

Yours,
Linus Walleij

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

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

* Re: [PATCH] mtd: physmap_of_gemini: remove defined but not used symbol 'syscon_match'
  2020-04-28 14:16   ` Linus Walleij
@ 2020-04-28 14:20     ` Miquel Raynal
  0 siblings, 0 replies; 4+ messages in thread
From: Miquel Raynal @ 2020-04-28 14:20 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Richard Weinberger, Thomas Gleixner, linux-mtd, Vignesh R, Jason Yan

Hi Linus,

Linus Walleij <linus.walleij@linaro.org> wrote on Tue, 28 Apr 2020
16:16:55 +0200:

> On Mon, Apr 27, 2020 at 3:53 PM Miquel Raynal <miquel.raynal@bootlin.com> wrote:
> > Jason Yan <yanaijie@huawei.com> wrote on Fri, 3 Apr 2020 16:15:44 +0800:
> >  
> > > It's not used by anyone now, remove it. Fix the following gcc warning:
> > >
> > > drivers/mtd/maps/physmap-gemini.c:49:34: warning: ‘syscon_match’ defined
> > > but not used [-Wunused-const-variable=]
> > >  static const struct of_device_id syscon_match[] = {
> > >                                   ^~~~~~~~~~~~
> > >
> > > Reported-by: Hulk Robot <hulkci@huawei.com>
> > > Signed-off-by: Jason Yan <yanaijie@huawei.com>
> > > ---  
> >
> > I am not sure this is the right solution. This compatible has been
> > added in this driver by Linus in 9d3b5086f6d4 ("mtd: physmap_of_gemini:
> > Handle pin control"). I believe he had a good reason to do so but you
> > are right that it is not used. Linus, any input?  
> 
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
> 
> It's probably just a remnant of earlier development, sorry for that.
> We now locate the syscon by phandle:
> rmap = syscon_regmap_lookup_by_phandle(np, "syscon");

No problem, thanks for the confirmation.

Thanks,
Miquèl

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

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

end of thread, other threads:[~2020-04-28 14:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-03  8:15 [PATCH] mtd: physmap_of_gemini: remove defined but not used symbol 'syscon_match' Jason Yan
2020-04-27 13:53 ` Miquel Raynal
2020-04-28 14:16   ` Linus Walleij
2020-04-28 14:20     ` Miquel Raynal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).