lkml.org 
[lkml]   [2018]   [Dec]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH 0/8] reduce indentation
Date
These patches fix cases where a subsequent statement is aligned
with the right hand side of an assignment rather than the left
hand side. This was done using the following semantic match
(http://coccinelle.lip6.fr/). It has a lot of false positives,
because Coccinelle doesn't record the difference between a space
and a tab, but these issues are easy to skip over.

// <smpl>
@r@
expression x,e;
statement S;
position p0,p1,p2;
@@
x@p0 = e@p1;
S@p2

@script:ocaml@
p0 << r.p0;
p1 << r.p1;
p2 << r.p2;
@@
if ((List.hd p0).col < (List.hd p1).col &&
(List.hd p1).col = (List.hd p2).col)
then Coccilib.print_main "" p1
// </smpl>

---

drivers/firmware/stratix10-svc.c | 12 ++++++------
drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 2 +-
drivers/iommu/msm_iommu.c | 8 ++++----
drivers/net/ethernet/amazon/ena/ena_eth_com.c | 4 ++--
drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +-
drivers/scsi/pm8001/pm8001_sas.c | 2 +-
drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 6 +++---
drivers/usb/gadget/udc/snps_udc_core.c | 17 ++++++++---------
8 files changed, 26 insertions(+), 27 deletions(-)

\
 
 \ /
  Last update: 2018-12-30 17:30    [W:0.086 / U:7.360 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site