Currently on ARM signal handling here must happen with
interrupts disabled so this might_sleep will cause a
continuous stream of warnings. It is a known issue
upstream.
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
(cherry picked from commit dc0eed4422dad92d3dd5afd468876d3d5b241ce1)
Change-Id: I9ace6222750954e43b4b57d049bb74645fb06424
Signed-off-by: David Ng <dave@codeaurora.org>
(cherry picked from commit 76c5892fc1fa36e4e5ebabd2c4e0f10593233b62)
Conflicts:
arch/arm/mm/proc-v7.S
The gic_set_irq_secure function can be called from drivers
that are also compiled for targets which use an interrupt
controller other than GIC.
Add empty stub for this function to prevent compilation errors.
Change-Id: Ie3ab3a704b238751cd0dadf800d7e9b90ad257e7
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
(cherry picked from commit 4a771c59914d20b8fe234ceac2129be017052178)
Conflicts:
arch/arm/include/asm/hardware/gic.h
Most of the readl/writel macros for logging to the RTB
very similar. Create a dedicated macro to use for all of them
to make the code more readable and easier to maintain.
Change-Id: I6d8e7bc6bde7de6ad6cb53107362512d083b7423
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
(cherry picked from commit 9fba2a57b6f9f7d616bc0cb0aa41613240269f90)
Log readl/writel accesses in the small uncached buffer.
readl/writel are typically used for reading from memory
mapped registers, which can cause hangs if accessed
unclocked. Log this information in a buffer to aid in
debugging.
Change-Id: Id72da6b028a3faf5d0d8e069e14d90e4671e3564
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
(cherry picked from commit 0f9c7767132eed7f8a701f5281866aafa659632f)
Conflicts:
arch/arm/include/asm/io.h
arch/arm/mach-msm/include/mach/msm_rtb.h
arch/arm/mach-msm/include/mach/uncompress.h
Some CPUs perform speculative fetches. This may occur while a region of
memory is being written via DMA, so that region must be invalidated when
it is brought under CPU control after the DMA transaction finishes,
assuming the DMA was either bidirectional or from the device.
Signed-off-by: Dima Zavin <dima@android.com>
(cherry picked from commit fe79fc554afbfaa2652542129fb7380f4f7c4934)
Conflicts:
arch/arm/include/asm/dma-mapping.h
Change-Id: Id2a66fe567066a9301859b897d540885667253e6
For smp, barriers are required when a mutex lock is acquired or
released. Mutex slowpath routines already contain the necessary
barriers.
Change-Id: I774fc6e7bd5b1db9a0f51dee456b71c569cd512e
Signed-off-by: Brent DeGraaf <bdegraaf@codeaurora.org>
(cherry picked from commit 62c6b43d05a6aab278eb7d5d0030bd731b7684ea)
bank_pfn_end macro overflows when physical memory space
configuration ends at 0xFFFFFFFF.
The macro adds start and size together before converting
to a page frame number. Change the macro to convert start
and size first and then add them together.
Change-Id: If091fd860e6cc94f2221164bd79bf34415819e66
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
(cherry picked from commit b40b91eb8101b996f6dca5ccfee91b1949aa27e6)
This commit updates the IRQ IDs for pmu.
Change-Id: I3541ccc93d012183edbd3f033a49a1568e1b1606
Signed-off-by: Sheetal Sahasrabudhe <sheetals@codeaurora.org>
(cherry picked from commit e626178b610d776a508de2f388428c945ef93e13)
They need to be called from the msm suspend resume code.
Change-Id: I75a4e8fbc4bc3b86ee1bb43445abd70aaaa6e658
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
Commit 36af2a47 ("ARM: vfp: Always save VFP state in vfp_pm_suspend")
introduced a potential use-after-free bug. On SMP systems,
vfp_current_hw_state might hold dangling pointers in case a task which
used the VFP last migrates to another CPU and then exits. If
vfp_pm_suspend is called while vfp_current_hw_state still holds a
pointer to the freed thread_info, that memory location will be written,
potentially overwriting a new object allocated there.
The original problem is only relevant to UP systems in which the VFP
state is stored lazily.
Fix this by only storing the VFP state on UP systems, and avoid doing so
on SMP ones.
Change-Id: I8f7026eb735b340fcef4cf12fbd12b9a0ea08d3f
Signed-off-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Colin Cross <ccross@android.com>
(cherry picked from commit 67c2bbb625)
vfp_pm_suspend should save the VFP state in suspend after
any lazy context switch. If it only saves when the VFP is enabled,
the state can get lost when, on a UP system:
Thread 1 uses the VFP
Context switch occurs to thread 2, VFP is disabled but the
VFP context is not saved
Thread 2 initiates suspend
vfp_pm_suspend is called with the VFP disabled, and the unsaved
VFP context of Thread 1 in the registers
Modify vfp_pm_suspend to save the VFP context whenever
vfp_current_hw_state is not NULL.
Change-Id: I91f29722d256a3afc1cc04df8b227541434ccffb
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Barry Song <bs14@csr.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Colin Cross <ccross@android.com>
(cherry picked from commit 6fb6e04619)
Certain early samples of the Krait processor use the MVFR1
register to report that they do not support ASE instructions,
despite actually supporting these instructions. Add a
specific CPU ID check to allow full utilization of the ASE
instructions.
Change-Id: Id8182da98d438fd4169cfdfa014b4771388fb6f7
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
(cherry picked from commit 57b50da38c95732c0727b8016e77cd86e08f153d)
vfp_pm_suspend runs on each cpu, only clear the hardware state
pointer for the current cpu. Prevents a possible crash if one
cpu clears the hw state pointer when another cpu has already
checked if it is valid.
Change-Id: I997ab1554944eba86730818ff242d7ebe1b32736
Signed-off-by: Colin Cross <ccross@android.com>
(cherry picked from commit 9d6d432654)
Certain ARM CPU implementations may not raise a floating-
point exception whenever deprecated short-vector VFP
instructions are executed. Change the VFP exception
handling code to emulate short-vector instructions even
if FPEXC exception bits are not set.
Change-Id: I2443d09a92c8947343126a3b6c2a074af1a62057
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
(cherry picked from commit 00a13be874f230159a6b7f8cc9d0ff23bc1b7d05)
If the PC on the stack is updated in entry-armv.S,
do_undefinstr can get called after the fixup. do_undefinstr
does its own fixup, and doing both causes the PC to point to
half way through an instruction.
Instead, do the fixup in do_vfp, where only the vfp code
can get called.
Change-Id: I6d966887adc8ed58d88bfe0cb3c0ba29213be488
Signed-off-by: Colin Cross <ccross@android.com>
(cherry picked from commit 0dbef5cd40)
For disk devices, a new uevent parameter 'NPARTS' specifies the number
of partitions detected by the kernel. Partition devices get 'PARTN' which
specifies the partitions index in the table, and 'PARTNAME', which
specifies PARTNAME specifices the partition name of a partition device
Signed-off-by: Dima Zavin <dima@android.com>
(cherry picked from commit 38c6302d9f)
Cpumask is used to limit the processors being profiled
on a multi-core processor. Cpumask was being set but not
being used. Add support to use cpumask when creating
a counter.
Change-Id: I3a3aab581e9e925507da5d319328ed6a2460328f
Signed-off-by: Neil Leeder <nleeder@codeaurora.org>
(cherry picked from commit fb587021e93b049c9419ea08f50fe431fa505548)
commit 49908a1b25 upstream.
A update is made to the sched:sched_switch event that adds some
logic to the first parameter of the __print_flags() that shows the
state of tasks. This change cause perf to fail parsing the flags.
A simple fix is needed to have the parser be able to process ops
within the argument.
Reported-by: Andrew Vagin <avagin@openvz.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
(cherry picked from commit 2431496fbdd142ccc83138d94f3f510a36ce9270)
Add the 'periodic' command to perf. This allows collection
of counters at a specified interval.
Change-Id: I4e42ac3f21cbdf2c196dbd01d31e6dc6051efd7e
Signed-off-by: Neil Leeder <nleeder@codeaurora.org>
(cherry picked from commit 4832fc26190f5cd4270cd6813bca120c51e75744)
There are many string based functions that are unsafe
to use. Some of the functions are unsafe to use because
of the possibility of overflow while others cannot
guarantee that the resultant string is NULL-terminated.
Add check for these functions and log message indicating
which safe functions can be used instead.
Change-Id: Id305d98df241e3fd257529529739dcd4f3659186
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
(cherry picked from commit 665be0da353f69f85cb1acea19279adf6ccb5b52)
There are some very frequently used tags that checkpatch can look
for as an ending to the commit text rather than using a pattern,
which can generate false positives in the "no commit text" rule.
Change-Id: I5b4400017b8273bcd9f5a59b3e28965c0062bef4
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
(cherry picked from commit 336a3ae6253031d6a0de11882ac24a11f83d3323)
Commit text is almost always necessary to explain why a change is
needed. Exceptions are rare enough that these can be granted through
manual checkpatch overrides.
Change-Id: I926b2276f717940c2fec77a6709fa3088b1bf0c3
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
(cherry picked from commit d3b3b64c907dbf2244250fc4b389562f2efedee2)
Vreg API implementation is deprecated. We are using
Linux regulator framework now. Hence vreg API should
not be used.
Change-Id: I8e31dac66592d2d195d190b770a436e93206cf8b
Signed-off-by: Pankaj Kumar <pakuma@codeaurora.org>
(cherry picked from commit adfb933a24911e3514a2f1b6fe1b1a9151fec56d)
MSM has a board-*-gpiomux file where all the gpiomux configs reside.
Warn if a non gpiomux board file tries to add gpiomux configs.
The camera board file is an exception to this rule.
Change-Id: Ibab190dcbd7ea78e7ca150142c68c5ae881e4e06
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
(cherry picked from commit 60d78bb9809e7d4d1c3dc1425cbfd9e649e87c1c)
Existing executable-bit test only works on second and later files
contained in the patch. Correct this so all patches in the file
are tested.
Change-Id: Ie9363473f0d2fc067f9c593c86495d15e8e5d546
Signed-off-by: Gregory Bean <gbean@codeaurora.org>
(cherry picked from commit 246e1f183dd3c2bfe63722ca5b207473cb9a0219)
Conflicts:
scripts/checkpatch.pl
Now that mb() does what we want, dsb() should be discouraged.
Change-Id: Ib8fe8f44f669753c3d91fac3c6e598e117d6d90e
Signed-off-by: Gregory Bean <gbean@codeaurora.org>
(cherry picked from commit 9c0619be7b93ad114d6f33a749d905ddff93df7d)
filp_open allows people to get around the ban on sys_open.
Close the loophole.
Change-Id: I6e2be62e848cbc064e07008d0886c0d003c8be4b
Signed-off-by: Gregory Bean <gbean@codeaurora.org>
(cherry picked from commit bb181a18a813a70176f71a0c64aa572fcfbef0f0)
Improve parsing of multiline macros which run beyond the available
diff context. These beyond-the-horizon macros previously caused
two distinct naughty behaviors:
- The scanner, confused by the trailing backslash, would grab
the header of the next context hunk and treat it as the last
line of the preceding macro.
- The analyzer, unable to fully reduce the macro, would blame
the patch for submitting an unbalanced or unprotected macro.
Change-Id: I6b7dd3d577c524d30b59dff7b20393bb5135f16d
Signed-off-by: Gregory Bean <gbean@codeaurora.org>
(cherry picked from commit ddd028c47b4d91aa9c0e97445eb584b2de367769)
Unbounded string functions are overflow risks. The 'n'
versions of those functions should be used instead.
Change-Id: Ice0fb3ebdae9aa88cc7e764ffdf68cbed857febf
Signed-off-by: Gregory Bean <gbean@codeaurora.org>
(cherry picked from commit 15e1e97d66dd6a6039c1ec2bd549a632fe361128)
Forbid read[bwl], write[bwl], in[bwl], and out[bwl], as they
contain a 'stealth barrier' which can harm performance.
Developers are expected to call appropriate __raw_* or *_relaxed
APIs and manage barriers explicitly.
Change-Id: Ie4da221c91a0505917199db9e2fdb704c3e47d44
Signed-off-by: Gregory Bean <gbean@codeaurora.org>
(cherry picked from commit 032fd4ba09e195d9913c08f460130da9905936ef)
This commit is a cherry pick and squash of commits:
85c2ee62d37c19456c6dc83db262123956f010ac
4bc7c6001daba7d4037f54f67bae7fa90f759402
checkpatch: Handle continuation headers.
Continuation headers baffle checkpatch, as it can only operate
on one line of context at a time. When continuation headers are found,
put them up with the header they're continuing so the whole thing
can be parsed in a single line of context.
checkpatch: Don't treat diffs as patches.
The patch-header cleanup code assumed that it would only ever
see patches, which was of course hogwash. This lead to crazy
results as it tried to wrap what it thought were continuation
lines at the beginnings of raw diffs.
Signed-off-by: Gregory Bean <gbean@codeaurora.org>
(cherry picked from commit 57d50ae730a057ee1099a94a397475bfd147d97b)
Conflicts:
scripts/checkpatch.pl
Change-Id: I60b2d914ada9a8690b89ffb8c1e32a8b81a5e715
Use of the sys_open/close/read/write system calls from within
kernel code is inappropriate, and now triggers errors.
Change-Id: I98e20513c257d0664684b7144585853f617d771a
Signed-off-by: Gregory Bean <gbean@codeaurora.org>
(cherry picked from commit ee62f2afcac1bcb180b2f0dddf2c8f5cda54bc5b)
This reverts commit 66b2a3733e7219e5291c633eb5778bec6500b74d.
Possibly can happen after necessary code changes are in place.
Change-Id: I04e092158dda2b5f5ca029378d1e7dc863de6001
Signed-off-by: David Brown <davidb@codeaurora.org>
(cherry picked from commit 4235f0aeb789321b36eb01f29ffb329fc9d2169c)
When patches contain extended character sets, patches will contain
MIME headers after the subject line, which should not be confused
for a too-long summary line.
Signed-off-by: Gregory Bean <gbean@codeaurora.org>
Change-Id: If17d17cc7513eb644d75f486b9cdea3a09ba0dbe
(cherry picked from commit 8e6b9d3790595198a34320f1c3f4504cd258fed1)
Several checkpatch enhancements are imported from android-msm-2.6.32.
These include:
commit 83ec26e869ac7e967fd5382f9e1979536897d42a
Author: Matt Wagantall <mattw@codeaurora.org>
Date: Thu Jun 3 12:28:18 2010 -0700
checkpatch: Exceptions for CLK_* macros and some spaces in macros
Add CLK_* macros used in MSM clock drivers to the list of exceptions
for the "Macros with complex values should be enclosed in parenthesis"
test.
Also, allow spaces following open branckets for macros where the
macro is the first token on the line, the space preceds a decimal
number, and the line ends with ")," or ")". Such arrangements can
be useful for aligning numerical columns of tables when the rows
are described by macros.
Change-Id: I7701119ada2ea8fd646e5448eae51786bbf1e8fa
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
commit d3ccf20187826d2cfbf41eda3f9e1a38e35b79bf
Author: Rick Adams <rgadams@codeaurora.org>
Date: Mon Jan 4 13:06:09 2010 -0800
checkpatch: warn on subject line not followed by blank line
Fixed case when no warning generated for long subject line that is
wrapped to more than one line, and all lines are less than line limit.
New warning message added:
"non-blank line after summary line"
Now there are two warnings possible for the subject line, the original
line over limit and the new one. Depending on the error(s) any
combination of the two warnings are possible.
Commit text requirements now:
1) Must be less than 75 characters
2) Must be followed by blank line.
Change-Id: If7ee833339c5be947bb1dd2a52d5d1d9ddfe5de6
Signed-off-by: Rick Adams <rgadams@codeaurora.org>
commit ae617dec94111b127c33ae9c979e51b5bd8b5292
Author: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Date: Thu Oct 1 12:01:44 2009 -0700
checkpatch: check for #if 0/#if 1
Warn if #if 1 or #if 0 is present.
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
commit 168e8da627f99e421be9375ed572df6b1039854f
Author: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Date: Thu Oct 1 12:01:44 2009 -0700
checkpatch: check for execute permissions on non code files
Make checkpatch.pl check execute permissions on non code files
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
commit be24800e1cdd44d8b0e00f212c022f34e1402eb4
Author: Steve Muckle <smuckle@codeaurora.org>
Date: Fri Apr 3 16:19:20 2009 -0700
checkpatch: check new files for executable permissions
Look for executable permissions on new files as well as in mode
changes on existing files.
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
commit b45a236b62928e0b11fbeff1471d9b1efc508884
Author: Steve Muckle <smuckle@codeaurora.org>
Date: Fri Mar 13 15:46:36 2009 -0700
checkpatch: warn on long summary, commit text lines
Warn on summary or commit text lines greater than 75 characters.
The summary and commit text are indented and may wrap on a terminal
if they are longer than 75 characters.
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
Change-Id: Iae92cdc8ffecc5315761bc91e883d8ea2f4877cc
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
(cherry picked from commit d17f580ee07441770498b54159e3322f8186fc3e)
Conflicts:
scripts/checkpatch.pl
Backport a series of checkpatch changes from 2.6.35; having
these checks in our tree now will help with upstreaming
efforts.
A summary of the changes:
(trivial) remove Dave Jones' email
Add initconst attribute
Switch printk exception to logFunctions
check for spaces before a quoted newline
check for space before tabs
improved check spacing on parentheses
improved conditional checking
add some exceptions to multi-statement macro exceptions
Check that the storage class is at the beginning of a declaration
check for sizeof(&)
check for various ops structs, ensure they are const.
check for lockdep_set_novalidate_class
The following commits are included:
commit dbf004d788
Author: Dave Jones <davej@redhat.com>
Date: Tue Jan 12 16:59:52 2010 -0500
remove my email address from checkpatch.
Maybe this will stop people emailing me about it.
Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
commit 52131292c0
Author: Wolfram Sang <w.sang@pengutronix.de>
Date: Fri Mar 5 13:43:51 2010 -0800
checkpatch: fix false positive on __initconst
checkpatch falsely complained about '__initconst' because it thought the
'const' needed a space before. Fix this by changing the list of
attributes:
- add '__initconst'
- force plain 'init' to contain a word-boundary at the end
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
commit 691e669ba8
Author: Joe Perches <joe@perches.com>
Date: Fri Mar 5 13:43:51 2010 -0800
checkpatch.pl: allow > 80 char lines for logging functions not just printk
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
commit 3354957a4f
Author: Andi Kleen <ak@linux.intel.com>
Date: Mon May 24 14:33:29 2010 -0700
checkpatch: add check for too short Kconfig descriptions
I've seen various new Kconfigs with rather unhelpful one liner
descriptions. Add a Kconfig warning for a minimum length of the Kconfig
help section.
Right now I arbitarily chose 4. The exact value can be debated.
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
commit 5e79d96eed
Author: Joe Perches <joe@perches.com>
Date: Fri Mar 5 13:43:55 2010 -0800
checkpatch: warn on unnecessary spaces before quoted newlines
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
commit 08e4436566
Author: Alberto Panizzo <maramaopercheseimorto@gmail.com>
Date: Fri Mar 5 13:43:54 2010 -0800
checkpatch.pl: warn if an adding line introduce spaces before tabs.
Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com>
Cc: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
commit 42bdf74c95
Author: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Date: Fri Mar 5 13:43:50 2010 -0800
checkpatch: trivial fix for trailing statements check
In case if the statement and the conditional are in one line, the line
appears in the report doubly.
And items of this check have no blank line before the next item.
This patch fixes these trivial problems, to improve readability of the
report.
[sample.c]
> if (cond1
> && cond2
> && cond3) func_foo();
>
> if (cond4) func_bar();
Before:
> ERROR: trailing statements should be on next line
> #1: FILE: sample.c:1:
> +if (cond1
> [...]
> + && cond3) func_foo();
> ERROR: trailing statements should be on next line
> #5: FILE: sample.c:5:
> +if (cond4) func_bar();
> +if (cond4) func_bar();
> total: 2 errors, 0 warnings, 5 lines checked
After:
> ERROR: trailing statements should be on next line
> #1: FILE: sample.c:1:
> +if (cond1
> [...]
> + && cond3) func_foo();
>
> ERROR: trailing statements should be on next line
> #5: FILE: sample.c:5:
> +if (cond4) func_bar();
>
> total: 2 errors, 0 warnings, 5 lines checked
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Cc: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
commit 22fd2d3e4f
Author: Stefani Seibold <stefani@seibold.net>
Date: Fri Mar 5 13:43:52 2010 -0800
checkpatch.pl: add union and struct to the exceptions list
Here is a small code snippet, which will be complained about by
checkpatch.pl:
#define __STRUCT_KFIFO_COMMON(recsize, ptrtype) \
union { \
struct { \
unsigned int in; \
unsigned int out; \
}; \
char rectype[recsize]; \
ptrtype *ptr; \
const ptrtype *ptr_const; \
};
This construct is legal and safe, so checkpatch.pl should accept this. It
should be also true for struct defined in a macro.
Add the `struct' and `union' keywords to the exceptions list of the
checkpatch.pl script, to prevent error message "Macros with multiple
statements should be enclosed in a do - while loop". Otherwise it is not
possible to build a struct or union with a macro.
Signed-off-by: Stefani Seibold <stefani@seibold.net>
Cc: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
commit d4977c78e9
Author: Tobias Klauser <tklauser@distanz.ch>
Date: Mon May 24 14:33:30 2010 -0700
checkpatch: warn on declaration with storage class not at the beginning
The C99 specification states in section 6.11.5:
The placement of a storage-class specifier other than at the beginning
of the declaration specifiers in a declaration is an obsolescent
feature.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Jean Delvare <khali@linux-fr.org>
Cc: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
commit 8f53a9b80f
Author: Joe Perches <joe@perches.com>
Date: Fri Mar 5 13:43:48 2010 -0800
scripts/checkpatch.pl: add WARN on sizeof(&foo)
sizeof(&foo) is frequently an error. Warn on its use.
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
commit 79404849e9
Author: Emese Revfy <re.emese@gmail.com>
Date: Fri Mar 5 13:43:53 2010 -0800
checkpatch.pl: extend list of expected-to-be-const structures
Based on Arjan's suggestion, extend the list of ops structures that should
be const.
Signed-off-by: Emese Revfy <re.emese@gmail.com>
Cc: Andy Whitcroft <apw@shadowen.org>
Cc: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
commit 1704f47b50
Author: Peter Zijlstra <peterz@infradead.org>
Date: Fri Mar 19 01:37:42 2010 +0100
lockdep: Add novalidate class for dev->mutex conversion
The conversion of device->sem to device->mutex resulted in lockdep
warnings. Create a novalidate class for now until the driver folks
come up with separate classes. That way we have at least the basic
mutex debugging coverage.
Add a checkpatch error so the usage is reserved for device->mutex.
[ tglx: checkpatch and compile fix for LOCKDEP=n ]
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Change-Id: I11495554d7d393659e5e0d7188cdc1744e25b6ba
Signed-off-by: Patrick Pannuto <ppannuto@codeaurora.org>
(cherry picked from commit 4657bf482381583b08b34ed5ea6f7d3ad162807c)
Conflicts:
scripts/checkpatch.pl
Display context so users can see where there error was
OLD:
ERROR: illegal return value, please use an error code
NEW:
ERROR: illegal return value, please use an error code
#152: test.c:5:
+ return -1;
Change-Id: I098004d9a5dbeb6c39b35b84ac94fd7a861849d7
Signed-off-by: Patrick Pannuto <ppannuto@codeaurora.org>
(cherry picked from commit 8d09803de5d629f3ebc9cb357a40b5937a5d171e)
This reverts commit 8212698c653945d0fd0783829822917bf13a5aab.
The original commit incorrectly prevents the following:
- Commit messages which cite other commit messages, which
are commonly used for attribution;
- Any use of checkpatch which doesn't contain a full mail header,
such as 'show <ref> | checkpatch.pl -'
Change-Id: I681a97913432d05bf66290cf74972aaa4e03fe5d
Signed-off-by: Gregory Bean <gbean@codeaurora.org>
(cherry picked from commit c73e32b4a1a59e3a33e9c8975ab08b5475d30f3e)
The only legal integer return is 0, anything else
following "return" should be -ERRCODE or a function.
http://lkml.org/lkml/2010/7/23/318
There's lots of "return -1;" statements in this patch - it's obscene
that this is used to indicate "some error occurred" in kernel space
rather than a real errno value - even when an existing function
(eg, request_irq) gave you an error code already.
Please note this for the future - and please review patches on this
point internally first.
Change-Id: I16268b2ee034f0b3b899115e45c28acfa734ddec
Signed-off-by: Patrick Pannuto <ppannuto@codeaurora.org>
(cherry picked from commit 39531a47164294315b5a7256b520fe22d6e87013)
Currently checkpatch is enforcing an 80 character column
limit. This should not be applied for patches modifying
checkpatch.
Change-Id: I8e8935e633d79a7ee535ce6a90e54447a22d9a91
Signed-off-by: Israel Schlesinger <israels@codeaurora.org>
(cherry picked from commit 4aa1b864119e2d0e49efefcd6dba7349f13c3939)
Conflicts:
scripts/checkpatch.pl
upstream prefers this change for checkpatch:
http://lkml.org/lkml/2010/7/27/254
Signed-off-by: Israel Schlesinger <israels@codeaurora.org>
Change-Id: I61f8c1ff622994b37a79fed4b811115da2c108ad
(cherry picked from commit 76cc4ad08fe1d8912ce44ee2cc1f10373c2974d3)