1
0
Fork 0
Commit Graph

27 Commits (6f00ff78278fd5d6ac110b6903ee042af2d6af91)

Author SHA1 Message Date
Joe Perches 9fc86028fa staging: Remove unnecessary semicolons when if (foo) {...};
Done via perl script:

$ cat remove_semi_if.pl
my $match_balanced_parentheses = qr/(\((?:[^\(\)]++|(?-1))*\))/;
my $match_balanced_braces      = qr/(\{(?:[^\{\}]++|(?-1))*\})/;

foreach my $file (@ARGV) {
    my $f;
    my $text;
    my $oldtext;

    next if ((-d $file));

    open($f, '<', $file)
	or die "$P: Can't open $file for read\n";
    $oldtext = do { local($/) ; <$f> };
    close($f);

    next if ($oldtext eq "");

    $text = $oldtext;

    my $count = 0;
    do {
	$count = 0;
	$count += $text =~ s@\b(if\s*${match_balanced_parentheses}\s*)${match_balanced_braces}\s*;@"$1$3"@egx;
    } while ($count > 0);

    if ($text ne $oldtext) {
	my $newfile = $file;

	open($f, '>', $newfile)
	    or die "$P: Can't open $newfile for write\n";
	print $f $text;
	close($f);
    }
}

$

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-25 16:58:34 -07:00
Felipe Andres Besoain Pino ba5c2b3ddc staging: vt6656: resolved checkpatch finding
removed spaces at the start of a lines.

Signed-off-by: Felipe Andres Besoain Pino <fbesoain@gnome.cl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:55:54 -08:00
Andres More 731047f904 staging: vt6656: removed macro to test bits
Removed custom macro used to test bits.

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-31 11:31:26 -07:00
Andres More 203e4615ee staging: vt6656: removed custom definitions of Ethernet packet types
Removed some unused definitions of Ethernet packet types, also replaced
two of them with in-kernel counterparts from include/linux/if_ether.h

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-31 11:31:25 -07:00
Andres More 465711b39d staging: vt6656: removed not useful comments
Removed comments about who changed/added lines, they do not seem useful.

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-31 11:14:39 -07:00
Andres More bd2bc4c763 staging: vt6656: added spaces around '||'
Cleared checkpatch ERROR: spaces required around that '||'

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-31 11:13:56 -07:00
Andres More 6487c49e8a staging: vt6656: removed NTSTATUS definition
Replaced NTSTATUS with int, as defined in a couple of places.

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-02 18:19:04 -07:00
Roel Van Nyen 93a94c42b1 Staging: vt6656: Remove PUINT from ttype.h
Remove PUINT from ttype.h

Signed-off-by: Roel Van Nyen <roel.vannyen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-02 18:16:27 -07:00
Andres More abad19d076 staging: vt6656: replaced U_CRC_LEN with ETH_FCS_LEN
Removed custom macro with one from include/linux/if_ether.h.
FCS is an Ethernet field that holds the CRC value.

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-22 11:43:04 -07:00
Andres More 8efe1ab3a9 staging: vt6656: removed Calcu_LinkQual definition
Removed an always defined macro, perhaps used to patch the driver

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-22 11:42:28 -07:00
Andres More 4722a26cc6 staging: vt6656: replace IS_ETH_ADDRESS_EQUAL with compare_ether_addr
Code cleanup, removed custom macro to compare Ethernet addresses.
Some checkpatch warnings on indentation were not resolved.

The return value of compare_ether_addr was reversed, something to consider.

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-24 14:15:07 -07:00
Andres More 4b50fb4042 Staging: vt6656: replaced IS_BROADCAST_ADDRESS with is_broadcast_ether_addr
Replaced and removed the custom definition.
Minor checkpatch warnings on long lines and indentation were not cleared.

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-23 15:20:21 -07:00
Andres More 33d33e42b6 Staging: vt6656: code cleanup, fixed 'for' statements
Resolved checkpatch findings, but some long lines warnings.
	ERROR: space required before the open parenthesis '('
	ERROR: spaces required around that

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 10:34:59 -07:00
Andres More cc856e61ee Staging: vt6656: removed custom UCHAR/USHORT/UINT/ULONG/ULONGLONG typedefs
Cleared all checkpatch warnings but 'do not add new typedefs' ones.

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-18 14:51:08 -07:00
Andres More 213d2e9322 Staging: vt6656: removed custom CHAR/SHORT/INT/LONG typedefs
Cleared all checkpatch warnings but one 'do not add new typedefs'

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-18 14:50:30 -07:00
Andres More 0cbd8d9854 staging: vt6656: code cleanup, removed HANDLE definition in ttype.h
Checkpatch warnings about using externs in .c files were not resolved,
neither some long lines on deeply nested code.

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 14:18:23 -07:00
Andres More 6f8c13c7db Staging: vt6656: code cleanup, removed OUT definition
Remoted empty OUT define in ttype.h and its usage across the code.

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:36:12 -07:00
Andres More 8611a29ab9 Staging: vt6656: removed VOID/PVOID definitions
Warnings about the usage of externs in .c files were not resolved here.

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:36:01 -07:00
Andres More 592ccfebb3 Staging: vt6656: Removed IN definition
Code cleanup, removed empty IN definition used to denote input parameters.

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:35:56 -07:00
Andres More 9a0e756c52 Staging: vt6656: incorporated ETH_ALEN macro instead of custom one
Replaced custom U_ETHER_ADDR_LEN by ETH_ALEN from <linux/if_ether.h>.
Resolved checkpatch findings on the changed lines, mostly indentation.

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:35:56 -07:00
Jim Lieb 8a3d91b028 Staging: vt665x: remove tbit.h
Remove use of tbit macros and remove the header file.

Signed-off-by: Jim Lieb <lieb@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:08 -07:00
Jim Lieb 3e362598fd Staging: vt665x: Remove umem.h Part 2
Remove references to umem.h macros and refer directly to memcpy
functions.  Delete the include file.

Signed-off-by: Jim Lieb <lieb@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:08 -07:00
Jim Lieb 9d26d60f99 Staging: vt665x: Clean up include files, Part 1
Remove cplusplus lines from include files
Remove needless ifdefs on includes to conform with C
conventions.  Remove misc commented code/includes
Update TODO

Signed-off-by: Jim Lieb <lieb@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:07 -07:00
Jim Lieb 193a823caa Staging: vt665x: Typedef and macro cleanup Part 1
Clean up unused typedefs and macros to remove Win32'isms and
misc non-linux constructs.  Text edits to referencing
source for less frequently used macros.

Signed-off-by: Jim Lieb <lieb@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:07 -07:00
Jim Lieb d899d40386 Staging: vt665x: 64bit compile fixes Part 2
Fix compile problems with 64bit.  These issues could cause corrupted
address crashes. Cleanup definition use to use more portable kernel
typedefs etc.

Signed-off-by: Jim Lieb <lieb@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:07 -07:00
Alexander Beregalov edb3a9507c Staging: vt6656: remove dependency on kernel version
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:36 -07:00
Forest Bond 92b9679711 Staging: Add pristine upstream vt6656 driver sources to drivers/staging/vt6656.
Add pristine upstream vt6656 driver sources to drivers/staging/vt6656.  These
files were copied from the driver directory in the upstream source archive,
available here:

  http://www.viaarena.com/Driver/VT6656_Linux_src_v1.19_12_x86.zip

After copying, trailing whitespace was stripped.  This is GPL-licensed code.

Signed-off-by: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:32 -07:00