<p>osmith has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-ci/+/24961">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">lint: checkpatch.pl: no spaces required for tdef<br><br>Don't require spaces around equals sign for tdef entries.<br><br>Related: OS#5087<br>Change-Id: I1f0b9ed5bd49ef9b5ab0e347b9260e71df34ff9c<br>---<br>M lint/checkpatch/checkpatch.pl<br>1 file changed, 27 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/61/24961/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/lint/checkpatch/checkpatch.pl b/lint/checkpatch/checkpatch.pl</span><br><span>index ca074a7..0b9e334 100755</span><br><span>--- a/lint/checkpatch/checkpatch.pl</span><br><span>+++ b/lint/checkpatch/checkpatch.pl</span><br><span>@@ -5170,6 +5170,33 @@</span><br><span>                                                }</span><br><span>                                    }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+                         # Osmocom specific: do not require spaces</span><br><span style="color: hsl(120, 100%, 40%);">+                             # around the equals sign (=) inside</span><br><span style="color: hsl(120, 100%, 40%);">+                           # struct osmo_tdef entries. (Assuming this is</span><br><span style="color: hsl(120, 100%, 40%);">+                         # the case if the line contains '.T='.)</span><br><span style="color: hsl(120, 100%, 40%);">+                               #</span><br><span style="color: hsl(120, 100%, 40%);">+                             # Usually:</span><br><span style="color: hsl(120, 100%, 40%);">+                            #   struct osmo_tdef global_T_defs[] = {</span><br><span style="color: hsl(120, 100%, 40%);">+                              #       { .T=7, .default_val=50, .desc="Water Boiling Timeout" },</span><br><span style="color: hsl(120, 100%, 40%);">+                           #       { .T=8, .default_val=300, .desc="Tea brewing" },</span><br><span style="color: hsl(120, 100%, 40%);">+                            #       { .T=9, .default_val=5, .unit=OSMO_TDEF_M, .desc="Let tea cool down before drinking" },</span><br><span style="color: hsl(120, 100%, 40%);">+                             #       { .T=10, .default_val=20, .unit=OSMO_TDEF_M, .desc="Forgot to drink tea while it's warm" },</span><br><span style="color: hsl(120, 100%, 40%);">+                             #       {}</span><br><span style="color: hsl(120, 100%, 40%);">+                            #   };</span><br><span style="color: hsl(120, 100%, 40%);">+                                #</span><br><span style="color: hsl(120, 100%, 40%);">+                             # Another example:</span><br><span style="color: hsl(120, 100%, 40%);">+                            #   struct osmo_tdef fr_tdefs[] = {</span><br><span style="color: hsl(120, 100%, 40%);">+                           #       {</span><br><span style="color: hsl(120, 100%, 40%);">+                             #               .T=391,                 // <- only here no spaces around "="</span><br><span style="color: hsl(120, 100%, 40%);">+                             #               .default_val = 10,</span><br><span style="color: hsl(120, 100%, 40%);">+                            #               .min_val = 5,</span><br><span style="color: hsl(120, 100%, 40%);">+                         #               .max_val = 30,</span><br><span style="color: hsl(120, 100%, 40%);">+                                #               .desc = "Link integrity verification polling timer",</span><br><span style="color: hsl(120, 100%, 40%);">+                                #               .unit =  OSMO_TDEF_S,</span><br><span style="color: hsl(120, 100%, 40%);">+                         #       }, ...</span><br><span style="color: hsl(120, 100%, 40%);">+                                } elsif ($opline =~ /\.T=/) {</span><br><span style="color: hsl(120, 100%, 40%);">+                                 # pass</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>                             # All the others need spaces both sides.</span><br><span>                             } elsif ($ctx !~ /[EWC]x[CWE]/) {</span><br><span>                                    my $ok = 0;</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ci/+/24961">change 24961</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-ci/+/24961"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-ci </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I1f0b9ed5bd49ef9b5ab0e347b9260e71df34ff9c </div>
<div style="display:none"> Gerrit-Change-Number: 24961 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>