From patchwork Tue Apr 16 12:24:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 162306 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp4151069jan; Tue, 16 Apr 2019 05:25:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqwbQJZjcOOC1/B0W5FHsyAiOXo7xF4ylV8hYV4KRLe0AJ/Rjj0DVSIp/E9ePMgC/2paJnAM X-Received: by 2002:a63:3185:: with SMTP id x127mr30430190pgx.299.1555417525998; Tue, 16 Apr 2019 05:25:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555417525; cv=none; d=google.com; s=arc-20160816; b=Qpy2eSDq6ekKdR6wY05vEJ55nwcpau/2kRvlMyVGpnruuK0ae6KlgkrohsXrqu0EjH fnR6iJNPzNrihZX5Py2x/decGqTITnclqWuroMAJup4VmcrTsYToCTspy85YdJiLEJiW tBB7UVnWhhHaUq8sShcT8TXFDZoBN5n2UR/QTzFr7JebbAmffeIrarDU04H/spyEvqR/ egT6zxE7tS6W6pGGcwauhrsSZByRl4NeFrloMPiVtV19AmC4ZDE8s8OFsN9xgQDsslKt sz4KHxwjMEREk4/rPIZo6h88W5BiBN9HU2pXDlzreKH0DUaCBlWlRK3afX4U1MtLRMuP Achg== 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=XfL+s5uQegjdOjeEWZP+Gu/hzTux6LggIz0mxgiGe5U=; b=gJ6Ryf/ar3l45rEW5cwaMCzsz2jhzTWc7aVVQBvc29QBuR4WXoA1SjmktKkot+iNcD 6Xt5o207Rf/Ng6NUHa+BeQopbGTEoyxZ/Z9lb8Aqkx478JqY4YA6we1h3XSRL9yJao7d PzwVadA/kShtYxwVpCQZ/B2cPxuHj8n/Azev/7Njbd6nibLH+upqUmwuDu2bYunW6gCT XHH+kTVydN+hZlGkk2bK0c74JgNyySlXGv4I/lApXMNe7MkLbyQ32j3dvQRf/rzAG7uo 4VtrSW+fIMC8ZODOXIxykhSMhp7C1cQ2I2yUN+8tcfU1updkRoW6GqnvXoa5yvgeY8Sh 5DRA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 u8si25044725pgn.456.2019.04.16.05.25.25; Tue, 16 Apr 2019 05:25:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727952AbfDPMZY (ORCPT + 30 others); Tue, 16 Apr 2019 08:25:24 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:35471 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726241AbfDPMZX (ORCPT ); Tue, 16 Apr 2019 08:25:23 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.129]) with ESMTPA (Nemesis) id 1Mpkwn-1gUhzM1wir-00q8ZO; Tue, 16 Apr 2019 14:25:09 +0200 From: Arnd Bergmann To: Lee Jones , Maxime Ripard , Chen-Yu Tsai Cc: Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] mfd: sun6i-prcm: fix build warning for non-OF configurations Date: Tue, 16 Apr 2019 14:24:59 +0200 Message-Id: <20190416122506.3180853-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:uXt/bVk7UTlZHOx7EaNNOcd19LgXvMFy/q7rIR2NeYH3g+eBN47 iVj22SmLi34fvCBHRZE/yVS8mP1GRXu+Iy/YdkF8BbAlh7sgVOy7ZLKTLRmzTpy6TZhT6GF JuWhI3sIkK1PYsWhhuWcXjxhRaqPqTcOQ37mJaFLcvfcDKRqyBwD+Gilc2ZFKHp+Jf4Ugou LS3zqEuOdibC1sdbrU+Ng== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:n2VucTqvRDQ=:V8AVL2eVTQrJ2oHu6N7SOo mC2DoPUWc4toGE4L6YtWz73DFiFNNXIQGkC9gBCVil0dPdHu99V7sqsjU1gwD7Nm7K8/UZzL6 8jH4drfoXx0UotQ6tzhd/YK6jIwDKdpfC8ImBEYdg+b+mA6USYSj/VvotelqkkHY0L2gpLyxL dZCl7qSKqrmPw2mO8Y13p4WUBq6HRXT+QdWZsJQiL12o5ucw3Ig20HEBnNviVgat/bKMplDm4 MTdUKdC3Lk71L8bXgVonPe80qtrheX3UIV/5PfqJ2abBMG1/qcPNnGLFrEHY5PhLrr+75gWKY o00dyEU+ZlVn0/7UE6JDRetCLN0GVAj47ZnvvEE+jqCcPw3wZL/QBUhPNNMPaPDl/n0UOR1sZ TXOHnJXSmoHcHiCCG7lbntd+aqDxBULBAjNuEaZsyhHTdaiKqB1I6ONGq2xID5BP3rx7snH6E g2nKp3FtbN6Uolm8XxtyF1R1hQHCKfJfC+baVHziFS6E/9vzYMvJWICZ8iBF5XZ8Xu1mfx1op N3jkfU9HFoNBw9nKY1xJNg4TxdxN2hgSIw2BbeiAco7skt1SBdFlayZdFlBfxjT+BEmihHLnh EoHF99FlQ36K3HhLmlxcBj3GHJPGc/eH6HdmF8raOXWkFUQK9HE8jfjDrs4JXNgmLFPaLGMui dh7lv4F+B/FPTE98eFFdDfxiMtvfjIEPET5H45eTqYyUgjZ60+WUMwInst8snKnS9NssHpHOK BtY9oUaA56T/Q8Urp3KlQTS9QSf0mlHHIPYN1Q== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When CONFIG_OF is disabled, we get a harmless warning about an unused variable: drivers/mfd/sun6i-prcm.c: In function 'sun6i_prcm_probe': drivers/mfd/sun6i-prcm.c:151:22: error: unused variable 'np' [-Werror=unused-variable] Remove the variable and open-code the value in the only place it is used, so it can get left out as well without CONFIG_OF. Fixes: a05a2e7998ab ("mfd: sun6i-prcm: Allow to compile with COMPILE_TEST") Signed-off-by: Arnd Bergmann --- drivers/mfd/sun6i-prcm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.20.0 Acked-by: Maxime Ripard diff --git a/drivers/mfd/sun6i-prcm.c b/drivers/mfd/sun6i-prcm.c index 2b658bed47db..2f12a415b807 100644 --- a/drivers/mfd/sun6i-prcm.c +++ b/drivers/mfd/sun6i-prcm.c @@ -148,13 +148,12 @@ static const struct of_device_id sun6i_prcm_dt_ids[] = { static int sun6i_prcm_probe(struct platform_device *pdev) { - struct device_node *np = pdev->dev.of_node; const struct of_device_id *match; const struct prcm_data *data; struct resource *res; int ret; - match = of_match_node(sun6i_prcm_dt_ids, np); + match = of_match_node(sun6i_prcm_dt_ids, pdev->dev.of_node); if (!match) return -EINVAL;