lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200706063438.GF6538@piout.net>
Date:   Mon, 6 Jul 2020 08:34:38 +0200
From:   Alexandre Belloni <alexandre.belloni@...tlin.com>
To:     Johnson CH Chen (陳昭勳) 
        <JohnsonCH.Chen@...a.com>
Cc:     Guenter Roeck <linux@...ck-us.net>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-rtc@...r.kernel.org" <linux-rtc@...r.kernel.org>,
        "linux-watchdog@...r.kernel.org" <linux-watchdog@...r.kernel.org>,
        Wim Van Sebroeck <wim@...ux-watchdog.org>,
        Alessandro Zummo <a.zummo@...ertech.it>
Subject: Re: [PATCH v2] rtc: rtc-ds1374: wdt: Use watchdog core for watchdog
 part

On 06/07/2020 05:18:39+0000, Johnson CH Chen (陳昭勳) wrote:
> > >  #endif /*CONFIG_RTC_DRV_DS1374_WDT*/
> > >  /*
> > > @@ -653,15 +514,25 @@ static int ds1374_probe(struct i2c_client
> > > *client,
> > >
> > >  #ifdef CONFIG_RTC_DRV_DS1374_WDT
> > >  	save_client = client;
> > > -	ret = misc_register(&ds1374_miscdev);
> > > -	if (ret)
> > > -		return ret;
> > > -	ret = register_reboot_notifier(&ds1374_wdt_notifier);
> > > +	ds1374->wdt.info = &ds1374_wdt_info;
> > > +	ds1374->wdt.ops = &ds1374_wdt_ops;
> > > +	ds1374->wdt.timeout = TIMER_MARGIN_DEFAULT;
> > > +	ds1374->wdt.min_timeout = TIMER_MARGIN_MIN;
> > > +	ds1374->wdt.max_timeout = TIMER_MARGIN_MAX;
> > > +
> > > +	watchdog_init_timeout(&ds1374->wdt, wdt_margin, &client->dev);
> > > +	watchdog_set_nowayout(&ds1374->wdt, nowayout);
> > > +	watchdog_stop_on_reboot(&ds1374->wdt);
> > > +	watchdog_stop_on_unregister(&ds1374->wdt);
> > > +	ds1374_wdt_settimeout(&ds1374->wdt, wdt_margin);
> > > +
> > > +	ret = devm_watchdog_register_device(&client->dev, &ds1374->wdt);
> > >  	if (ret) {
> > > -		misc_deregister(&ds1374_miscdev);
> > > +		dev_err(&client->dev, "failed to register DS1374 watchdog
> > > +device\n");

There was no error message before, I don't think this one is necessary.

> > >  		return ret;
> > >  	}
> > > -	ds1374_wdt_settimeout(131072);
> > > +
> > > +	dev_info(&client->dev, "DS1374 watchdog device enabled\n");
> > 
> > Is that necessary ?
> > 
> 
> I think it's good to show watchdog initial timeout. I'll include above suggestions in v3, thanks!
> 

No, please avoid adding more strings in that driver.


-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ