From patchwork Wed Feb 1 16:56:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9550189 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 08FAE60425 for ; Wed, 1 Feb 2017 16:57:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ED3E628425 for ; Wed, 1 Feb 2017 16:57:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E1DD628456; Wed, 1 Feb 2017 16:57:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 990CA28425 for ; Wed, 1 Feb 2017 16:57:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753224AbdBAQ5o (ORCPT ); Wed, 1 Feb 2017 11:57:44 -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 Received: from wuerfel.lan ([78.43.21.235]) by mrelayeu.kundenserver.de (mreue004 [212.227.15.129]) with ESMTPA (Nemesis) id 0MdZRA-1cpX8D0fe8-00PLMk; Wed, 01 Feb 2017 17:57:25 +0100 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-remoteproc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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; };