Re: [PATCH] i2c: designware: Suppress error message if platform_get_irq() returns -EPROBE_DEFER

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Alexey,

Alexey Brodkin <Alexey.Brodkin@xxxxxxxxxxxx> wrote on 03/03/2015 05:37:31 
PM:

> From:
> 
> Alexey Brodkin <Alexey.Brodkin@xxxxxxxxxxxx>
> 
> To:
> 
> "christian.ruppert@xxxxxxxxxxx" <christian.ruppert@xxxxxxxxxxx>, 
> 
> Cc:
> 
> "mika.westerberg@xxxxxxxxxxxxxxx" <mika.westerberg@xxxxxxxxxxxxxxx>,
> "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, 
> "Vineet.Gupta1@xxxxxxxxxxxx" <Vineet.Gupta1@xxxxxxxxxxxx>, "wsa@the-
> dreams.de" <wsa@xxxxxxxxxxxxx>, "andriy.shevchenko@xxxxxxxxxxxxxxx" 
> <andriy.shevchenko@xxxxxxxxxxxxxxx>, "linux-i2c@xxxxxxxxxxxxxxx" 
> <linux-i2c@xxxxxxxxxxxxxxx>, "christian.ruppert@xxxxxxxxxx" 
> <christian.ruppert@xxxxxxxxxx>
> 
> Date:
> 
> 03/03/2015 05:38 PM
> 
> Subject:
> 
> Re: [PATCH] i2c: designware: Suppress error message if 
> platform_get_irq() returns -EPROBE_DEFER
> 
> Hi Christian,
> [...]
> > > 
> > >     irq = platform_get_irq(pdev, 0);
> > >     if (irq < 0) {
> > > -      dev_err(&pdev->dev, "no irq resource?\n");
> > > +      if (irq != -EPROBE_DEFER)
> > > +         dev_err(&pdev->dev, "no irq resource?\n");
> > 
> > Presented like this I wonder if this merits being a dev_err at all.
> > Wouldn't dev_dbg be more adequate? This might remove the need for the
> > condition and also avoid bothering everyone if something in the 
platform
> > device structures or device tree is not right.
> > 
> > >        return irq; /* -ENXIO */
> > >     }
> 
> We've just had similar discussion related to DW APB UART with Andy here
> https://lkml.org/lkml/2015/3/3/412
> 
> So yes probably we may safely remove error message from here completely.

I agree. Although you do have a point (in the other thread) when saying 
this
kind of messages can be useful in some situations. The process of 
debugging
device tree and platform device setup is definitely more painful for 
drivers
which omit this type of messages completely. Andy's proposal of 
centralising
this looks like a very good solution here (and on top of that removes many
useless strings from the kernel binary).

Greetings,
  Christian

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux