mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: rcz@pengutronix.de, mfe@pengutronix.de,
	Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 4/4] hab: habv4: apply sizeof() to correct object
Date: Thu, 21 Sep 2023 11:56:49 +0200	[thread overview]
Message-ID: <20230921095649.310666-4-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20230921095649.310666-1-a.fatoum@pengutronix.de>

This introduces no functional change, because sizeof(enum habv4_state)
== sizeof(enum hab_config), but it's the correct thing to do.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/hab/habv4.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/hab/habv4.c b/drivers/hab/habv4.c
index bbceb0e985b6..e65dc8756e17 100644
--- a/drivers/hab/habv4.c
+++ b/drivers/hab/habv4.c
@@ -178,20 +178,20 @@ static enum hab_status hab_sip_report_status(enum hab_config *config,
 
 	if (state)
 		v8_flush_dcache_range((unsigned long)state,
-				      (unsigned long)state + sizeof(*config));
+				      (unsigned long)state + sizeof(*state));
 	if (config)
 		v8_flush_dcache_range((unsigned long)config,
-				      (unsigned long)config + sizeof(*state));
+				      (unsigned long)config + sizeof(*config));
 
 	arm_smccc_smc(FSL_SIP_HAB, FSL_SIP_HAB_REPORT_STATUS,
 		      (unsigned long) config,
 		      (unsigned long) state, 0, 0, 0, 0, &res);
 	if (state)
 		v8_inv_dcache_range((unsigned long)state,
-				    (unsigned long)state + sizeof(*config));
+				    (unsigned long)state + sizeof(*state));
 	if (config)
 		v8_inv_dcache_range((unsigned long)config,
-				    (unsigned long)config + sizeof(*state));
+				    (unsigned long)config + sizeof(*config));
 	return (enum hab_status)res.a0;
 }
 
-- 
2.39.2




  parent reply	other threads:[~2023-09-21  9:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-21  9:56 [PATCH 1/4] dma: define __dma_aligned attribute Ahmad Fatoum
2023-09-21  9:56 ` [PATCH 2/4] ARM: dma: define DMA_ALIGNMENT instead of defining dma_alloc Ahmad Fatoum
2023-09-21 10:35   ` Marco Felsch
2023-09-21  9:56 ` [PATCH 3/4] hab: habv4: align config/state at 64 byte boundary Ahmad Fatoum
2023-09-21  9:56 ` Ahmad Fatoum [this message]
2023-09-21 10:35 ` [PATCH 1/4] dma: define __dma_aligned attribute Ahmad Fatoum

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=20230921095649.310666-4-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=mfe@pengutronix.de \
    --cc=rcz@pengutronix.de \
    /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