[RFC/PATCH v3 1/2] watchdog_ioctl: Add decoding of WDIOC_GETSUPPORT and WDIOC_SETOPTIONS ioctls

Sahil icegambit91 at gmail.com
Sun Aug 25 18:36:11 UTC 2024


Hi,

On Sunday, August 25, 2024 7:45:51 PM GMT+5:30 Eugene Syromyatnikov wrote:
> On Sun, Aug 25, 2024 at 01:07:28PM +0530, Sahil wrote:
> > On Sunday, August 25, 2024 8:04:38 AM GMT+5:30 Eugene Syromyatnikov wrote:
> > > I wonder if PRINT_FIELD_X makes more sense here—sometimes developers
> > > tend to encode major/minor revisions as multiples of 16.  Do you have
> > > any insight in what actually appears here in the wild, by chance?
> > 
> > I have an intel TCO watchdog driver and it's firmware_version field is set
> > to 6. In the linux kernel in "drivers/watchdog/iTCO_wdt.c", I see that
> > this driver can take values from 0 through 6 as the firmware version [1].
> > 
> > For several drivers it's hardcoded to 0 (eg: Hardware Watchdog for SGI
> > IP22) or 1 (eg: Wafer 5823 WDT).
> > 
> > For the PowerPC Book-E watchdog driver, the firmware_version is defined as
> > the cpu spec's "pvr_value" [2] which can take values 0x8020, 0x8021 [3].
> > 
> > I am beginning to think PRINT_FIELD_X will be neater for the
> > firmware_version. What are your thoughts on this?
> 
> I concur, I'd rather err on the side of printing it as a hexadecimal
> number, as there is a variety of the ways it is used and interpreted,
> and since there is at least one precedent of interpreting the version
> as hexadecimal.
> 

Understood. Thank you for the clarification. I have submitted series v4
with the relevant changes.

Thanks,
Sahil




More information about the Strace-devel mailing list