public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Bogdan Sandu <bogdanelsandu2011@gmail.com>
To: gregkh@linuxfoundation.org
Cc: bingbu.cao@intel.com, bogdanelsandu2011@gmail.com,
	linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
	linux-staging@lists.linux.dev, mchehab@kernel.org,
	sakari.ailus@linux.intel.com, tian.shu.qiu@intel.com
Subject: [PATCH v2 4/4] media: ipu3: use BIT()
Date: Mon,  2 Feb 2026 19:50:33 +0200	[thread overview]
Message-ID: <20260202175033.8640-5-bogdanelsandu2011@gmail.com> (raw)
In-Reply-To: <20260202175033.8640-1-bogdanelsandu2011@gmail.com>

Prefer BIT() macro over manual bitshift.

Signed-off-by: Bogdan Sandu <bogdanelsandu2011@gmail.com>
---
 drivers/staging/media/ipu3/ipu3-mmu.c | 2 +-
 drivers/staging/media/ipu3/ipu3-mmu.h | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/media/ipu3/ipu3-mmu.c b/drivers/staging/media/ipu3/ipu3-mmu.c
index cb9bf5fb2..95ce34ad8 100644
--- a/drivers/staging/media/ipu3/ipu3-mmu.c
+++ b/drivers/staging/media/ipu3/ipu3-mmu.c
@@ -21,7 +21,7 @@
 #include "ipu3-mmu.h"
 
 #define IPU3_PT_BITS		10
-#define IPU3_PT_PTES		(1UL << IPU3_PT_BITS)
+#define IPU3_PT_PTES		(BIT(IPU3_PT_BITS))
 #define IPU3_PT_SIZE		(IPU3_PT_PTES << 2)
 #define IPU3_PT_ORDER		(IPU3_PT_SIZE >> PAGE_SHIFT)
 
diff --git a/drivers/staging/media/ipu3/ipu3-mmu.h b/drivers/staging/media/ipu3/ipu3-mmu.h
index a5f0bca7e..990482f10 100644
--- a/drivers/staging/media/ipu3/ipu3-mmu.h
+++ b/drivers/staging/media/ipu3/ipu3-mmu.h
@@ -5,8 +5,10 @@
 #ifndef __IPU3_MMU_H
 #define __IPU3_MMU_H
 
+#include <linux/bitops.h>
+
 #define IPU3_PAGE_SHIFT		12
-#define IPU3_PAGE_SIZE		(1UL << IPU3_PAGE_SHIFT)
+#define IPU3_PAGE_SIZE		(BIT(IPU3_PAGE_SHIFT))
 
 /**
  * struct imgu_mmu_info - Describes mmu geometry
-- 
2.51.0


  parent reply	other threads:[~2026-02-02 17:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-02 10:03 [PATCH] Cleanup ipu3 driver Bogdan Sandu
2026-02-02 10:14 ` Greg KH
2026-02-02 10:18   ` [RE:PATCH] " Bogdan Sandu
2026-02-02 10:18     ` [PATCH] " Bogdan Sandu
2026-02-02 10:32       ` Greg KH
2026-02-02 10:34   ` Bogdan Sandu
2026-02-02 17:50   ` [PATCH v2 0/4] Cleanup media:ipu3 driver Bogdan Sandu
2026-02-02 17:50     ` [PATCH v2 1/4] media: ipu3: fix alignment Bogdan Sandu
2026-03-05  8:15       ` Sakari Ailus
2026-03-11 18:39         ` Bogdan Sandu
2026-02-02 17:50     ` [PATCH v2 2/4] media: ipu3: use tabs Bogdan Sandu
2026-03-05  8:16       ` Sakari Ailus
2026-02-02 17:50     ` [PATCH v2 3/4] media: ipu3: avoid ending lines with paranthesis Bogdan Sandu
2026-02-02 17:50     ` Bogdan Sandu [this message]
2026-02-02 20:08       ` [PATCH v2 4/4] media: ipu3: use BIT() Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260202175033.8640-5-bogdanelsandu2011@gmail.com \
    --to=bogdanelsandu2011@gmail.com \
    --cc=bingbu.cao@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=tian.shu.qiu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox