mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] selinux: Use 1UL for EBITMAP_BIT to match maps type
@ 2024-06-29  4:10 Canfeng Guo
  2024-07-02 15:41 ` Paul Moore
  0 siblings, 1 reply; 2+ messages in thread
From: Canfeng Guo @ 2024-06-29  4:10 UTC (permalink / raw)
  To: paul; +Cc: stephen.smalley.work, omosnace, selinux, linux-kernel, Canfeng Guo

This patch modifies the definition of EBITMAP_BIT in
security/selinux/ss/ebitmap.h from 1ULL to 1UL to match the type
of elements in the ebitmap_node maps array.

This change does not affect the functionality or correctness of
the code but aims to enhance code quality by adhering to good
programming practices and avoiding unnecessary type conversions.

Signed-off-by: Canfeng Guo <guocanfeng@uniontech.com>
---
 security/selinux/ss/ebitmap.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/security/selinux/ss/ebitmap.h b/security/selinux/ss/ebitmap.h
index 24d7d8b3cda3..ba2ac3da1153 100644
--- a/security/selinux/ss/ebitmap.h
+++ b/security/selinux/ss/ebitmap.h
@@ -29,7 +29,7 @@
 	 sizeof(unsigned long))
 #define EBITMAP_UNIT_SIZE BITS_PER_LONG
 #define EBITMAP_SIZE	  (EBITMAP_UNIT_NUMS * EBITMAP_UNIT_SIZE)
-#define EBITMAP_BIT	  1ULL
+#define EBITMAP_BIT	  1UL
 #define EBITMAP_SHIFT_UNIT_SIZE(x) \
 	(((x) >> EBITMAP_UNIT_SIZE / 2) >> EBITMAP_UNIT_SIZE / 2)
 
-- 
2.20.1


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

* Re: [PATCH] selinux: Use 1UL for EBITMAP_BIT to match maps type
  2024-06-29  4:10 [PATCH] selinux: Use 1UL for EBITMAP_BIT to match maps type Canfeng Guo
@ 2024-07-02 15:41 ` Paul Moore
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Moore @ 2024-07-02 15:41 UTC (permalink / raw)
  To: Canfeng Guo
  Cc: stephen.smalley.work, omosnace, selinux, linux-kernel, Canfeng Guo

On Jun 29, 2024 Canfeng Guo <guocanfeng@uniontech.com> wrote:
> 
> This patch modifies the definition of EBITMAP_BIT in
> security/selinux/ss/ebitmap.h from 1ULL to 1UL to match the type
> of elements in the ebitmap_node maps array.
> 
> This change does not affect the functionality or correctness of
> the code but aims to enhance code quality by adhering to good
> programming practices and avoiding unnecessary type conversions.
> 
> Signed-off-by: Canfeng Guo <guocanfeng@uniontech.com>
> ---
>  security/selinux/ss/ebitmap.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks, this looks good to me, and it's trivial enough that I think it
is safe to merge at this point in the release cycle; merged to
selinux/dev.

--
paul-moore.com

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

end of thread, other threads:[~2024-07-02 15:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-29  4:10 [PATCH] selinux: Use 1UL for EBITMAP_BIT to match maps type Canfeng Guo
2024-07-02 15:41 ` Paul Moore

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

all inboxes | Powered by JetHome®