Re: [PATCH v2 1/5] Staging: bcm: LeakyBucket: Fixed spacing/tabing issues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2013-07-28 at 03:34 +0800, Lilis Iskandar wrote:
> I don't understand what you mean by mentioning "git diff -w".
> Perhaps you can clarify it for me? Sorry :(

$ git diff --help | grep -w -A2 "\-w"
      -w, --ignore-all-space
           Ignore whitespace when comparing lines. This ignores differences even if one line has whitespace where the other line has none.

It makes sure you are doing only whitespace changes.
Any other changes show up as an actual diff.

You can also compile the changes and make sure
the .o files before and after don't change.

(Something like: assuming a clean tree)

$ cat compare_patch_obj_diffs.sh
#!/bin/bash

if [[ ! -e $1 || ! -f $1 ]]
then
    echo "$1 not found"
    exit $?
fi

grep -P "^\+\+\+" $1 |
while read file
do
    real_file=$(echo $file | cut -f2- -d'/')
    if [[ ${real_file:(-2)} == ".c" ]]
    then
	obj=${real_file%.c}.o
	make $obj
	mv $obj $obj.old
	patch -p1 < $1
	make $obj
	mv $obj $obj.new
	patch -p1 -R < $1
	size $obj.old $obj.new
	if [[ $2 == "y" ]]
	then
	    objdump -d $obj.old > $obj.old.dmp
	    objdump -d $obj.new > $obj.new.dmp
	    diff $obj.old.dmp $obj.new.dmp
	    rm -f $obj.old.dmp $obj.new.dmp
	fi
    fi
done


_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux