On 3/31/22 19:19, Chanho Park wrote:
In the Linux kernel coding style document
(Documentation/process/coding-style.rst) it is recommended to use the type
'bool' and also the values 'true' and 'false'. Hence this patch that
removes the definitions and uses of TRUE and FALSE from the UFS driver.
The third parameter of ufshcd_dme_set is "int" type.
I think the coding-style doc recommends to use "bool" as comparison purpose
not int type conversion.
However, regarding C99 and C11, they might be converted to 0 and 1
respectively.
That's right, 'true' and 'false' are converted into 1 and 0 respectively
when converted to type 'int'. I want to keep the type of the third
argument of ufshcd_dme_set() as 'u32' because many other values are
passed to that parameter than only true and false.
The usage of 'TRUE' and 'FALSE' seems to be written as following the
description of below JEDEC doc.
"A Flag is a single Boolean value that represents a TRUE or FALSE, '0' or
'1', ON or OFF type of value."
Agreed that this is how it has been specified in the standard. I think
that we have the freedom to use any symbolic names for 0 and 1 as long
as these symbolic names are translated into the numerical values
required by the standard.
Thanks,
Bart.