Re: [PATCH v3 5/7] watchdog: Add Nuvoton NCT6694 WDT support

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

 



Dear Guenter,

Thank you for your comments,

Guenter Roeck <linux@xxxxxxxxxxxx> 於 2024年12月10日 週二 下午11:22寫道:
>
> > +static int nct6694_wdt_probe(struct platform_device *pdev)
> > +{
> ...
> > +     wdev->timeout = timeout;
> > +     wdev->pretimeout = pretimeout;
> > +     if (timeout < pretimeout) {
> > +             dev_warn(data->dev, "pretimeout < timeout. Setting to zero\n");
> > +             wdev->pretimeout = 0;
> > +     }
> > +
> > +     wdev->min_timeout = 1;
> > +     wdev->max_timeout = 255;
> > +
> > +     mutex_init(&data->lock);
> > +
> > +     platform_set_drvdata(pdev, data);
> > +
> > +     /* Register watchdog timer device to WDT framework */
> > +     watchdog_set_drvdata(&data->wdev, data);
> > +     watchdog_init_timeout(&data->wdev, timeout, dev);
>
> This is pointless since timeout is pre-initialized with a value != 0.
> That means a value provided through devicetree will never be used
> unless the user sets timeout=0 as module parameter. But then the above
> check for pretimeout is useless.
>

Understood! I will drop it in v4.

Best regards,
Ming





[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux