Commit graph

2473 commits

Author SHA1 Message Date
Ian Maund fb7a28497f Revert "scripts/Makefile.headersinst: make scratch file parallel safe"
This reverts commit 69005c760d. This commit
was a bugfix on top of commit 71f613a0a5.
As this commit is also being reverted, we no longer need this bugfix.

Change-Id: I7f9a29d78e1e0ddf25f84c993365fcabdc0880e7
Signed-off-by: Ian Maund <imaund@codeaurora.org>
2014-06-17 16:49:46 -07:00
Mitchel Humpherys 35454aaa75 scripts/Makefile.headersinst: install staging UAPI header files to usr
Currently when UAPI headers for a staging driver are kept under the
drivers/staging directory, `make headers_install' installs them to
<install_prefix>/drivers instead of the usual <install_prefix>/usr. This
is a non-standard and unexpected location. Fix this by doing the
necessary string substitutions so that the UAPI headers for staging
drivers end up in <install_prefix>/usr/include/linux/staging.

Change-Id: Ibf6b813e69eea78fc59a4a505c75c6093eca70dd
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
2014-06-13 11:45:01 -07:00
Linux Build Service Account f449433a01 Merge "defconfig: arm64: add support for msm8994 defconfig" 2014-05-05 19:54:28 -07:00
Abhimanyu Kapur 0d05fa71ea defconfig: arm64: add support for msm8994 defconfig
Split out the common msm_defconfig into MSM8994 specific
defconfig. Also update the build-all script to reflect the
changes.

Change-Id: I5df7a0d1f74f843bd2a353a389d42290b8b70590
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
2014-05-05 14:00:13 -07:00
Ian Maund 356fb13538 Merge upstream linux-stable v3.10.36 into msm-3.10
* commit 'v3.10.36': (494 commits)
  Linux 3.10.36
  netfilter: nf_conntrack_dccp: fix skb_header_pointer API usages
  mm: close PageTail race
  net: mvneta: rename MVNETA_GMAC2_PSC_ENABLE to MVNETA_GMAC2_PCS_ENABLE
  x86: fix boot on uniprocessor systems
  Input: cypress_ps2 - don't report as a button pads
  Input: synaptics - add manual min/max quirk for ThinkPad X240
  Input: synaptics - add manual min/max quirk
  Input: mousedev - fix race when creating mixed device
  ext4: atomically set inode->i_flags in ext4_set_inode_flags()
  Linux 3.10.35
  sched/autogroup: Fix race with task_groups list
  e100: Fix "disabling already-disabled device" warning
  xhci: Fix resume issues on Renesas chips in Samsung laptops
  Input: wacom - make sure touch_max is set for touch devices
  KVM: VMX: fix use after free of vmx->loaded_vmcs
  KVM: x86: handle invalid root_hpa everywhere
  KVM: MMU: handle invalid root_hpa at __direct_map
  Input: elantech - improve clickpad detection
  ARM: highbank: avoid L2 cache smc calls when PL310 is not present
  ...

Change-Id: Ib68f565291702c53df09e914e637930c5d3e5310
Signed-off-by: Ian Maund <imaund@codeaurora.org>
2014-04-23 16:23:49 -07:00
Linux Build Service Account 1b9acaf3a2 Merge "scripts: Build in parallel if requested" 2014-04-02 21:45:54 -07:00
Linux Build Service Account 0d089e894c Merge "scripts: Refactor build-all.py's build" 2014-04-02 21:45:45 -07:00
David Brown c49b330dcf scripts: Build in parallel if requested
Instead of passing -jn directly through to make, and then building
each target in sequence, use the -j and -l options to determine a
number of threads to perform parallel invocations of make in.

The build results are collected, and printed when each build finishes,
which eliminates the interleaving that would otherwise occur between
builds.

Change-Id: Ieef0dcc8adfc72cbe043a3491d4d6f6c23fede31
Signed-off-by: David Brown <davidb@codeaurora.org>
2014-04-01 14:45:15 -07:00
David Brown 05746b5c71 scripts: Refactor build-all.py's build
Build all consists of a mismash of figuring out variables, running
shutils, and actually executing commands.  In preparation for parallel
builds, change this to build up the commands in advance, and then have
a tracker go through and actually run the commands.

Change-Id: I24215b14e5d045f8269bbdc2af9989ab21b2310b
Signed-off-by: David Brown <davidb@codeaurora.org>
2014-04-01 14:45:15 -07:00
Ben Hutchings 573994d38b deb-pkg: Fix cross-building linux-headers package
commit f8ce239dfc7ba9add41d9ecdc5e7810738f839fa upstream.

builddeb generates a control file that says the linux-headers package
can only be built for the build system primary architecture.  This
breaks cross-building configurations.  We should use $debarch for this
instead.

Since $debarch is not yet set when generating the control file, set
Architecture: any and use control file variables to fill in the
description.

Fixes: cd8d60a20a ('kbuild: create linux-headers package in deb-pkg')
Reported-and-tested-by: "Niew, Sh." <shniew@gmail.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-31 09:58:13 -07:00
Ian Maund c40a8759bd scripts: gcc-wrapper: Allow warnings from google-common
3rd party Google-common code contains the following forbidden warning when
compiling. Once the remote corrects this warning, this change should be
removed.

ping.c:87:27: warning: assignment from incompatible pointer type

Change-Id: I278bc583884576ded13585f35f8be5ab9b2c5eef
Signed-off-by: Ian Maund <imaund@codeaurora.org>
2014-03-14 16:31:01 -07:00
Jan Moskyto Matejka 5fbbcae34e Modpost: fixed USB alias generation for ranges including 0x9 and 0xA
commit 03b56329f9bb5a1cb73d7dc659d529a9a9bf3acc upstream.

Commit afe2dab4f6 ("USB: add hex/bcd detection to usb modalias generation")
changed the routine that generates alias ranges. Before that change, only
digits 0-9 were supported; the commit tried to fix the case when the range
includes higher values than 0x9.

Unfortunately, the commit didn't fix the case when the range includes both
0x9 and 0xA, meaning that the final range must look like [x-9A-y] where
x <= 0x9 and y >= 0xA -- instead the [x-9A-x] range was produced.

Modprobe doesn't complain as it sees no difference between no-match and
bad-pattern results of fnmatch().

Fixing this simple bug to fix the aliases.
Also changing the hardcoded beginning of the range to uppercase as all the
other letters are also uppercase in the device version numbers.

Fortunately, this affects only the dvb-usb-dib0700 module, AFAIK.

Signed-off-by: Jan Moskyto Matejka <mq@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-22 12:41:28 -08:00
Linux Build Service Account 74e8997e6f Merge "scripts: gcc-wrapper: Allow warnings from 3.10.28" 2014-02-17 19:49:20 -08:00
Ian Maund 150d59ceb1 scripts: gcc-wrapper: Allow warnings from 3.10.28
Linux-stable v 3.10.28 contains the following forbidden warning when
compiling for 64-bit architectures. Once the remote corrects this warning,
this change should be removed.

arch/arm64/include/asm/cmpxchg.h:162:3: warning: value computed is not used

Change-Id: Ia1c530a9821ee69623950b43a6a7fe130cbaaa04
Signed-off-by: Ian Maund <imaund@codeaurora.org>
2014-02-13 10:40:19 -08:00
Will Deacon 7d124b13bc arm64: extable: sort the exception table at build time
As is done for other architectures, sort the exception table at
build-time rather than during boot.

Since sortextable appears to be a standalone C program relying on the
host elf.h to provide EM_AARCH64, I've had to add a conditional check in
order to allow cross-compilation on machines that aren't running a
bleeding-edge libc-dev.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Git-commit: adace89562c7a9645b8dc84f6e1ac7ba8756094e
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Ian Maund <imaund@codeaurora.org>
2014-02-07 13:49:33 -08:00
David Brown a7fbd22279 scripts: Use custom defconfig for 64-bit targets
Use a different set of defconfig patterns for 64-bit targets.
Currently, msm_defconfig needs to not be built for 32-bit, and is the
only defconfig for the 64-bit target.

Change-Id: I2c3840fd668aa9a1dbd304c64484f6735f1aeea1
Signed-off-by: David Brown <davidb@codeaurora.org>
2014-02-05 09:34:01 -08:00
David Brown 0329c70036 scripts: Keep appending log between build parts
Instead of wiping the log file for each make target, only wipe it
initially, and then continue to append to it.  Instead of closing
between files, just flush.  Although the last use doesn't ever close
the file, it is flushed, and will be closed on exit.

Change-Id: Ic4b38cdad993bc32711f832ce30ca8d8dead0db6
Signed-off-by: David Brown <davidb@codeaurora.org>
2014-02-05 09:34:01 -08:00
David Brown 01d83e8cbd scripts: Reorganize build-all for multi arch
Move most of the build work into a Builder class, which is given a
name and a specific defconfig.  If the arch contains arm64, build
using the CROSS_COMPILE64 compiler rather than the CROSS_COMPILE
compiler.

Defconfigs that match the globs in arm64 will have a "-64" appended to
the name, to avoid conflicts when the same target has both a 32-bit
and a 64-bit build.

The main visible change to this is that CROSS_COMPILE now must be set
before invoking this script.  If CROSS_COMPILE64 isn't set, it won't
be willing to build any 64-bit targets.

Change-Id: I0bd9a7bff22f9c21371c663aff9e8be5116fcdae
Signed-off-by: David Brown <davidb@codeaurora.org>
2014-02-05 09:33:38 -08:00
Joonwoo Park f0358e8b21 mdm9630: rename msmkrypton to mdm9630
Introduce mdm9630 as the official name for msmkrypton.

Change-Id: I0fd861f30bb461ea575084bfe241d8ded1d0c484
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2014-01-10 10:03:08 -08:00
Ming Lei 22be5f011f scripts/kallsyms: filter symbols not in kernel address space
This patch uses CONFIG_PAGE_OFFSET to filter symbols which
are not in kernel address space because these symbols are
generally for generating code purpose and can't be run at
kernel mode, so we needn't keep them in /proc/kallsyms.

For example, on ARM there are some symbols which may be
linked in relocatable code section, then perf can't parse
symbols any more from /proc/kallsyms, this patch fixes the
problem (introduced b9b32bf70f2fb710b07c94e13afbc729afe221da)

Change-Id: I3d6321b7d87727c7c2802b3924f2e89a28e4b9ca
Cc: Russell King <linux@arm.linux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: stable@vger.kernel.org
Git-commit: f6537f2f0eba4eba3354e48dbe3047db6d8b6254
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
CRs-fixed: 583755
Signed-off-by: Neil Leeder <nleeder@codeaurora.org>
2013-12-02 16:44:06 -05:00
Ming Lei 27b840ea21 scripts/kallsyms: filter symbols not in kernel address space
commit f6537f2f0eba4eba3354e48dbe3047db6d8b6254 upstream.

This patch uses CONFIG_PAGE_OFFSET to filter symbols which
are not in kernel address space because these symbols are
generally for generating code purpose and can't be run at
kernel mode, so we needn't keep them in /proc/kallsyms.

For example, on ARM there are some symbols which may be
linked in relocatable code section, then perf can't parse
symbols any more from /proc/kallsyms, this patch fixes the
problem (introduced b9b32bf70f2fb710b07c94e13afbc729afe221da)

Cc: Russell King <linux@arm.linux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-13 12:05:32 +09:00
Linux Build Service Account e2fbbf6681 Merge "build-all.py: Add support for mpq*_defconfig" 2013-10-11 14:42:33 -07:00
Joe Perches d6ac5a59fa checkpatch: change CamelCase test and make it --strict
Do not bleat a message on nominally acceptable CamelCase uses that are
separated by an _ like drm_core_has_MTRR.

CamelCase tests are also a bit noisy against certain types of code
acceptable to some kernel developers.

Make the test applicable only with --strict.

Change-Id: I025ce70b6df030b462a659ca82cd797e638dff38
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>
Git-commit: be79794bc116fc0c264be1a599433c92ec9e34f5
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2013-10-08 11:25:22 -07:00
Srinivas Ramana dd0f9bf24e build-all.py: Add support for mpq*_defconfig
mpq8092_defconfig does not match the existing msm pattern
because of not having its name started with msm prefix.
Compile it too.

Change-Id: I1b758e33fa550fdac539a18cc61a6a8348f61f71
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
2013-10-04 19:17:06 +05:30
Stephen Boyd e55732f90c Merge branch 'tools-3.10' into msm-3.10
* tools-3.10: (53 commits)
  scripts/Makefile.headersinst: make scratch file parallel safe
  scripts/Makefile.headersinst: install headers from scratch file
  Update gcc-wrapper for 3.10
  scripts: only set CROSS_COMPILE when unset to begin with
  build-all.py: Add support for msmkrypton_defconfig
  gcc-wrapper: trim whitelist for gcc 4.7
  Update gcc-wrapper for 3.10-rc5
  Remove the build of omap2plus from build-all.py
  checkpatch: Excuse reverts from "summary line over 75 characters" check
  checkpatch: add new message type string
  checkpatch: recognize only specific tags when ending commit text
  checkpatch: require commit text
  checkpatch: Add check for vreg_xxx api in opensource drivers
  checkpatch: Add check for gpiomux usage in msm board files
  checkpatch: complain about the use of dsb().
  checkpatch: close filp_open loophole.
  checkpatch: Handle long multi-line macros better.
  checkpatch: deprecate unbounded string functions.
  checkpatch: forbid implied-barrier I/O functions.
  checkpatch: Merge continuation-header handling from .38.
  ...
2013-09-04 14:46:33 -07:00
Stephen Boyd 38d8910730 Merge branch 'qandroid-3.10' into msm-3.10
* qandroid-3.10: (636 commits)
  netfilter: xt_qtaguid: Protect iface list access with necessary lock
  HID: magicmouse: Fix build warning
  USB: gadget: mtp: Fix OUT endpoint request length usage in read
  USB: gadget: f_mtp: Fix using tx buffer pointer
  msm: Fix race condition in domain lookup
  msm: Add null-pointer checks for domains
  base: sync: increase size of sync_timeline name
  USB: gadget: mtp: Add module parameters for Tx transfer length
  msm: iommu: Lock the genpool allocation
  gpu: ion: fix page offset in dma_buf_kmap()
  gpu: ion: Fix bug in ion_system_heap map_user
  gpu: ion: Only map as much of the vma as the user requested
  gpu: ion: use vmalloc to allocate page array to map kernel
  gpu: ion: Remove dead comments
  gpu: ion: Minimize allocation fallback delay
  mmc: sd: Set the card removed if card detect fails
  gpu: ion: don't fault in individual pages for the CP heap
  gpu: ion: do not ask for compound pages in system heap
  gpu: ion: Modify the system heap to try to allocate large/huge pages
  gpu: ion: Set the dma_address of the sg list at alloc time
  ...

Conflicts:
	arch/arm/Kconfig
	arch/arm/include/asm/hardware/cache-l2x0.h
	arch/arm/mm/cache-l2x0.c
	drivers/mmc/card/block.c
	drivers/usb/gadget/udc-core.c
2013-09-04 14:46:18 -07:00
Steve Muckle 69005c760d scripts/Makefile.headersinst: make scratch file parallel safe
If the scratch file used to store input files is not named in
a unique way, a parallel build will not work.

Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2013-09-04 14:18:15 -07:00
Bruce Ashfield 71f613a0a5 scripts/Makefile.headersinst: install headers from scratch file
If headers_install is executed from a deep/long directory structure, the
shell's maximum argument length can be execeeded, which breaks the operation
with:

| make[2]: execvp: /bin/sh: Argument list too long
| make[2]: ***

By dumping the input files to a scratch file and using xargs to read the
input list from the scratch file, we can avoid blowing out the maximum
argument size and install headers in a long path name environment.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2013-09-04 14:18:14 -07:00
Stephen Boyd d9eb7eec12 Update gcc-wrapper for 3.10
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2013-09-04 14:18:13 -07:00
Mitchel Humpherys e49c7ba1e6 scripts: only set CROSS_COMPILE when unset to begin with
Don't mess with CROSS_COMPILE if it's already set up in the user's
environment. This allows the user to specify the cross compiler that
they wish to use.

Change-Id: I15873f79a30e1da91ee34eb31c713e5cd767c372
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
2013-09-04 14:18:13 -07:00
Abhimanyu Kapur f38611ad7b build-all.py: Add support for msmkrypton_defconfig
There is an msmkrypton_defconfig which does not match the
existing msm pattern by virtue of not containing a number
after the 'msm' prefix. Compile it too.

Change-Id: I19535afe7912487cb6882adec89e3fd8138ed904
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
2013-09-04 14:18:12 -07:00
Bryan Huntsman 3fc237da2b gcc-wrapper: trim whitelist for gcc 4.7
With recent code and defconfig changes, the number warnings needing to
be ignored has gone done.  Update the wrapper accordingly.

Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2013-09-04 14:18:11 -07:00
Stephen Boyd 973bc35641 Update gcc-wrapper for 3.10-rc5
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2013-09-04 14:18:11 -07:00
Adrian Alexei 085fe31392 Remove the build of omap2plus from build-all.py
This tree doesn't maintain support for omap2plus, thus it makes
sense to remove omap2plus build from build-all script.

Change-Id: I54de554a0bc12f5fc26af589dc58c1beb532994f
Signed-off-by: Adrian Alexei <aalexei@codeaurora.org>
2013-09-04 14:18:10 -07:00
Matt Wagantall c45d150536 checkpatch: Excuse reverts from "summary line over 75 characters" check
Rather than forcing authors of reverts to truncate the summary line
because the "Revert" prefix added pushes it over the character limit,
excuse reverts from this rule.

Change-Id: I395dfff3327e360ef935d4a685c38df6577e3867
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
2013-09-04 14:18:10 -07:00
Steve Muckle 96c8a649f6 checkpatch: add new message type string
Many messsages are missing the new message type parameter, which
causes warning messages and a lack of the line number from the
offending line in the patch.

Change-Id: I69f2283c3dc27edd66fd2676c8be45664699dba6
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2013-09-04 14:18:09 -07:00
Steve Muckle 798a0003e6 checkpatch: recognize only specific tags when ending commit text
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)
2013-09-04 14:18:08 -07:00
Steve Muckle bd81d31f16 checkpatch: require commit text
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)
2013-09-04 14:18:08 -07:00
Pankaj Kumar 6b6df8c1c0 checkpatch: Add check for vreg_xxx api in opensource drivers
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)
2013-09-04 14:18:07 -07:00
Rohit Vaswani f9645d5f9f checkpatch: Add check for gpiomux usage in msm board files
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)
2013-09-04 14:18:06 -07:00
Gregory Bean fb7d5d2c10 checkpatch: complain about the use of dsb().
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)
2013-09-04 14:18:06 -07:00
Gregory Bean 028c20aba1 checkpatch: close filp_open loophole.
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)
2013-09-04 14:18:05 -07:00
Gregory Bean bd51a4b61f checkpatch: Handle long multi-line macros better.
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)
2013-09-04 14:18:05 -07:00
Gregory Bean 7595111dc6 checkpatch: deprecate unbounded string functions.
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)
2013-09-04 14:18:04 -07:00
Gregory Bean efdbafb887 checkpatch: forbid implied-barrier I/O functions.
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)
2013-09-04 14:18:03 -07:00
Gregory Bean d498bcaadf checkpatch: Merge continuation-header handling from .38.
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
2013-09-04 14:18:03 -07:00
Gregory Bean 3f2140168e checkpatch: forbid filesystem accesses from within the kernel.
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)
2013-09-04 14:18:02 -07:00
Gregory Bean be65d26fa9 Don't complain about MIME headers.
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)
2013-09-04 14:18:01 -07:00
Patrick Pannuto 7012977708 Checkpatch: Print location when catching return code error
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)
2013-09-04 14:18:01 -07:00
Patrick Pannuto a56b665ad0 checkpatch: Check for illegal return codes
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)
2013-09-04 14:18:00 -07:00