summaryrefslogtreecommitdiff
path: root/.checkpatch.conf
Commit message (Collapse)AuthorAgeFilesLines
* Update license boilerplate text in source code filesMike Frysinger2022-09-121-1/+1
| | | | | | | | | | | | | | | Normally we don't do this, but enough changes have accumulated that we're doing a tree-wide one-off update of the name & style. BRANCH=none BUG=chromium:1098010 TEST=`repo upload` works Change-Id: Icd3a1723c20595356af83d190b2c6a9078b3013b Signed-off-by: Mike Frysinger <vapier@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3891203 Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* checkpatch: Ignore ENOSYS referencesAndrew McRae2022-08-241-0/+3
| | | | | | | | | | | | | | | Tell checkpatch to not warn on ENOSYS references. ENOSYS is used extensively in Zephyr to indicate an unsupported API function. BUG=none TEST=twister -T zephyr/test BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I14d08b4c08e3ad4458073dcfa7396615246ac550 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3853310 Reviewed-by: Keith Short <keithshort@chromium.org>
* checkpatch: Optionally allow braces for single-statement ifJack Rosenthal2022-02-081-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | This disables checkpatch complaining when braces are used with a single-statement if. The Zephyr coding style [1] requires braces of if, else, do, while, for, and switch, even when not explicitly required (the body is only a single statement). In the interest of making code easier to upstream, we should encourage conforming more closely to Zephyr's style for all EC code. [1]: https://docs.zephyrproject.org/latest/contribute/#coding-style BUG=b:218330171 BRANCH=none TEST="checkpatch.pl --no-tree --ignore SPDX_LICENSE_TAG \ -f zephyr/shim/src/console_buffer.c" passes Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I827528ec54a62db05b8e04504cd040bb3aa66be0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3448989 Reviewed-by: Yuval Peress <peress@google.com> Commit-Queue: Yuval Peress <peress@google.com> Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
* checkpatch: add a copyright headerJack Rosenthal2021-01-111-0/+4
| | | | | | | | | | | | | | | Presubmit complains when uploading this file as it has no copyright header. Add one to quiet down the presubmit. BUG=none BRANCH=none TEST=repo upload Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I5df2c89ee3de6d3289d45747b35d27f429822c8a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2622508 Commit-Queue: Paul Fagerburg <pfagerburg@chromium.org> Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
* checkpatch: ignore PRINTK_WITHOUT_KERN_LEVEL for ZephyrJack Rosenthal2021-01-111-0/+4
| | | | | | | | | | | | | | | | Zephyr commits occasionally use a function called "printk", but this is not the same printk used in the Linux kernel. So we need to disable this kernel level check. BUG=none BRANCH=none TEST=presubmit with commit that uses printk Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: Ida9eb1a543e3ca243c7db12b33938f0cd2524c44 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2622506 Commit-Queue: Paul Fagerburg <pfagerburg@chromium.org> Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
* checkpatch: Allow shorter KConfig descriptionsKeith Short2020-12-091-0/+3
| | | | | | | | | | | | | | The Zephyr integration includes KConfig support. Reduce the minimum length description. BUG=none BRANCH=none TEST=Run 'pre-upload.py` against KConfig change with 1 line description. Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I4f22e828e420d7e80c58d10eb767a6e72a058463 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2582278 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* checkpatch: Avoid warnings about pointer extensionsEvan Green2019-10-051-0/+2
| | | | | | | | | | | | | | | | | | Linux has its own crazy set of %p pointer extensions. We're moving the EC into using its own set of pointer extensions so we can turn on compile-time printf format checking, but they're not necessarily the same as Linux. Ignore those warnings so people doing perfectly legit things with our printf don't get pestered. BUG=chromium:984041 TEST=make -j buildall BRANCH=None Change-Id: Ife713d8c8bd2dbb904b2cf6610e278cd3cd4af6d Signed-off-by: Evan Green <evgreen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1728441 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* checkpatch: reinstate check for C99 style commentsVadim Bendebury2019-01-161-0/+2
| | | | | | | | | | | | | | | Recent update of checkpatch.pl made it ignore C99 style comment in the new patches. This change will reinstate the check. BRANCH=none BUG=none TEST=attempt to repo upload patches with C99 style comments fail at pre-upload check phase. Change-Id: I606e2618cc39abcf2dc0b051aefea722a2359f3b Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1409495 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* checkpatch: prevent stupid complaints about description titleVadim Bendebury2016-07-211-0/+2
| | | | | | | | | | | | | | | | Let's not force the linux kernel description format on cherry picked patchs, especially since this check sometimes gets false positive, and since this formwat is not used in the ec codebase. BRANCH=none BUG=none TEST=no more annoying error reports on cherry-picked patches Change-Id: I903bb87c48998932bc9308245d158f212a57fdd1 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/362074 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* checkpatch: do not consider split text strings a problemVadim Bendebury2016-04-271-0/+5
The checkpatch complaints about both lines longer than 80 characters AND character strings split between lines. Damn if you do, damn if you don't. With this addition split character strings are not a problem any more. BRANCH=none BUG=none TEST=split character strings are not reported as a violation by the pre-upload script. Change-Id: I8b5919f086f8c19fe4e6e3a4b99a816111882f0d Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/340535 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Shawn N <shawnn@chromium.org>