From patchwork Mon May 27 09:05:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 1316 X-Patchwork-Delegate: jacopo@jmondi.org Return-Path: Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 9D25C618FB for ; Mon, 27 May 2019 11:05:06 +0200 (CEST) X-Originating-IP: 2.224.242.101 Received: from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101]) (Authenticated sender: jacopo@jmondi.org) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 17B0B60019; Mon, 27 May 2019 09:05:04 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Mon, 27 May 2019 11:05:58 +0200 Message-Id: <20190527090559.26549-6-jacopo@jmondi.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190527090559.26549-1-jacopo@jmondi.org> References: <20190527090559.26549-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 5/6] include: linux: intel-ipu3: Force alignement to 32 bytes X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 May 2019 09:05:06 -0000 Fix compilation error on GCC 8.3.0 include/linux/intel-ipu3.h:2475:35: error: ‘ipu3_uapi_acc_param::awb_fr’ offset 36756 in ‘ipu3_uapi_acc_param’ isn’t aligned to 32 [-Werror=packed-not-aligned] by forcing alignment to 32 bytes for struct ipu3_uapi_awb_fr_config_s. The structure is itself defined as 32 bytes aligned, so adding another alignment directive to the field definition should not change the structure memory layout. The error is reported by gcc8.3.0 only and not by other gcc compiler versions (5.4.0) or clang. As the header is exported from Linux v5.1 this is a workaround and should probably be fixed in the kernel headers themselves if the error is consistently reported in future compiler versions. Signed-off-by: Jacopo Mondi Acked-by: Laurent Pinchart --- include/linux/intel-ipu3.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/intel-ipu3.h b/include/linux/intel-ipu3.h index f758c9ba230b..fe6e8ed15eb1 100644 --- a/include/linux/intel-ipu3.h +++ b/include/linux/intel-ipu3.h @@ -2472,7 +2472,7 @@ struct ipu3_uapi_acc_param { struct ipu3_uapi_yuvp1_yds_config yds2 __attribute__((aligned(32))); struct ipu3_uapi_yuvp2_tcc_static_config tcc __attribute__((aligned(32))); struct ipu3_uapi_anr_config anr; - struct ipu3_uapi_awb_fr_config_s awb_fr; + struct ipu3_uapi_awb_fr_config_s awb_fr __attribute__((aligned(32))); struct ipu3_uapi_ae_config ae; struct ipu3_uapi_af_config_s af; struct ipu3_uapi_awb_config awb;