[lkml]   [2019]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v2 06/16] watchdog: hpwdt: drop warning after calling watchdog_init_timeout
On Tue, Apr 16, 2019 at 10:55:33PM +0200, Wolfram Sang wrote:
> > That is indeed a problem: the pointer will be NULL if there is no parent
> > device (such as in softdog.c). Otherwise it should never be NULL.
> Okay, this spoils my err_dev solution. So, we probably go this route
> then:
> pr_<errlvl>("watchdog%d: <err_msg>\n", wdd->id);

I don't like it because it doesn't show the driver name, and watchdog%d
can change with each reboot. How about something like this ?

static void pr_wdt_err(struct watchdog_device *wdd, char *text, int err)
if (wdd->parent)
dev_err(wdd->parent, "%s: %d\n", text, err);
pr_err("%s: %s: %d\n", wdd->info->identity, text, err);

We could then use the same mechanism to generate error messages for


 \ /
  Last update: 2019-04-16 23:21    [W:0.057 / U:1.712 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site