All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mtd: gpmi: Remove noisy error message
@ 2014-11-11 16:01 Fabio Estevam
  2014-11-11 19:45 ` Richard Weinberger
  2014-12-17  0:27 ` Brian Norris
  0 siblings, 2 replies; 14+ messages in thread
From: Fabio Estevam @ 2014-11-11 16:01 UTC (permalink / raw)
  To: computersforpeace; +Cc: Fabio Estevam, linux-mtd, shijie8

mx28evk board has a socket for NAND flash that comes with no NAND flash
populated, and then we get this message on every boot:

[    1.657603] gpmi-nand 8000c000.gpmi-nand: driver registration failed: -19

,which is not very helpful, so get rid of this error message.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
index 959cb9b..1ecf0e3 100644
--- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
+++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
@@ -1828,7 +1828,6 @@ static int gpmi_nand_probe(struct platform_device *pdev)
 exit_nfc_init:
 	release_resources(this);
 exit_acquire_resources:
-	dev_err(this->dev, "driver registration failed: %d\n", ret);
 
 	return ret;
 }
-- 
1.9.1

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

* Re: [PATCH] mtd: gpmi: Remove noisy error message
  2014-11-11 16:01 [PATCH] mtd: gpmi: Remove noisy error message Fabio Estevam
@ 2014-11-11 19:45 ` Richard Weinberger
  2014-11-11 19:57   ` Fabio Estevam
  2014-12-17  0:27 ` Brian Norris
  1 sibling, 1 reply; 14+ messages in thread
From: Richard Weinberger @ 2014-11-11 19:45 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Huang Shijie, Brian Norris, linux-mtd

On Tue, Nov 11, 2014 at 5:01 PM, Fabio Estevam
<fabio.estevam@freescale.com> wrote:
> mx28evk board has a socket for NAND flash that comes with no NAND flash

Wouldn't it make more sense to fix your board's devicetree/boardfile
to not load the gpmi driver?

-- 
Thanks,
//richard

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

* Re: [PATCH] mtd: gpmi: Remove noisy error message
  2014-11-11 19:45 ` Richard Weinberger
@ 2014-11-11 19:57   ` Fabio Estevam
  2014-11-11 20:00     ` Richard Weinberger
  0 siblings, 1 reply; 14+ messages in thread
From: Fabio Estevam @ 2014-11-11 19:57 UTC (permalink / raw)
  To: Richard Weinberger; +Cc: Fabio Estevam, linux-mtd, Brian Norris, Huang Shijie

On Tue, Nov 11, 2014 at 5:45 PM, Richard Weinberger
<richard.weinberger@gmail.com> wrote:
> On Tue, Nov 11, 2014 at 5:01 PM, Fabio Estevam
> <fabio.estevam@freescale.com> wrote:
>> mx28evk board has a socket for NAND flash that comes with no NAND flash
>
> Wouldn't it make more sense to fix your board's devicetree/boardfile
> to not load the gpmi driver?

Then the people who populated the NAND flash in the socket would not
be able to use the NAND driver.

In my opinion, removing the error message would be better.

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

* Re: [PATCH] mtd: gpmi: Remove noisy error message
  2014-11-11 19:57   ` Fabio Estevam
@ 2014-11-11 20:00     ` Richard Weinberger
  2014-11-11 20:05       ` Fabio Estevam
  0 siblings, 1 reply; 14+ messages in thread
From: Richard Weinberger @ 2014-11-11 20:00 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Fabio Estevam, linux-mtd, Brian Norris, Huang Shijie

Am 11.11.2014 um 20:57 schrieb Fabio Estevam:
> On Tue, Nov 11, 2014 at 5:45 PM, Richard Weinberger
> <richard.weinberger@gmail.com> wrote:
>> On Tue, Nov 11, 2014 at 5:01 PM, Fabio Estevam
>> <fabio.estevam@freescale.com> wrote:
>>> mx28evk board has a socket for NAND flash that comes with no NAND flash
>>
>> Wouldn't it make more sense to fix your board's devicetree/boardfile
>> to not load the gpmi driver?
> 
> Then the people who populated the NAND flash in the socket would not
> be able to use the NAND driver.

By fixing your devicetree/boardfile I meant fixing *your* devicetree/boardfile
for *your* board and not for all others. :-)

Thanks,
//richard

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

* Re: [PATCH] mtd: gpmi: Remove noisy error message
  2014-11-11 20:00     ` Richard Weinberger
@ 2014-11-11 20:05       ` Fabio Estevam
  2014-11-11 20:10         ` Richard Weinberger
  0 siblings, 1 reply; 14+ messages in thread
From: Fabio Estevam @ 2014-11-11 20:05 UTC (permalink / raw)
  To: Richard Weinberger; +Cc: Fabio Estevam, linux-mtd, Brian Norris, Huang Shijie

On Tue, Nov 11, 2014 at 6:00 PM, Richard Weinberger <richard@nod.at> wrote:

> By fixing your devicetree/boardfile I meant fixing *your* devicetree/boardfile
> for *your* board and not for all others. :-)

It's not my board. It is a development board.

The board is arch/arm/boot/dts/imx28-evk.dts. This is a development
board that comes with a NAND socket.

It comes with no NAND flash populated. In this case on every boot we get the:

gpmi-nand 8000c000.gpmi-nand: driver registration failed: -19

,which isn't very helpful an this is what this patch tries to avoid.

I don't think we should change the dts.

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

* Re: [PATCH] mtd: gpmi: Remove noisy error message
  2014-11-11 20:05       ` Fabio Estevam
@ 2014-11-11 20:10         ` Richard Weinberger
  2014-11-11 20:16           ` Fabio Estevam
  0 siblings, 1 reply; 14+ messages in thread
From: Richard Weinberger @ 2014-11-11 20:10 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Fabio Estevam, linux-mtd, Brian Norris, Huang Shijie

Am 11.11.2014 um 21:05 schrieb Fabio Estevam:
> On Tue, Nov 11, 2014 at 6:00 PM, Richard Weinberger <richard@nod.at> wrote:
> 
>> By fixing your devicetree/boardfile I meant fixing *your* devicetree/boardfile
>> for *your* board and not for all others. :-)
> 
> It's not my board. It is a development board.
> 
> The board is arch/arm/boot/dts/imx28-evk.dts. This is a development
> board that comes with a NAND socket.
> 
> It comes with no NAND flash populated. In this case on every boot we get the:
> 
> gpmi-nand 8000c000.gpmi-nand: driver registration failed: -19
> 
> ,which isn't very helpful an this is what this patch tries to avoid.
> 
> I don't think we should change the dts.

If the development board has by default no NAND, disable the driver
in imx28-evk.dts file.
You can leave a comment how to enable the driver if an user creates
a new board based on this eval board with a NAND.

Thanks,
//richard

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

* Re: [PATCH] mtd: gpmi: Remove noisy error message
  2014-11-11 20:10         ` Richard Weinberger
@ 2014-11-11 20:16           ` Fabio Estevam
  2014-11-11 20:22             ` Richard Weinberger
  2014-11-26  3:18             ` Brian Norris
  0 siblings, 2 replies; 14+ messages in thread
From: Fabio Estevam @ 2014-11-11 20:16 UTC (permalink / raw)
  To: Richard Weinberger; +Cc: Fabio Estevam, linux-mtd, Brian Norris, Huang Shijie

On Tue, Nov 11, 2014 at 6:10 PM, Richard Weinberger <richard@nod.at> wrote:

> If the development board has by default no NAND, disable the driver
> in imx28-evk.dts file.

Again, people are free to put a NAND into the socket and just use it.

> You can leave a comment how to enable the driver if an user creates
> a new board based on this eval board with a NAND.

No, I don't think this is a good idea.

BTW, I don't see any other nand driver that prints error on the probe
error path like this one.

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

* Re: [PATCH] mtd: gpmi: Remove noisy error message
  2014-11-11 20:16           ` Fabio Estevam
@ 2014-11-11 20:22             ` Richard Weinberger
  2014-11-11 20:28               ` Fabio Estevam
  2014-11-26  3:18             ` Brian Norris
  1 sibling, 1 reply; 14+ messages in thread
From: Richard Weinberger @ 2014-11-11 20:22 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Fabio Estevam, linux-mtd, Brian Norris, Huang Shijie

Am 11.11.2014 um 21:16 schrieb Fabio Estevam:
> On Tue, Nov 11, 2014 at 6:10 PM, Richard Weinberger <richard@nod.at> wrote:
> 
>> If the development board has by default no NAND, disable the driver
>> in imx28-evk.dts file.
> 
> Again, people are free to put a NAND into the socket and just use it.

If people change their board they are free to fix their dts. :)

>> You can leave a comment how to enable the driver if an user creates
>> a new board based on this eval board with a NAND.
> 
> No, I don't think this is a good idea.
> 
> BTW, I don't see any other nand driver that prints error on the probe
> error path like this one.

mpc5121_nfc.c for example does. Before every "goto error" in mpc5121_nfc_probe()
it prints an error message.

Thanks,
//richard

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

* Re: [PATCH] mtd: gpmi: Remove noisy error message
  2014-11-11 20:22             ` Richard Weinberger
@ 2014-11-11 20:28               ` Fabio Estevam
  2014-11-11 20:31                 ` Richard Weinberger
  0 siblings, 1 reply; 14+ messages in thread
From: Fabio Estevam @ 2014-11-11 20:28 UTC (permalink / raw)
  To: Richard Weinberger; +Cc: Fabio Estevam, linux-mtd, Brian Norris, Huang Shijie

On Tue, Nov 11, 2014 at 6:22 PM, Richard Weinberger <richard@nod.at> wrote:
> Am 11.11.2014 um 21:16 schrieb Fabio Estevam:
>> On Tue, Nov 11, 2014 at 6:10 PM, Richard Weinberger <richard@nod.at> wrote:
>>
>>> If the development board has by default no NAND, disable the driver
>>> in imx28-evk.dts file.
>>
>> Again, people are free to put a NAND into the socket and just use it.
>
> If people change their board they are free to fix their dts. :)

Then in this case I need to remove PCI dts nodes as well, because my
dev boards do not come with a PCI device attached to it from the
factory ;-)

At least PCI driver does not complain about it on every boot ;-)

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

* Re: [PATCH] mtd: gpmi: Remove noisy error message
  2014-11-11 20:28               ` Fabio Estevam
@ 2014-11-11 20:31                 ` Richard Weinberger
  0 siblings, 0 replies; 14+ messages in thread
From: Richard Weinberger @ 2014-11-11 20:31 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Fabio Estevam, linux-mtd, Brian Norris, Huang Shijie

Am 11.11.2014 um 21:28 schrieb Fabio Estevam:
> On Tue, Nov 11, 2014 at 6:22 PM, Richard Weinberger <richard@nod.at> wrote:
>> Am 11.11.2014 um 21:16 schrieb Fabio Estevam:
>>> On Tue, Nov 11, 2014 at 6:10 PM, Richard Weinberger <richard@nod.at> wrote:
>>>
>>>> If the development board has by default no NAND, disable the driver
>>>> in imx28-evk.dts file.
>>>
>>> Again, people are free to put a NAND into the socket and just use it.
>>
>> If people change their board they are free to fix their dts. :)
> 
> Then in this case I need to remove PCI dts nodes as well, because my
> dev boards do not come with a PCI device attached to it from the
> factory ;-)
> 
> At least PCI driver does not complain about it on every boot ;-)

Maybe this is why nobody fixed the dts so far? ;-)

Thanks,
//richard

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

* Re: [PATCH] mtd: gpmi: Remove noisy error message
  2014-11-11 20:16           ` Fabio Estevam
  2014-11-11 20:22             ` Richard Weinberger
@ 2014-11-26  3:18             ` Brian Norris
  2014-11-26 11:44               ` Fabio Estevam
  1 sibling, 1 reply; 14+ messages in thread
From: Brian Norris @ 2014-11-26  3:18 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Fabio Estevam, Richard Weinberger, Huang Shijie, linux-mtd

On Tue, Nov 11, 2014 at 06:16:29PM -0200, Fabio Estevam wrote:
> BTW, I don't see any other nand driver that prints error on the probe
> error path like this one.

You're probably still going to see failure prints like

  nand: No NAND device found

in nand_scan_ident(), right? Or does driver probe fail earlier than that
somehow?

In general, I don't think you can expect non-discoverable hardware types
not to complain at all when you falsely declare them as "present" in the
device tree.

If this is really the only thing being printed though, I can apply the
patch. It's not worth too much more discussion anyway, IMO.

(BTW, one thing you have going for you; you *do* print something when
you successfully probe. The absence of such a message in your log tells
you almost as much as the failure print you're trying to remove does.)

Brian

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

* Re: [PATCH] mtd: gpmi: Remove noisy error message
  2014-11-26  3:18             ` Brian Norris
@ 2014-11-26 11:44               ` Fabio Estevam
  2014-11-26 13:35                 ` Richard Weinberger
  0 siblings, 1 reply; 14+ messages in thread
From: Fabio Estevam @ 2014-11-26 11:44 UTC (permalink / raw)
  To: Brian Norris; +Cc: Fabio Estevam, Richard Weinberger, Huang Shijie, linux-mtd

On Wed, Nov 26, 2014 at 1:18 AM, Brian Norris
<computersforpeace@gmail.com> wrote:
> On Tue, Nov 11, 2014 at 06:16:29PM -0200, Fabio Estevam wrote:
>> BTW, I don't see any other nand driver that prints error on the probe
>> error path like this one.
>
> You're probably still going to see failure prints like
>
>   nand: No NAND device found
>
> in nand_scan_ident(), right? Or does driver probe fail earlier than that
> somehow?

Yes, this is what I get currently:

[    1.645433] nand: No NAND device found
[    1.650372] gpmi-nand 8000c000.gpmi-nand: driver registration failed: -19

In my opinion the "No NAND device found" is enough.

Thanks

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

* Re: [PATCH] mtd: gpmi: Remove noisy error message
  2014-11-26 11:44               ` Fabio Estevam
@ 2014-11-26 13:35                 ` Richard Weinberger
  0 siblings, 0 replies; 14+ messages in thread
From: Richard Weinberger @ 2014-11-26 13:35 UTC (permalink / raw)
  To: Fabio Estevam, Brian Norris; +Cc: Fabio Estevam, linux-mtd, Huang Shijie

Am 26.11.2014 um 12:44 schrieb Fabio Estevam:
> On Wed, Nov 26, 2014 at 1:18 AM, Brian Norris
> <computersforpeace@gmail.com> wrote:
>> On Tue, Nov 11, 2014 at 06:16:29PM -0200, Fabio Estevam wrote:
>>> BTW, I don't see any other nand driver that prints error on the probe
>>> error path like this one.
>>
>> You're probably still going to see failure prints like
>>
>>   nand: No NAND device found
>>
>> in nand_scan_ident(), right? Or does driver probe fail earlier than that
>> somehow?
> 
> Yes, this is what I get currently:
> 
> [    1.645433] nand: No NAND device found
> [    1.650372] gpmi-nand 8000c000.gpmi-nand: driver registration failed: -19
> 
> In my opinion the "No NAND device found" is enough.

If we remove the said log message and one really has a NAND installed which fails
to probe will he notice that and get the correct error code printed?
If yes, the removal won't hurt.

My point is that having non-existing hardware in the device does not make much sense.
Lot's of DTs are very generic and carry a lot of unused stuff with them,
but this is not a good practice as DTs should describe the actual hardware and not
all possible board variants.

Thanks,
//richard

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

* Re: [PATCH] mtd: gpmi: Remove noisy error message
  2014-11-11 16:01 [PATCH] mtd: gpmi: Remove noisy error message Fabio Estevam
  2014-11-11 19:45 ` Richard Weinberger
@ 2014-12-17  0:27 ` Brian Norris
  1 sibling, 0 replies; 14+ messages in thread
From: Brian Norris @ 2014-12-17  0:27 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: linux-mtd, shijie8

On Tue, Nov 11, 2014 at 02:01:31PM -0200, Fabio Estevam wrote:
> mx28evk board has a socket for NAND flash that comes with no NAND flash
> populated, and then we get this message on every boot:
> 
> [    1.657603] gpmi-nand 8000c000.gpmi-nand: driver registration failed: -19
> 
> ,which is not very helpful, so get rid of this error message.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>

Enough pointless discussion has been had. There's enough other context
for most errors, I think.

Applied to l2-mtd.git/next.

Brian

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

end of thread, other threads:[~2014-12-17  0:28 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-11 16:01 [PATCH] mtd: gpmi: Remove noisy error message Fabio Estevam
2014-11-11 19:45 ` Richard Weinberger
2014-11-11 19:57   ` Fabio Estevam
2014-11-11 20:00     ` Richard Weinberger
2014-11-11 20:05       ` Fabio Estevam
2014-11-11 20:10         ` Richard Weinberger
2014-11-11 20:16           ` Fabio Estevam
2014-11-11 20:22             ` Richard Weinberger
2014-11-11 20:28               ` Fabio Estevam
2014-11-11 20:31                 ` Richard Weinberger
2014-11-26  3:18             ` Brian Norris
2014-11-26 11:44               ` Fabio Estevam
2014-11-26 13:35                 ` Richard Weinberger
2014-12-17  0:27 ` Brian Norris

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.