[PATCH linux dev-4.13 2/3] hwmon: occ: Avoid displaying an error when host is down

Benjamin Herrenschmidt benh at kernel.crashing.org
Wed May 30 00:48:26 AEST 2018


On Tue, 2018-05-29 at 14:12 +0930, Joel Stanley wrote:
> On 29 May 2018 at 13:58, Benjamin Herrenschmidt
> <benh at kernel.crashing.org> wrote:
> > Instead display a much less scary informational message as
> > this can happen in normal circumstances.
> > 
> > Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
> > ---
> >  drivers/hwmon/occ/common.c | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/hwmon/occ/common.c b/drivers/hwmon/occ/common.c
> > index 365bf207cf0d..0673af00a99b 100644
> > --- a/drivers/hwmon/occ/common.c
> > +++ b/drivers/hwmon/occ/common.c
> > @@ -1359,7 +1359,10 @@ int occ_setup(struct occ *occ, const char *name)
> > 
> >         /* no need to lock */
> >         rc = occ_poll(occ);
> > -       if (rc < 0) {
> > +       if (rc == -ESHUTDOWN) {
> > +               dev_info(occ->bus_dev, "Host is not ready\n");
> 
> Given this is normal, should we make this dev_dbg?
> 
> Otherwise we see it on the bmc serial console every time we boot the machine.

Up to you, feel free to tweak it as you merge :-)

Cheers,
Ben.



More information about the openbmc mailing list