Linux kernel staging patches
 help / color / mirror / Atom feed
From: "Adrian Barnaś" <abarnas@google.com>
To: Hans de Goede <hansg@kernel.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	 Sakari Ailus <sakari.ailus@linux.intel.com>,
	Andy Shevchenko <andy@kernel.org>,
	 Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Dan Carpenter <dan.carpenter@linaro.org>,
	 linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	 linux-staging@lists.linux.dev
Cc: "Adrian Barnaś" <abarnas@google.com>
Subject: [RFC PATCH v2 1/2] staging: media: atomisp: Change name to better follow its behavior
Date: Wed,  3 Sep 2025 09:27:53 +0000	[thread overview]
Message-ID: <20250903092754.2751556-2-abarnas@google.com> (raw)
In-Reply-To: <20250903092754.2751556-1-abarnas@google.com>

Change name to clearly states what function does.
Signed-off-by: Adrian Barnaś <abarnas@google.com>
---
 .../atomisp/pci/hive_isp_css_common/host/vmem.c  | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/vmem.c b/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/vmem.c
index 547cc480c105..a3fe03216389 100644
--- a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/vmem.c
+++ b/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/vmem.c
@@ -22,9 +22,9 @@ subword(unsigned long long w, unsigned int start, unsigned int end)
 	return (w & (((1ULL << (end - 1)) - 1) << 1 | 1)) >> start;
 }
 
-/* inverse subword bits move like this: MSB[xxxx____xxxx]LSB -> MSB[xxxx0000xxxx]LSB */
+/* clears subword bits like this: MSB[xxxx____xxxx]LSB -> MSB[xxxx0000xxxx]LSB */
 static inline unsigned long long
-inv_subword(unsigned long long w, unsigned int start, unsigned int end)
+clear_subword(unsigned long long w, unsigned int start, unsigned int end)
 {
 	return w & (~(((1ULL << (end - 1)) - 1) << 1 | 1) | ((1ULL << start) - 1));
 }
@@ -45,16 +45,16 @@ static void move_subword(unsigned long long *target, unsigned int target_bit,
 
 	if (subword_width + start_bit > uedge_bits) { /* overlap */
 		unsigned long long old_val1;
-		unsigned long long old_val0 = inv_subword(target[start_elem],
-							  start_bit, uedge_bits);
+		unsigned long long old_val0 = clear_subword(target[start_elem],
+							    start_bit, uedge_bits);
 
 		target[start_elem] = old_val0 | (src_subword << start_bit);
-		old_val1 = inv_subword(target[start_elem + 1], 0,
-				       subword_width + start_bit - uedge_bits);
+		old_val1 = clear_subword(target[start_elem + 1], 0,
+					 subword_width + start_bit - uedge_bits);
 		target[start_elem + 1] = old_val1 | (src_subword >> (uedge_bits - start_bit));
 	} else {
-		unsigned long long old_val = inv_subword(target[start_elem], start_bit,
-							 start_bit + subword_width);
+		unsigned long long old_val = clear_subword(target[start_elem], start_bit,
+							   start_bit + subword_width);
 
 		target[start_elem] = old_val | (src_subword << start_bit);
 	}
-- 
2.51.0.355.g5224444f11-goog


  reply	other threads:[~2025-09-03  9:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-03  9:27 [RFC PATCH v2 0/2] staging: media: atomisp: Refactor bit logic helpers in vmem.c Adrian Barnaś
2025-09-03  9:27 ` Adrian Barnaś [this message]
2025-09-04  7:48   ` [RFC PATCH v2 1/2] staging: media: atomisp: Change name to better follow its behavior Andy Shevchenko
2025-09-04 11:43     ` Adrian Barnaś
2025-09-03  9:27 ` [RFC PATCH v2 2/2] staging: media: atomisp: Simplify logic in vmem.c Adrian Barnaś
2025-09-03 11:07 ` [RFC PATCH v2 0/2] staging: media: atomisp: Refactor bit logic helpers " Andy Shevchenko

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=20250903092754.2751556-2-abarnas@google.com \
    --to=abarnas@google.com \
    --cc=andy@kernel.org \
    --cc=dan.carpenter@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hansg@kernel.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 \
    /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