From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752016AbbJGKMP (ORCPT ); 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 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; x86_64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:1sHd6WWHGLwph5ncwfh0IY2vSm69PXKTbNM6bN2ky99ri8uvKcn Uo6FhOJSkECfzMgZIYar45ca9Bv1rvjT7XE84ypuVQz9QZ7g2/NfBcJ87mDKc8wyyqPgIg0 p+TfUK8YzXZIHkKmYLjZ0hTUBQdXvtwN4X3CQJrPAAsn3uuJwRwivd/1lM3w7AoIl1/S5CZ oywa0zIBqZY9vGlNJkWlA== X-UI-Out-Filterresults: notjunk:1;V01:K0:ZU69Wh2G4r0=:7Eumi0syfmgndomfsd7umT 3BXYNOpcoN7rP0u6YhWHJXvmIUVPLZHH+Yv6qLir6VgsVbad9tP1IL/ME7NLr/JE78fEHO8A0 QT4kpkiz7UUaw2gx2sxW1A4wM8aIvSIqb76rznxuTgFnvrTRiewFPk6TzYpLHcKXoqOYd9rs4 sqc1qLzMJ3Gb6TndU7wFNk+M3urPJoDSXevb5ujMxVk4l6b09TQGM6vg14jbz2X2K5jV9RAbx ShKe4dw/iuHG2GzLAVVg00+K8C+BBmk/43oOX+0L/eKzcLqPVOzMtfuwn5LmxsGf+DrhRJVF5 cw6tDOkmqtIgiDZxJvAZoxnufAggcAiiBmzCwyhor9BMCnAtq6761if1WT3kfIj2vLIcAXoZ8 n72QCd4Uu0l6/QF8IeOZFZngyb18rfJ9P0n7EyxYvX9pcAlwUbAw+JQ115FvFEPmbbqfbww7Y zMhf2z09y9LD8SKHhn6ghdjGloUWpvBgwNwmNU/GQA4de5Zc5MAH7ctsoOyginVTd6Rn4/kNH Sy6U4GdtU7zgv2eCJ6khWMBumtFu5h4LXgVxZLBA6kYnXgG8DqZ5yvkz8tsJGX8nVGkSnhRrJ zuvYvRlwHu0yXNR+8w3WNqma0gyVVE7fG6YYvzvZKCyiQS8sQ0KjgxqgGHOhOGxPpZZfPbf3R n9TUR6j02Q35yYhvnr+u7yQOsGcL87Ya/mIMm8vISylpt7zECGH51XWu60kht119131FU2K5z kHcKiw6DSzf/d3wf Sender: linux-kernel-owner@vger.kernel.org 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 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;