27 Oct, 2010
30 commits
-
Signed-off-by: Joe Perches
Cc: Andy Whitcroft
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Add warnings for possible missing const uses of
static char foo[] = "bar"
that could be
static const char foo[] = "bar"
and
static const char *foo[] = {"bar", "baz"}
that could be
static const char * const foo[] = {"bar", "baz"}Signed-off-by: Joe Perches
Cc: Mike Frysinger
Cc: Andy Whitcroft
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: Andy Whitcroft
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
When tracking context to find a block or statement we need to use the
sanitised lines, else perentheses '(' & ')' and braces '{' & '}' can throw
the scanner out. Also fix up a couple of error outputs which include
those sanitised lines incorrectly.Signed-off-by: Andy Whitcroft
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Handly definitions similar to below. The definition macro spits out a
symbol with a prefix. Add matching of any identifier prefix:DEVICE_ATTR(link_power_management_policy, S_IRUGO | S_IWUSR,
ata_scsi_lpm_show, ata_scsi_lpm_put);
EXPORT_SYMBOL_GPL(dev_attr_link_power_management_policy);Signed-off-by: Andy Whitcroft
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Handle definitions such as the following correctly, it is not
a complex statement:#define PREALLOC(NAME, START, END, FLAGS) { \
.name = (NAME), \
.start = (START), \
.end = (END), \
.flags = (FLAGS) \
},Signed-off-by: Andy Whitcroft
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: Andy Whitcroft
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
On Wed, 2010-08-11 at 12:35 -0400, Dave Jones wrote:
> I just got this from a patch I merged..
>
> ERROR: need consistent spacing around '*' (ctx:WxV)
> #121: FILE: arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c:113:
> +static struct pcc_cpu __percpu *pcc_cpu_info;
> ^
> which doesn't seem right.Perhaps these need to be added to checkpatch.
[apw@canonical.com: added tests]
Signed-off-by: Joe Perches
Signed-off-by: Andy Whitcroft
Cc: Dave Jones
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Throw an error when a source file has been given execute permissions using
the mode change line present in git diffs. Also alow the filename
matching to use the "diff" line in addition to the "+++" line, since the
mode change lines appear before any "+++" lines.[apw@canonical.com: simplified filename logic slightly, added tests]
Cc: Andy Whitcroft
Acked-by: Linus Walleij
Signed-off-by: Rabin Vincent
Signed-off-by: Andy Whitcroft
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
When checking the length of the help we need to be sure we are seeing the
whole story before erroring. Firstly we only want to check when adding
the help in the first place. Second we need to be sure that we are seeing
the end of the entry, nominally when there is no context below or that
context shows the start of the next entry.Signed-off-by: Andy Whitcroft
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Commonise the code for missing spaces after struct, union, and enum such
that they share the same code. Ensure we cover all the common cases in
each case. Check against the sanitised line to ensure we do not report on
comments and strings.Signed-off-by: Andy Whitcroft
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Add spacing checks for struct, union, and enum definitions. Check the
spacing after type and before the equals (=) and open brace ({).Based on a patch by Joe Perches.
Cc: Joe Perches
Signed-off-by: Andy Whitcroft
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Add a (strict mode only) test to check for non-negative returns of what
appear to be errno values as the majority case these should indeed be
negative.Suggested-by: Andrew Morton
Signed-off-by: Andy Whitcroft
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The following incantation is triggering categorisation of its colon (:) as
a binary form, which it is not:return foo ? (s8)bar : baz;
Handle casts differently from types in the categoriser, allowing us to
better track (s8)bar as a value and not a declaration.Reported-by: Jean Delvare
Signed-off-by: Andy Whitcroft
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
When determining if a return () sequence is a function style bracketing we
simplify the expression one bracket at a time replacing each with a
constant. However this can trigger a false merge with expressions as
below:return (foo)0;
Prevent this false merging.
Reported-by: Hitoshi Mitake
Signed-off-by: Andy Whitcroft
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
When we hit types of whitespace which may be fixed by scripts/cleanpatch
and scripts/cleanfile suggest their use in our report.Suggested-by: Bartlomiej Zolnierkiewicz
Signed-off-by: Andy Whitcroft
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
When the following form is used we have a type which fully fills a line.
This means that a type may end at the end of line as well as at the
following identifier.int **
foo;Reported-by: Daniel Walker
Signed-off-by: Andy Whitcroft
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The patch "checkpatch: fix handling of leading spaces" added checks for
leading spaces on lines, but this introduces regressions. Firstly it does
not correctly detect when we are in a comment. Secondly it does not allow
for preprocessor command spacing. Finally it does not allow for label
indentation which is required to be less than one tab. Fix these up:Signed-off-by: Andy Whitcroft
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Fix a defect with the first mailing list address being used for each
subsequent mailing list.Updated to 0.26-beta6.
Signed-off-by: Joe Perches
Cc: Florian Mickler
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Use Florian Mickler's mailmap routine to reduce name duplication.
o Add subroutine deduplicate_email to centralize code
o Add hashes for deduplicate_(name|address)_hash
o Remove now unused @interactive_to
o Whitespace neatening
o Add command line --help text
o Add --mailmap command line option control
o Interactive changes:
- Add toggles for maintainer, git and list selections
- Default selection is all
- Add mailmap controlUpdate to 0.26-beta5
Signed-off-by: Joe Perches
Cc: Florian Mickler
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
And a miscellaneous conversion of You to you in a help message
Signed-off-by: Joe Perches
Cc: Florian Mickler
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Implement it, like it is described in git-shortlog.
Signed-off-by: Florian Mickler
Signed-off-by: Joe Perches
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Case insensitive name and email address matching can help reduce
duplication when authors don't always use the exact same signature.o Add a --interactive per-file exact_match hash so git history
can be checked on per-file only when there is no direct maintainer
o Make @interactive_to list global so save_commits_by_ can check
email names & addresses against this list for duplication
o Don't allow --interactive and --sections
o rename subroutine get_maintainer to get_maintainers
o Added help text option to --interactive menu promptUpdate version to 0.26-beta4
Signed-off-by: Joe Perches
Cc: Florian Mickler
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
o Added searching by git-blame as well as git-history
o Added different selection toggles
o Added ability to list commits by author or by sign-off-type
o Use custom git and hg formats to make searching for subject/author
a bit easier.
o Move inlined section matching and searching git/hg history to
new get_maintainer subroutine
o Added subroutines save_commits_by_author and save_commits_by_signer
o Removed subroutines vcs_get_shortlog and vcs_email_shortlog
o Rename camelcase signaturePattern to signature_patternUpdate to 0.26 beta3
Signed-off-by: Joe Perches
Cc: Florian Mickler
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This is a first version of an interactive mode for
scripts/get_maintainer.pl.It allows the user to interact with the script. Each cc candidate can be
selected and deselected and a shortlog of authored commits can be
displayed for each candidate.The menu is displayed via STDERR, the end result is outputted to STDOUT.
This unusual mechanism allows using get_maintainer.pl in interactive mode
via git send-email --cc-cmd.Signed-off-by: Joe Perches
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
On Mon, 2010-09-13 at 00:01 -0400, Valdis.Kletnieks@vt.edu wrote:
> Any chance of getting that to be ~/.get_maintainer.conf rather than
> ./.get_maintainer.conf? I've just gotten bit like the 3rd or 4th time by
> "oh but you didn't create that file in *this* tree"
> (I usually have a linus git tree, a linux-next tree, and 3-4 -mm trees)Sure.
Add a search path for the .conf file.
3 paths are added:
. customized per-tree configurations
$HOME user global configuration when per-tree configs don't exist
./scripts lk defaults to override scriptSigned-off-by: Joe Perches
Cc: Valdis Kletnieks
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Adding commit signers when there is a listed MAINTAINER for a file
can make the output list longer than necessary.Change the --git default from on to off.
Add a new --git-fallback option (default on) used to add commit signers
only when there is no MAINTAINER for a file.git history is used when --git-fallback is enabled and the pattern
directory depth is not the same as the file directory depth.For instance:
X86 ARCHITECTURE (32-BIT AND 64-BIT)
M: Thomas Gleixner
M: Ingo Molnar
M: "H. Peter Anvin"
M: x86@kernel.org
T: git git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86.git
S: Maintained
F: Documentation/x86/
F: arch/x86/If using "./scripts/get_maintainer -f arch/x86/lib/atomic64_32.c", the pattern
for "arch/x86/" does not match the directory depth of "arch/x86/lib"
so the MAINTAINERS entries and git history is used to produce:$ ./scripts/get_maintainer.pl -f --rolestats arch/x86/lib/atomic64_32.c
Thomas Gleixner (maintainer:X86 ARCHITECTURE...)
Ingo Molnar (maintainer:X86 ARCHITECTURE...)
"H. Peter Anvin" (maintainer:X86 ARCHITECTURE...,commit_signer:1/1=100%)
x86@kernel.org (maintainer:X86 ARCHITECTURE...)
Luca Barbieri (commit_signer:1/1=100%)
linux-kernel@vger.kernel.org (open list)Luca Barbieri is added because he signed the only commit to
arch/x86/lib/atomic64_32.c during the last year and he meets the
other default qualifications.
--git-min-percent (default:10)
--git-min-signatures (default:1)If current users of ./scripts/get_maintainers.pl have scripts
that use --nogit that expect git history to be excluded, those
scripts should be updated to include --nogit-fallback or a
.get_maintainer.conf file should be created with --nogit-fallback.Signed-off-by: Joe Perches
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Keyword matching uses K: patterns from MAINTAINERS, so if looking for the
MAINTAINERS maintainer, don't search MAINTAINERS for pattern matches.
MAINTAINERS also has rather a lot of email addresses and is easily
searched using grep "^M:", so skip it.Signed-off-by: Joe Perches
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Fix an overly indented block.
Signed-off-by: Joe Perches
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
When options --git-blame and --rolestats are specified, add
the maintainers with the qualifying --git-min-percent amount
of lines authored of the complete file. Does not add more
authors than specified by --git-max-maintainers.For anyone using hg, this option works but is _very_ slow.
It's orders of magnitude slower than git slow.The get_maintainer.pl version was incremented to 0.25.
This can be used with or without --git.
For instance:
$ ./scripts/get_maintainer.pl --git-blame --nogit --rolestats -f lib/bitmap.c
Paul Jackson (authored lines:406/613=66%,commits:7/20=35%)
Akinobu Mita (authored lines:87/613=14%,commits:3/20=15%)
Reinette Chatre (authored lines:42/613=7%)
Andrew Morton (commits:16/20=80%)
Paul Mundt (commits:3/20=15%)
Randy Dunlap (commits:2/20=10%)$ ./scripts/get_maintainer.pl --git-blame --git --rolestats -f lib/bitmap.c
Andrew Morton (commit_signer:4/5=80%,commits:16/20=80%)
Akinobu Mita (commit_signer:2/5=40%,authored lines:87/613=14%,commits:3/20=15%)
Jack Steiner (commit_signer:1/5=20%)
Ben Hutchings (commit_signer:1/5=20%)
Lee Schermerhorn (commit_signer:1/5=20%)
Paul Jackson (authored lines:406/613=66%,commits:7/20=35%)
Reinette Chatre (authored lines:42/613=7%)
Paul Mundt (commits:3/20=15%)
Randy Dunlap (commits:2/20=10%)
linux-kernel@vger.kernel.org (open list)Signed-off-by: Joe Perches
Cc: Mark Brown
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
22 Oct, 2010
2 commits
-
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (278 commits)
arm: remove machine_desc.io_pg_offst and .phys_io
arm: use addruart macro to establish debug mappings
arm: return both physical and virtual addresses from addruart
arm/debug: consolidate addruart macros for CONFIG_DEBUG_ICEDCC
ARM: make struct machine_desc definition coherent with its comment
eukrea_mbimxsd-baseboard: Pass the correct GPIO to gpio_free
cpuimx27: fix compile when ULPI is selected
mach-pcm037_eet: fix compile errors
Fixing ethernet driver compilation error for i.MX31 ADS board
cpuimx51: update board support
mx5: add cpuimx51sd module and its baseboard
iomux-mx51: fix GPIO_1_xx 's IOMUX configuration
imx-esdhc: update devices registration
mx51: add resources for SD/MMC on i.MX51
iomux-mx51: fix SD1 and SD2's iomux configuration
clock-mx51: rename CLOCK1 to CLOCK_CCGR for better readability
clock-mx51: factorize clk_set_parent and clk_get_rate
eukrea_mbimxsd: add support for DVI displays
cpuimx25 & cpuimx35: fix OTG port registration in host mode
i.MX31 and i.MX35 : fix errate TLSbo65953 and ENGcm09472
... -
…git/tip/linux-2.6-tip
* 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (163 commits)
tracing: Fix compile issue for trace_sched_wakeup.c
[S390] hardirq: remove pointless header file includes
[IA64] Move local_softirq_pending() definition
perf, powerpc: Fix power_pmu_event_init to not use event->ctx
ftrace: Remove recursion between recordmcount and scripts/mod/empty
jump_label: Add COND_STMT(), reducer wrappery
perf: Optimize sw events
perf: Use jump_labels to optimize the scheduler hooks
jump_label: Add atomic_t interface
jump_label: Use more consistent naming
perf, hw_breakpoint: Fix crash in hw_breakpoint creation
perf: Find task before event alloc
perf: Fix task refcount bugs
perf: Fix group moving
irq_work: Add generic hardirq context callbacks
perf_events: Fix transaction recovery in group_sched_in()
perf_events: Fix bogus AMD64 generic TLB events
perf_events: Fix bogus context time tracking
tracing: Remove parent recording in latency tracer graph options
tracing: Use one prologue for the preempt irqs off tracer function tracers
...
20 Oct, 2010
1 commit
19 Oct, 2010
2 commits
-
…x' and 'unwind' into devel
-
When DYNAMIC_FTRACE is enabled and we use the C version of recordmcount,
all objects are run through the recordmcount program to create a
separate section that stores all the callers of mcount.The build process has a special file: scripts/mod/empty.o. This is
built from empty.c which is literally an empty file (except for a
single comment). This file is used to find information about the target
elf format, like endianness and word size.The problem comes up when we need to build recordmcount. The
build process requires that empty.o is built first. The build rules
for empty.o will try to execute recordmcount on the empty.o file.
We get an error that recordmcount does not exist.To avoid this recursion, the build file will skip running recordmcount
if the file that it is building is script/mod/empty.o.[ extra comment Suggested-by: Sam Ravnborg ]
Reported-by: Ingo Molnar
Tested-by: Ingo Molnar
Cc: Michal Marek
Cc: linux-kbuild@vger.kernel.org
Signed-off-by: Steven Rostedt
16 Oct, 2010
1 commit
-
The C version of recordmcount is compiled to a binary, which will
end up located in the objtree. If the kernel is built with O=path,
the srctree will not include the binary recordmcount caller.Cc: Michal Marek
Cc: linux-kbuild@vger.kernel.org
Signed-off-by: Steven Rostedt
15 Oct, 2010
4 commits
-
The file kernel/trace/ftrace.c references the mcount() call to
convert the mcount() callers to nops. But because it references
mcount(), the mcount() address is placed in the relocation table.The C version of recordmcount reads the relocation table of all
object files, and it will add all references to mcount to the
__mcount_loc table that is used to find the places that call mcount()
and change the call to a nop. When recordmcount finds the mcount reference
in kernel/trace/ftrace.o, it saves that location even though the code
is not a call, but references mcount as data.On boot up, when all calls are converted to nops, the code has a safety
check to determine what op code it is actually replacing before it
replaces it. If that op code at the address does not match, then
a warning is printed and the function tracer is disabled.The reference to mcount in ftrace.c, causes this warning to trigger,
since the reference is not a call to mcount(). The ftrace.c file is
not compiled with the -pg flag, so no calls to mcount() should be
expected.This patch simply makes recordmcount.c skip the kernel/trace/ftrace.c
file. This was the same solution used by the perl version of
recordmcount.Reported-by: Ingo Molnar
Cc: John Reiser
Signed-off-by: Steven Rostedt -
The elf reader for recordmcount.c had duplicate functions for both
32 bit and 64 bit elf handling. This was due to the need of using
the 32 and 64 bit elf structures.This patch consolidates the two by using macros to define the 32
and 64 bit names in a recordmcount.h file, and then by just defining
a RECORD_MCOUNT_64 macro and including recordmcount.h twice we
create the funtions for both the 32 bit version as well as the
64 bit version using one code source.Cc: John Reiser
Signed-off-by: Steven Rostedt -
This patch adds the support for the C version of recordmcount and
compile times show ~ 12% improvement.After verifying this works, other archs can add:
HAVE_C_MCOUNT_RECORD
in its Kconfig and it will use the C version of recordmcount
instead of the perl version.Cc:
Cc: Michal Marek
Cc: linux-kbuild@vger.kernel.org
Cc: John Reiser
Signed-off-by: Steven Rostedt -
Currently, the mcount callers are found with a perl script that does
an objdump on every file in the kernel. This is a C version of that
same code which should increase the performance time of compiling
the kernel with dynamic ftrace enabled.Signed-off-by: John Reiser
[ Updated the code to include .text.unlikely section as well as
changing the format to follow Linux coding style. ]Signed-off-by: Steven Rostedt