From patchwork Wed Oct 7 10:12:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 105313 Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp2349861lbq; Wed, 7 Oct 2015 03:12:18 -0700 (PDT) X-Received: by 10.68.244.34 with SMTP id xd2mr259384pbc.50.1444212738689; Wed, 07 Oct 2015 03:12:18 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id hl5si56579968pbc.153.2015.10.07.03.12.18; Wed, 07 Oct 2015 03:12:18 -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 S1752020AbbJGKMP (ORCPT + 30 others); Wed, 7 Oct 2015 06:12:15 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:52420 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751399AbbJGKMN (ORCPT ); Wed, 7 Oct 2015 06:12:13 -0400 Received: from wuerfel.localnet ([149.172.15.242]) by mrelayeu.kundenserver.de (mreue104) with ESMTPSA (Nemesis) id 0ML7xp-1Zk2gd48nZ-000IGo; Wed, 07 Oct 2015 12:12:11 +0200 From: Arnd Bergmann To: Liam Girdwood , Mark Brown Cc: linux-kernel@vger.kernel.org, Sascha Hauer Subject: [PATCH] regulator: core: mark lock functions as __maybe_unused Date: Wed, 07 Oct 2015 12:12:09 +0200 Message-ID: <6130994.OMIWUN9F6x@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x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d3wf Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit 9f01cd4a915e1 ("regulator: core: introduce function to lock regulators and its supplies") introduced a pair of new functions that are marked static but so far not used, which causes annoying but harmless compiler warnings: drivers/regulator/core.c:139:13: warning: 'regulator_lock_supply' defined but not used [-Wunused-function] static void regulator_lock_supply(struct regulator_dev *rdev) The best way to avoid these would be to add the code that will use these functions. If that still takes a while, this patch at least shuts up the compiler by marking the functions as __maybe_unused. The same could be achieved by marking them as static inline or non-static, or by hiding them from the compiler, but those seemed less appropriate. Signed-off-by: Arnd Bergmann -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 7896ef53ff86..96dd7e1f1f28 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -136,7 +136,7 @@ static bool have_full_constraints(void) * regulator_lock_supply - lock a regulator and its supplies * @rdev: regulator source */ -static void regulator_lock_supply(struct regulator_dev *rdev) +static void __maybe_unused regulator_lock_supply(struct regulator_dev *rdev) { struct regulator *supply; int i = 0; @@ -156,7 +156,7 @@ static void regulator_lock_supply(struct regulator_dev *rdev) * regulator_unlock_supply - unlock a regulator and its supplies * @rdev: regulator source */ -static void regulator_unlock_supply(struct regulator_dev *rdev) +static void __maybe_unused regulator_unlock_supply(struct regulator_dev *rdev) { struct regulator *supply;