Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1650486
| From | "Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 07/21] liblockdep: Fix 'defined but not used' warning for init_utsname() |
| Date | 2017-05-25 15:10 +0200 |
| Message-ID | <tL0GD-c1-49@gated-at.bofh.it> (permalink) |
| References | <tL0wV-8li-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Ben Hutchings <ben@decadent.org.uk>
We define init_utsname() as static but not inline, resulting
in a warning for every source file that includes lockdep.h but
doesn't call it.
Since it is only used by lockdep.c, define it in there.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
tools/lib/lockdep/lockdep.c | 10 ++++++++++
tools/lib/lockdep/uinclude/linux/lockdep.h | 10 ----------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/tools/lib/lockdep/lockdep.c b/tools/lib/lockdep/lockdep.c
index 443acb11f907..209f967dedaa 100644
--- a/tools/lib/lockdep/lockdep.c
+++ b/tools/lib/lockdep/lockdep.c
@@ -12,4 +12,14 @@ u32 prandom_u32(void)
abort();
}
+static struct new_utsname *init_utsname(void)
+{
+ static struct new_utsname n = (struct new_utsname) {
+ .release = "liblockdep",
+ .version = LIBLOCKDEP_VERSION,
+ };
+
+ return &n;
+}
+
#include "../../../kernel/locking/lockdep.c"
diff --git a/tools/lib/lockdep/uinclude/linux/lockdep.h b/tools/lib/lockdep/uinclude/linux/lockdep.h
index d1079034a14d..c157242e0417 100644
--- a/tools/lib/lockdep/uinclude/linux/lockdep.h
+++ b/tools/lib/lockdep/uinclude/linux/lockdep.h
@@ -44,16 +44,6 @@ static inline int debug_locks_off(void)
#define atomic_t unsigned long
#define atomic_inc(x) ((*(x))++)
-static struct new_utsname *init_utsname(void)
-{
- static struct new_utsname n = (struct new_utsname) {
- .release = "liblockdep",
- .version = LIBLOCKDEP_VERSION,
- };
-
- return &n;
-}
-
#define print_tainted() ""
#define static_obj(x) 1
--
2.11.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/21] liblockdep fixes for v4.12 "Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com> - 2017-05-25 15:00 +0200
[PATCH 10/21] tools: add install make target for liblockdep "Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com> - 2017-05-25 15:00 +0200
[tip:locking/core] tools: Add install make target for liblockdep tip-bot for Alexander Sverdlin <tipbot@zytor.com> - 2017-06-05 11:20 +0200
[PATCH 06/21] liblockdep: Fix 'set but not used' warnings "Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com> - 2017-05-25 15:00 +0200
[tip:locking/core] tools/lib/lockdep: Fix 'set but not used' warnings tip-bot for Ben Hutchings <tipbot@zytor.com> - 2017-06-05 11:10 +0200
[PATCH 03/21] liblockdep: Define the ARRAY_SIZE() macro "Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com> - 2017-05-25 15:00 +0200
[tip:locking/core] tools/lib/lockdep: Define the ARRAY_SIZE() macro tip-bot for Ben Hutchings <tipbot@zytor.com> - 2017-06-05 11:10 +0200
[PATCH 11/21] tools: liblockdep: Don't mix fd-based and stream IO "Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com> - 2017-05-25 15:10 +0200
[tip:locking/core] tools/lib/lockdep: Don't mix fd-based and stream IO tip-bot for Alexander Sverdlin <tipbot@zytor.com> - 2017-06-05 11:20 +0200
[PATCH 19/21] tools include: add IS_ERR_OR_NULL to err.h "Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com> - 2017-05-25 15:10 +0200
[tip:locking/core] tools/include: Add IS_ERR_OR_NULL to err.h "tip-bot for Levin, Alexander (Sasha Levin)" <tipbot@zytor.com> - 2017-06-05 11:20 +0200
[PATCH 09/21] MAINTAINERS: update email for Sasha Levin "Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com> - 2017-05-25 15:10 +0200
[tip:locking/core] MAINTAINERS: Update email for Sasha Levin "tip-bot for Levin, Alexander (Sasha Levin)" <tipbot@zytor.com> - 2017-06-05 11:10 +0200
[PATCH 04/21] liblockdep: Enable -Wall by default "Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com> - 2017-05-25 15:10 +0200
[tip:locking/core] tools/lib/lockdep: Enable -Wall by default tip-bot for Ben Hutchings <tipbot@zytor.com> - 2017-06-05 11:10 +0200
[PATCH 12/21] tools: liblockdep: fix compilation for 4.11 "Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com> - 2017-05-25 15:10 +0200
[tip:locking/core] tools/lib/lockdep: Fix compilation for 4.11 "tip-bot for Levin, Alexander (Sasha Levin)" <tipbot@zytor.com> - 2017-06-05 11:20 +0200
[PATCH 21/21] tools: liblockdep: hide liblockdep output from test results "Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com> - 2017-05-25 15:10 +0200
[tip:locking/core] tools/lib/lockdep: Hide liblockdep output from test results "tip-bot for Levin, Alexander (Sasha Levin)" <tipbot@zytor.com> - 2017-06-05 11:20 +0200
[PATCH 14/21] tools: liblockdep: Remove double-quotes from soname "Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com> - 2017-05-25 15:10 +0200
[tip:locking/core] tools/lib/lockdep: Remove double-quotes from soname tip-bot for Ben Hutchings <tipbot@zytor.com> - 2017-06-05 11:20 +0200
[PATCH 17/21] tools: liblockdep: include err.h "Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com> - 2017-05-25 15:10 +0200
[tip:locking/core] tools/lib/lockdep: Include err.h "tip-bot for Levin, Alexander (Sasha Levin)" <tipbot@zytor.com> - 2017-06-05 11:20 +0200
[PATCH 15/21] tools: liblockdep: Use LDFLAGS "Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com> - 2017-05-25 15:10 +0200
[tip:locking/core] tools/lib/lockdep: Use LDFLAGS tip-bot for Ben Hutchings <tipbot@zytor.com> - 2017-06-05 11:20 +0200
[PATCH 20/21] tools: liblockdep: add dummy current_gfp_context() "Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com> - 2017-05-25 15:10 +0200
[tip:locking/core] tools/lib/lockdep: Add dummy current_gfp_context() "tip-bot for Levin, Alexander (Sasha Levin)" <tipbot@zytor.com> - 2017-06-05 11:20 +0200
[PATCH 18/21] tools: liblockdep: add empty __is_[module,kernel]_percpu_address "Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com> - 2017-05-25 15:10 +0200
[tip:locking/core] tools/lib/lockdep: Add empty __is_[module,kernel]_percpu_address "tip-bot for Levin, Alexander (Sasha Levin)" <tipbot@zytor.com> - 2017-06-05 11:20 +0200
[PATCH 07/21] liblockdep: Fix 'defined but not used' warning for init_utsname() "Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com> - 2017-05-25 15:10 +0200
[tip:locking/core] tools/lib/lockdep: Fix 'defined but not used' warning for init_utsname() tip-bot for Ben Hutchings <tipbot@zytor.com> - 2017-06-05 11:10 +0200
Re: [PATCH 00/21] liblockdep fixes for v4.12 Ingo Molnar <mingo@kernel.org> - 2017-05-26 09:00 +0200
Re: [PATCH 00/21] liblockdep fixes for v4.12 "Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com> - 2017-05-26 13:00 +0200
Re: [PATCH 00/21] liblockdep fixes for v4.12 Ingo Molnar <mingo@kernel.org> - 2017-05-26 13:30 +0200
Re: [PATCH 00/21] liblockdep fixes for v4.12 "Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com> - 2017-05-26 13:50 +0200
Re: [PATCH 00/21] liblockdep fixes for v4.12 Ingo Molnar <mingo@kernel.org> - 2017-05-28 11:20 +0200
csiph-web