Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1325999
| Path | csiph.com!goblin1!goblin2!goblin.stu.neva.ru!gothmog.csi.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Arnd Bergmann <arnd@arndb.de> |
| Newsgroups | linux.kernel |
| Subject | [PATCH] kernel/locking/lockdep.c: mark chainhashentry as __maybe_unused |
| Date | Wed, 03 Feb 2016 23:10:02 +0100 |
| Message-ID | <qYdMC-7MT-29@gated-at.bofh.it> (permalink) |
| X-Original-To | Andrew Morton <akpm@linux-foundation.org> |
| X-Mailer | git-send-email 2.7.0 |
| X-Provags-ID | V03:K0:L3G5/7hPR3BAlNMHCPuBTEzqypq2sCqWKoyO1V81GT4tvPwE5dL U4lbsXIjxh1wQEQbYZXJV4KwhD/y5nA6ggl4eKVQ0Rjp9W0n8mAQ/tAdPSc5C+8L4jCTHfP FNeK5vQHNK0ZuiQxCo5SBELNqAdfUaC/0WOe7Z7TOzSI20lTz4I6/Y9azHzq3YVYaO87ayc At53k44DjRj8luSz89wMA== |
| X-Ui-Out-Filterresults | notjunk:1;V01:K0:A8an0l/eGaE=:HZ48urYHkBvqx+gH7bijO1 YAgdUfPX6hcEGZWRz2Ibh4A1QKXN3Bzh8CWeelPBwzPtL5BI2PJPP0HHTQma9StOzLLvR/Pe4 O9kTutqtTZY+Vy9D51nucJGU5ErGrl5A4+zJl6ERIfTnOwHA/eUVVunoJ+yPGSnVIiDaZYX5n eVX6o52TcxaAxBVvKVgVbFopIpZm0xp7rq312cHYGjO9H/i3f6Qll64juy84rr2/JsMHvJ4PP QlkpoAj8YSXLN9My2q2LzjPYL8uIsx4OSOYj1lBTT8Hn/KsGA0SbxzQFwB1/eHOnzQ7hrRizL Y1abJD3soS7LkQyJJPiix5MduRoJHcv0zAv9fw62BZjUAHAkyjd8BU6x2clqVt4GZnckMtsi1 6vXY6Qhot9hxcmYg3mButHbbX9DxLmYLlIj8MunpGtpt+FGLGEIrux1oy/vpdy4R3qdaE3ld6 4MCLExjOakiD2iMbvOi6wXL/Gid8JGkgEZbMNJ3XaxjsFvXbYbsVr16ttEkYw2+JTN1MExkTv +aCF3xyXq9xCEv5KSMj1MxnNl3p5ajpTab3dtbdKZzHQEL+JTjULdSDXx5K9nQ0uxrpzVZsCU +N8DZStOG5JZDejQtDPQg7J1fvjjaiyQ+tv04dZIpCSA6GLpKdUAsq9GfgIMNNWShyNENqKQK W3BpdnaMc4Xn9pVzdLYjGUFqN4AlWhJgWo+ztgqfR/bVhVTnF2F4O5iLro5z4TTHZtpo= |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 29 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | linux-arm-kernel@lists.infradead.org, Arnd Bergmann <arnd@arndb.de>, Mike Krinkin <krinkin.m.u@gmail.com>, Andrey Ryabinin <aryabinin@virtuozzo.com>, Ingo Molnar <mingo@elte.hu>, Peter Zijlstra <peterz@infradead.org>, Ingo Molnar <mingo@redhat.com>, linux-kernel@vger.kernel.org |
| X-Original-Date | Wed, 3 Feb 2016 23:05:50 +0100 |
| X-Original-Message-ID | <1454537158-3759624-1-git-send-email-arnd@arndb.de> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1325999 |
Show key headers only | View raw
The newly added chainhashentry() function is only use when
CONFIG_PROVE_LOCKING is enabled, otherwise we get a warning about it.
kernel/locking/lockdep.c:318:26: error: 'chainhashentry' defined but not used [-Werror=unused-function]
We could add another #ifdef or add __maybe_unused to avoid the warning,
this patch picks the second option.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: a33a23c7def8 ("kernel/locking/lockdep.c: make lockdep initialize itself on demand")
---
kernel/locking/lockdep.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index 9269b1a74260..0d3c08d23946 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -315,7 +315,7 @@ static inline struct list_head *classhashentry(struct lockdep_subclass_key *key)
static struct list_head __chainhash_table[CHAINHASH_SIZE];
-static struct list_head *chainhashentry(unsigned long chain)
+static __maybe_unused struct list_head * chainhashentry(unsigned long chain)
{
if (unlikely(!lockdep_initialized))
lockdep_init();
--
2.7.0
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH] kernel/locking/lockdep.c: mark chainhashentry as __maybe_unused Arnd Bergmann <arnd@arndb.de> - 2016-02-03 23:10 +0100
csiph-web