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

Joel Stanley joel at jms.id.au
Tue May 29 14:42:02 AEST 2018


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.


More information about the openbmc mailing list