On 5/15/19 8:03 AM, Jan Tulak wrote: > Another case of different xfsdump style, spaces around * and ! > operators. This style was used a lot through xfsdump: > (* foo_t)xxx > ^ space > While the rest of XFS omits the space. Same for negations: > if (! foo) > > This patch changes all occurrences to comply with the rest of xfs/kernel > coding style by removing the space. Unlike the previous patches, this > one is not fully replicable by a script - I had to manually correct many > cases of overzealous replacements in comments or strings. > (Regular expressions are a too weak tool for these context-sensitive > changes.) > > Still, the script that did most of the job is here: > > find . -name '*.[ch]' ! -type d -exec gawk -i inplace '{ > $0 = gensub(/^([^"]*)\(\* /, "\\1(*", "g") # foo(* bar > $0 = gensub(/\(\* ([^"]*)$/, "(*\\1", "g") # > $0 = gensub(/^([^ *#]{2}[^"]*)! /, "\\1!", "g") # space after exclamation mark > }; {print }' {} \; > > Signed-off-by: Jan Tulak <jtulak@xxxxxxxxxx> (starts reading it all, eventually resorts to skimming & spot-checking ...) Looks good, thanks! Reviewed-by: Eric Sandeen <sandeen@xxxxxxxxxx>