Re: [PATCH 19/29] scsi: ufs: Remove the TRUE and FALSE definitions

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

 



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.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux