Re: [PATCH v2 2/2] scsi: qedi: Fix SYSFS_FLAG_FW_SEL_BOOT formatting

Martin K. Petersen
2021-11-30T04:25:36Z

Florian,

>> The other occurrences of SYSFS_FLAG_FW_SEL_BOOT use "%d". Since %hh
>> is deprecated I suggest you just fix the snprintf().
>
> That was what v1 did here:
>
> https://lkml.org/lkml/2021/11/26/9
>
> however Manish seemed to want that flag to be printed as a byte I am
> fine either way.

Not sure I understand the concern since this is a constant which will
always be "2".

But if you must cast, do it in snprintf() and not in the macro
definition. checkpatch also complains about the cast.

I would prefer for all instances of this to be consistent, though. So
whatever you do, please also fix qla4xxx.

--
Martin K. Petersen Oracle Linux Engineering