Staging: rtl8192u: Fix space issues before '(' and after ')'
authorHaneen Mohammed <hamohammed.sa@gmail.com>
Wed, 25 Mar 2015 05:09:59 +0000 (08:09 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Mar 2015 09:35:33 +0000 (10:35 +0100)
commitf53cb7b16861f0bd474aab07b91c744758d4f1fd
tree1d19e27b49573b376e29e0929f429ba4d915191f
parentdde48b99d23f3f2e0f016d297801e4d5f13297fa
Staging: rtl8192u: Fix space issues before '(' and after ')'

Space is required before the open and after the close parenthesis.
This patch adds space after 'if' and before '{'.

This was done with the help of the following Coccinelle script:

@r@
expression E;
position p1,p2,p3;
@@

if@p1 (E) @p3{@p2
        ...
}

@script:python@
p1 << r.p1;
p2 << r.p2;
p3 << r.p3;
@@

l1 = int (p1[0].line)
l2 = int (p2[0].line)
l3 = int (p3[0].line)
c1 = int (p1[0].column_end)
c2 = int (p2[0].column)
c3 = int (p3[0].column)
if (l1 != l2):
  cocci.include_match(False)
if (l2 == l3 and c3 + 2 == c2):
  cocci.include_match(False)

@@
position r.p1,r.p2,r.p3;
expression r.E;
@@

-if@p1 (E) @p3{@p2
+if (E) {
...
}

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c
This page took 0.02558 seconds and 5 git commands to generate.