Skip to content

kallsyms header cleanup

Tom Zanussi lkml 4 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest6 patches 0 repliesNew
  2. v37 patches 0 repliesSuperseded
  3. v27 patches 1 replySuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v14 patches5 repliesSuperseded

Changes in v4 from the cover letter

- rebased to latest linux-next, which now includes a patch that adds module.h to kallsyms.h [commit 5ed0a999 kernel/kallsyns.c: define kallsyms_cmp_symbol_t as function type to simplify the code], so patch 2 of the previous version was removed.

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6tracing: Remove kallsyms.h include from linux/ftrace.hinclude/linux/ftrace.h kernel/trace/trace_kprobe.c kernel/trace/trace_output.c +1 more+3 -10 replies
2/6tracing: Remove redundant module.h includeskernel/trace/trace_output.c kernel/trace/trace_syscalls.c+0 -20 replies
3/6lib: Remove redundant module.h includeslib/vsprintf.c+0 -10 replies
4/6fnic: Remove redundant module.h includesdrivers/scsi/fnic/fnic_trace.c+0 -10 replies
5/6slub: Remove redundant module.h includesmm/slub.c+0 -10 replies
6/6tracing: Remove unnecessary kallsyms.h and module.h includeskernel/trace/trace.c kernel/trace/trace_branch.c kernel/trace/trace_export.c +4 more+0 -130 replies

Reviews trailers per patch

1 of 6 patches has a Reviewed-by or Acked-by.

PatchDavid Rientjes
1/6
2/6
3/6
4/6
5/6A-b
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/6] kallsyms header cleanup

During review of an unrelated patchset, the question was asked why module.h was included in code that wouldn't be a module and didn't do anything with modules [1].

The reason is that it uses kallsyms defines, but kallsyms.h doesn't include module.h, though it should because it uses MODULE_NAME_LEN. The code in question also didn't include kallsyms.h but relied on ftrace.h to pull it in. But ftrace.h no longer contains anything that needs kallsyms.h, and continues to include it only because other code expects it to.

This patchset is the start of cleaning all that up. It also adds explicit kallsyms.h includes and removes module.h includes for obvious cases in kernel/trace and lib/, where I happened to be working.

There are a bunch of other files that probably include module.h only for kallsyms, but I haven't gone through them yet. I can submit a follow-on patchset to this one assuming this is best way to do it...

[1] https://lkml.org/lkml/2015/4/4/70

Changes from v3:
- rebased to latest linux-next, which now includes a patch that adds module.h to kallsyms.h [commit 5ed0a999 kernel/kallsyns.c: define kallsyms_cmp_symbol_t as function type to simplify the code], so patch 2 of the previous version was removed.

Changes from v2:
- rebased to linux-next
- trace.c now needs module.h so leave it

Changes from v1:
- added KSYM_SYMBOL_LEN patches for fnic and slub
- separated tracing changes into KSYM_SYMBOL_LEN-only module.h changes
- fixed up bogus lib change from previous patchset
- separate patch to remove unnecessary tracing kallsyms.h and module.h usage

The following changes since commit 6593e2dcdedd0493e1b1fcb419609d2101c4d0be:

Add linux-next specific files for 20150716 (2015-07-16 16:23:42 +1000)

are available in the git repository at:

git://git.yoctoproject.org/linux-yocto-contrib.git tzanussi/kallsyms-header-cleanup-v4
http://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto-contrib/log/?h=tzanussi/kallsyms-header-cleanup-v4

Tom Zanussi (6):
tracing: Remove kallsyms.h include from linux/ftrace.h
tracing: Remove redundant module.h includes
lib: Remove redundant module.h includes
fnic: Remove redundant module.h includes
slub: Remove redundant module.h includes
tracing: Remove unnecessary kallsyms.h and module.h includes

 drivers/scsi/fnic/fnic_trace.c    | 1 -
 include/linux/ftrace.h            | 1 -
 kernel/trace/trace.c              | 1 -
 kernel/trace/trace_branch.c       | 2 --
 kernel/trace/trace_export.c       | 2 --
 kernel/trace/trace_irqsoff.c      | 2 --
 kernel/trace/trace_kprobe.c       | 1 +
 kernel/trace/trace_output.c       | 2 +-
 kernel/trace/trace_sched_switch.c | 2 --
 kernel/trace/trace_sched_wakeup.c | 2 --
 kernel/trace/trace_stack.c        | 2 --
 kernel/trace/trace_syscalls.c     | 2 +-
 lib/vsprintf.c                    | 1 -
 mm/slub.c                         | 1 -
 14 files changed, 3 insertions(+), 19 deletions(-)
Signature · 1 line
1.9.3