public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/3] Regarding using 'bool' appropriately
@ 2023-03-04  4:19 Wei Wang
  2023-03-04  4:19 ` [PATCH v1 1/3] security: keys: don't use data type as variable name Wei Wang
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Wei Wang @ 2023-03-04  4:19 UTC (permalink / raw)
  To: arnd, akpm, keescook, herbert, josh, jani.nikula, corbet, jgg,
	dmatlack, mizhang, pbonzini, seanjc
  Cc: linux-kernel, Wei Wang

When I'm working on patch 3 to change WARN/WARN_ON to use bool for
__ret_warn_on according to the documentation in CodingStyle about using
'bool', compiler reports an error from tpm2_key_encode(), and the root
cause is that it names a variable 'bool' which conficts with the data
type name 'bool'. So fix it and add a rule in CodingStyle to avoid such
naming that causes confusion. This is also the reason that the three
patches are grouped into one patchset.

Wei Wang (3):
  security: keys: don't use data type as variable name
  Documentation/CodingStyle: do not use data type names as variable
    names
  bug: use bool for __ret_warn_on in WARN/WARN_ON

 Documentation/process/coding-style.rst    |  3 +++
 include/asm-generic/bug.h                 | 12 ++++++------
 security/keys/trusted-keys/trusted_tpm2.c |  5 +++--
 tools/include/asm/bug.h                   | 10 +++++-----
 4 files changed, 17 insertions(+), 13 deletions(-)

-- 
2.27.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-03-11 22:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-04  4:19 [PATCH v1 0/3] Regarding using 'bool' appropriately Wei Wang
2023-03-04  4:19 ` [PATCH v1 1/3] security: keys: don't use data type as variable name Wei Wang
2023-03-11 22:13   ` Jarkko Sakkinen
2023-03-04  4:19 ` [PATCH v1 2/3] Documentation/CodingStyle: do not use data type names as variable names Wei Wang
2023-03-04 15:01   ` Jonathan Corbet
2023-03-06 11:03     ` Wang, Wei W
2023-03-04  4:19 ` [PATCH v1 3/3] bug: use bool for __ret_warn_on in WARN/WARN_ON Wei Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox