laforge submitted this change.

View Change

Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved
lint: checkpatch: don't require space in T=-1234

Inside struct osmo_tdef we write non-spec timers as T=-1234. Do not
complain about having no space before the minus character.

Example:
{ .T=-25, .default_val=5, .desc="Timeout for ..." },

Note that the Linux kernel coding style also requires spaces around the
equals signs. We follow that everywhere except for struct osmo_tdef,
and the linter has already been adjusted for that in
I1f0b9ed5bd49ef9b5ab0e347b9260e71df34ff9c.

Change-Id: I0885e84ad99c7d333a5930c411fd1273badb0fcb
---
M lint/checkpatch/checkpatch.pl
1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/lint/checkpatch/checkpatch.pl b/lint/checkpatch/checkpatch.pl
index d98d79c..eada2a9 100755
--- a/lint/checkpatch/checkpatch.pl
+++ b/lint/checkpatch/checkpatch.pl
@@ -5077,11 +5077,16 @@
$opv eq '*U' || $opv eq '-U' ||
$opv eq '&U') { # Osmocom specific: &&U removed
if ($ctx !~ /[WEBC]x./ && $ca !~ /(?:\)|!|~|\*|-|\&|\||\+\+|\-\-|\{)$/) {
- if (ERROR("SPACING",
- "space required before that '$op' $at\n" . $hereptr)) {
- if ($n != $last_after + 2) {
- $good = $fix_elements[$n] . " " . ltrim($fix_elements[$n + 1]);
- $line_fixed = 1;
+ # Osmocom specific: inside struct osmo_tdef we write non-spec timers as
+ # T=-1234. Do not complain about having no space before the minus
+ # character.
+ if ($opline !~ /\.T=/) {
+ if (ERROR("SPACING",
+ "space required before that '$op' $at\n" . $hereptr)) {
+ if ($n != $last_after + 2) {
+ $good = $fix_elements[$n] . " " . ltrim($fix_elements[$n + 1]);
+ $line_fixed = 1;
+ }
}
}
}

To view, visit change 27379. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I0885e84ad99c7d333a5930c411fd1273badb0fcb
Gerrit-Change-Number: 27379
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-MessageType: merged