From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753428AbdBAQ5p (ORCPT ); Wed, 1 Feb 2017 11:57:45 -0500 Received: from mout.kundenserver.de ([212.227.126.135]:49979 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753139AbdBAQ5m (ORCPT ); Wed, 1 Feb 2017 11:57:42 -0500 From: Arnd Bergmann To: Ohad Ben-Cohen , Bjorn Andersson Cc: Arnd Bergmann , Avaneesh Kumar Dwivedi , Wei Yongjun , linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] remoteproc: qcom: fix initializers for qcom_mss_reg_res array Date: Wed, 1 Feb 2017 17:56:28 +0100 Message-Id: <20170201165723.2615554-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:T1qXI4k+n1flGwOlO2cZ+AkJjEUoawyB8TC+1j1Qt1q9hIk36wL b+v0ae3SIlg7XLSO2L4xECx55JJWMx7QpZgZIQdHmIcACYCMg7vr7EhpgQIczgBOmlyEUVJ LNlGTEjUsVgHbTRNiOT5Phf9t66Xlss4CDreKDkDs7l9hSwq71gxvLBGjOngmnxSYRFfGMY F9UVJI3DV3tLNLC8QdU0g== X-UI-Out-Filterresults: notjunk:1;V01:K0:TLdIyOccLH0=:Meg0CR2tb0UXSkVcu7/ngB SiIV+JIvsqv5CeyrAZqeXOKPCbSskGyuXDC3gOp2+cBonKxvKVRiiJQ9Mo80RAE8e5NP5PTPa KpEWkK5cPQyojrRIcsy/Z+1yecZojm6+5bWhGqtZnsZtxZbMwkxZsoY+Qy5TcyJ9ZKDsNaR7r rCN1j4cGknA1c7S6QHoUMhBxQgEGhQwwYdXBmbVi3b0aqIjnXQI7OajaNpvyo2T+jS7i/DqB4 G6+S1tGe+kqpya7UIxUGbY2t1X7cB8+EKBjOuLRG4dQLf8OjZpHst+P5mbKiSAmE15abde2gJ AH/gQ8rYjeJb0lkoEj5CcYwa8W2mg6h6lWWrODmiS5T8t1lFrQAY7kbkzhPuJsAPV6JLT3ONl Umg7N/IB4PSMaout3Ob4XocwgzlGqXcOh3Jg+G/rZzsyFOdt6LEIKBA/acCAF1gbV3kz3toZd z00C3YY+4HskezlfRKWAZfXmP5p9IRGGLGzIQ9TTgwz5pHz+w+SDFTFYWcF7I/dvpyXyIm5tT egGpIqS6QqpPBOXjb3udVZxy+GgjGocICoQZHWgL4yP3ChsTr7lF+tsj5facbXHB7oCbmgsYP +6ROX5L/Ot4czjKSWW1X+OUje31/EZa6eu5rR7NofkmCc0+eb1RX5EtvVIpjARwuCLBdvajqV N9+0BIZyLeCwsEMV9vBw1LypUnaxmd6MojNdqK80pcNnG1/g6d/eL+U7L+1kIA5px8Ko= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The recently added initialization is rather unusual because it uses a constructor for a variable-length array to assign a constant structure to a member that uses a fixed-length array. This confuses clang and breaks the build. drivers/remoteproc/qcom_q6v5_pil.c:1024:18: error: incompatible pointer types initializing 'const char *' with an expression of type :%s 'struct qcom_mss_reg_res [4]' [-Werror,-Wincompatible-pointer-types] .proxy_supply = (struct qcom_mss_reg_res[]) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/remoteproc/qcom_q6v5_pil.c:1024:18: warning: suggest braces around initialization of subobject [-Wmissing-braces] .proxy_supply = (struct qcom_mss_reg_res[]) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ We can either turn this constructor into a regular initializer by removing the 'struct qcom_mss_reg_res[])', or we can make the array variable length. The latter approach is used for the arrays of strings in the same structure, so let's use that here too. Fixes: 19f902b53b47 ("remoteproc: qcom: Initialize and enable proxy and active regulators.") Signed-off-by: Arnd Bergmann --- drivers/remoteproc/qcom_q6v5_pil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/remoteproc/qcom_q6v5_pil.c b/drivers/remoteproc/qcom_q6v5_pil.c index 9a5149573298..8d60ad2a2851 100644 --- a/drivers/remoteproc/qcom_q6v5_pil.c +++ b/drivers/remoteproc/qcom_q6v5_pil.c @@ -107,8 +107,8 @@ struct qcom_mss_reg_res { struct rproc_hexagon_res { const char *hexagon_mba_image; - struct qcom_mss_reg_res proxy_supply[4]; - struct qcom_mss_reg_res active_supply[2]; + struct qcom_mss_reg_res *proxy_supply; + struct qcom_mss_reg_res *active_supply; char **proxy_clk_names; char **active_clk_names; }; -- 2.9.0