From patchwork Fri Sep 20 14:55:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 174141 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp2597442ill; Fri, 20 Sep 2019 07:55:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqx1blAxzy4kmRL1mVOUVOkUdnrNlz/UQF1MDzLL1Ti/9/Ogek/AvmTZxSuSc6ZqWMS1y6st X-Received: by 2002:aa7:d9d5:: with SMTP id v21mr21375432eds.106.1568991353024; Fri, 20 Sep 2019 07:55:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568991353; cv=none; d=google.com; s=arc-20160816; b=s7SD7wISCzvqV9EaTJzLRVV+7ZV05c+Ky5gMHRAuccgYPpyjyiNmklrVkEORXFxzmv f0h1i+wd7frym+ar6zWbdiW2RrhZ+BkVyqrKyoifx1f1o4Qvka84zSl7CNw1KHL2Q6za XI22+SV33h21icyszSdzhotOJ82hdWiI181oGppxEzhlWHx/tiRe1Tj4Yu7gdHfJd469 xxTouaDe80I0YUknBVvfqCPWSKlJr0Xfflv7btynN6Jcnf4Q0UpFNycRCR88QppGslVH XgDEntiuZYp/DpXBMDEqKr5kUEhU9Or5L+fMdZAY70bHu8FYe5HGMQfvOtS87PQDtfjB LunA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=5ZYcwskQYQiqGsJbsojfroHgf5vQVh7F2iAcYqT7/O8=; b=FI5yLVwNOMPnm3Lhmx4leo0sEjJu2egGg8Ys95Cpl4a7eBQsR/aO8l8Az8xCYUQfR+ ifvD5RgLnXhKqu0sD7BEzWuYyjTDcSQGj57AMAbvUdOfwCCoSIApXI/+ThW3souGY5bX j4RF6qF5SBCLm2VcRGlzndRDhh6DaIwC/oNXumQuMashCk73bWKpL1X+lbKp400dgNNW yDSxakaDYGHVqFexiPUCru67mPBzJx3xBZXxU7Xj1R8sd1TAKXyneXaOp/h42eNREy9l JnJT0EB5nrAFYZrZq0IUN1y39kf1RsITlj2CxVk1uxHhoeFLiZ3uWfyE7NY7DCrW8mtf a2kw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n8si1168417eju.311.2019.09.20.07.55.52; Fri, 20 Sep 2019 07:55:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389499AbfITOzu (ORCPT + 15 others); Fri, 20 Sep 2019 10:55:50 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:46219 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389185AbfITOzu (ORCPT ); Fri, 20 Sep 2019 10:55:50 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.145]) with ESMTPA (Nemesis) id 1MLhsE-1iSrAm1iyG-00Hihn; Fri, 20 Sep 2019 16:55:44 +0200 From: Arnd Bergmann To: Andy Gross , Jassi Brar Cc: Arnd Bergmann , Niklas Cassel , Jorge Ramirez-Ortiz , Bjorn Andersson , Stephen Boyd , Jassi Brar , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] mbox: qcom: avoid unused-variable warning Date: Fri, 20 Sep 2019 16:55:29 +0200 Message-Id: <20190920145543.1732316-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:Vyj8IgoELBNWAqG5shQMbymVlAFKmfgJTRKXyjfK2wns8erKnyT EQNR+NWuon0/SrwcQFXP/Q+5UyeoVJRZcWX1KcNGlOGYEZaFOQ0042uCtn/lfMXjkDcR39H Ijabv+hd/DqHd/D5+JgLGmbDmP0jvMZ4DuboWdurVRNStwlZd5Ni6k7zy8U/PRk27arqy0Z ap/PBMmshw7j2WNVCkg4A== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:9vhf4jNp1uA=:+keTyOqPFu2N7vGM0j1fp1 BCH44pMIIX8ww/IE9WqPXs2NnSFVjfb9Z3ogktOmXOwbUa/xiPIACCfR/zNC6IbWFY+r3JVDK hvVRpQqG7yPZ7z3xSYa0x4R5yOs4BkzVkz3JXJG8ZmkOmhMc+s7T+pbTifuTUaTUbf+Qt9bb0 xUW9tXqR6mATVEv/Z5jwtT5+U3o5Fde4Z+k1G+z+uwmmMwdtJ3DkFVZ1p2+BQppC57NYo2GUa y9rfYG+Ec1GswGaaDLJpiPe6ij0J8z9wLKRSJtsEjk1YU+hpKbbE6OoybtRde0z5XbYbKIR5R mzxUX9qZC3ST0XiY4S4XRirF2s5WDrvyrdBs66MU70D5tFK2Ds1tVE+SbzsQNG3zxIPezRO0G 5HE6Xm5HIOPy5lZRHFiDCHGsISFaYzYH5WLx3Uhp1Q92eCpfdJZI7qwgpR76jYUC+BJAiEczT mgWoas4/EtD5zGWcYGdxpox+vwwK9I4uaxsNU266RoJGhilOzQOVBrFZjprhdaPiy8HmtKByC VZh9byJVC7e3KJtHA9lZA073OwaLt9Ny1dV8WHE8jaLE6Ig/yJVEqCETgr+0QKxWTpBGbxTjY TZecPEUcb0egdDeheelJ2awweCfL7SLqczeKFaE8mxaFxRlkttxkRgwSHecnxYW+kIIRsTSDP qWpd2BRqrSgdEB1/yaNf1N9/YQJ8QdWixVMjipOGSyzdTfZOBQcyIfeJMfQHBlrMhmm6mkCH2 9VxIGKBs5/c8NLGgPeEKQpwR7VV48Ml2JiZjYxG5gtvVlD+1rHgdPZDwzA0qepo5EvbuA0NZT WNqCaf2EN/UaENvOH5uO98BzU2Aivi1ODWWMjq2ZsQyyJKgOYpUt+ZWFoo5SbtrFR24mFbZ3Y MB/Jp2IaW9CmGbKJp3FA== Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Without CONFIG_OF, there is no reference to the apcs_clk_match_table[] array, causing a harmless warning: drivers/mailbox/qcom-apcs-ipc-mailbox.c:57:28: error: unused variable 'apcs_clk_match_table' [-Werror,-Wunused-variable] const struct of_device_id apcs_clk_match_table[] = { Move the variable out of the variable scope and mark it 'static' to avoid the warning (static const variables get silently dropped by the compiler), and avoid the on-stack copy at the same time. Fixes: 78c86458a440 ("mbox: qcom: add APCS child device for QCS404") Signed-off-by: Arnd Bergmann --- drivers/mailbox/qcom-apcs-ipc-mailbox.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) -- 2.20.0 diff --git a/drivers/mailbox/qcom-apcs-ipc-mailbox.c b/drivers/mailbox/qcom-apcs-ipc-mailbox.c index eeebafd546e5..10557a950c2d 100644 --- a/drivers/mailbox/qcom-apcs-ipc-mailbox.c +++ b/drivers/mailbox/qcom-apcs-ipc-mailbox.c @@ -45,6 +45,12 @@ static const struct mbox_chan_ops qcom_apcs_ipc_ops = { .send_data = qcom_apcs_ipc_send_data, }; +static const struct of_device_id apcs_clk_match_table[] = { + { .compatible = "qcom,msm8916-apcs-kpss-global", }, + { .compatible = "qcom,qcs404-apcs-apps-global", }, + {} +}; + static int qcom_apcs_ipc_probe(struct platform_device *pdev) { struct qcom_apcs_ipc *apcs; @@ -54,11 +60,6 @@ static int qcom_apcs_ipc_probe(struct platform_device *pdev) void __iomem *base; unsigned long i; int ret; - const struct of_device_id apcs_clk_match_table[] = { - { .compatible = "qcom,msm8916-apcs-kpss-global", }, - { .compatible = "qcom,qcs404-apcs-apps-global", }, - {} - }; apcs = devm_kzalloc(&pdev->dev, sizeof(*apcs), GFP_KERNEL); if (!apcs)