Linux-Media Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 1/1] intel-ipu3: Align struct ipu3_uapi_awb_fr_config_s to 32 bytes
@ 2019-12-02  8:38 Sakari Ailus
  2019-12-02  8:47 ` Sakari Ailus
  0 siblings, 1 reply; 2+ messages in thread
From: Sakari Ailus @ 2019-12-02  8:38 UTC (permalink / raw)
  To: linux-media; +Cc: hverkuil, bingbu.cao

A struct that needs to be aligned to 32 bytes has a size of 28. Increase
the size to 32.

This makes elements of arrays of this struct aligned to 32 as well, and
other structs where members are aligned to 32 mixing
ipu3_uapi_awb_fr_config_s as well as other types.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Tested-by: Bingbu Cao <bingbu.cao@intel.com>
---
 drivers/staging/media/ipu3/include/intel-ipu3.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/ipu3/include/intel-ipu3.h b/drivers/staging/media/ipu3/include/intel-ipu3.h
index 08eaa0bad0de..1c9c3ba4d518 100644
--- a/drivers/staging/media/ipu3/include/intel-ipu3.h
+++ b/drivers/staging/media/ipu3/include/intel-ipu3.h
@@ -449,7 +449,7 @@ struct ipu3_uapi_awb_fr_config_s {
 	__u16 reserved1;
 	__u32 bayer_sign;
 	__u8 bayer_nf;
-	__u8 reserved2[3];
+	__u8 reserved2[7];
 } __attribute__((aligned(32))) __packed;
 
 /**
-- 
2.20.1


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

* Re: [PATCH 1/1] intel-ipu3: Align struct ipu3_uapi_awb_fr_config_s to 32 bytes
  2019-12-02  8:38 [PATCH 1/1] intel-ipu3: Align struct ipu3_uapi_awb_fr_config_s to 32 bytes Sakari Ailus
@ 2019-12-02  8:47 ` Sakari Ailus
  0 siblings, 0 replies; 2+ messages in thread
From: Sakari Ailus @ 2019-12-02  8:47 UTC (permalink / raw)
  To: Sakari Ailus; +Cc: linux-media, hverkuil, bingbu.cao

On Mon, Dec 02, 2019 at 10:38:20AM +0200, Sakari Ailus wrote:
> A struct that needs to be aligned to 32 bytes has a size of 28. Increase
> the size to 32.
> 
> This makes elements of arrays of this struct aligned to 32 as well, and
> other structs where members are aligned to 32 mixing
> ipu3_uapi_awb_fr_config_s as well as other types.
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> Tested-by: Bingbu Cao <bingbu.cao@intel.com>

The tags should have included:

Fixes: commit dca5ef2aa1e6 ("media: staging/intel-ipu3: remove the unnecessary compiler flags")

> ---
>  drivers/staging/media/ipu3/include/intel-ipu3.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/media/ipu3/include/intel-ipu3.h b/drivers/staging/media/ipu3/include/intel-ipu3.h
> index 08eaa0bad0de..1c9c3ba4d518 100644
> --- a/drivers/staging/media/ipu3/include/intel-ipu3.h
> +++ b/drivers/staging/media/ipu3/include/intel-ipu3.h
> @@ -449,7 +449,7 @@ struct ipu3_uapi_awb_fr_config_s {
>  	__u16 reserved1;
>  	__u32 bayer_sign;
>  	__u8 bayer_nf;
> -	__u8 reserved2[3];
> +	__u8 reserved2[7];
>  } __attribute__((aligned(32))) __packed;
>  
>  /**
> -- 
> 2.20.1
> 

-- 
Sakari Ailus

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

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-02  8:38 [PATCH 1/1] intel-ipu3: Align struct ipu3_uapi_awb_fr_config_s to 32 bytes Sakari Ailus
2019-12-02  8:47 ` Sakari Ailus

Linux-Media Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-media/0 linux-media/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-media linux-media/ https://lore.kernel.org/linux-media \
		linux-media@vger.kernel.org
	public-inbox-index linux-media

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-media


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git