Commit Graph

50 Commits

Author SHA1 Message Date
Justin P. Mattock a0a1f61afa staging "vt6656" Fix typos in comments, and in a printk message.
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 14:00:56 -07:00
Jesper Juhl 9a671f886f staging: vt6656: iwctl: remove a few remaining redundant newlines
I missed a few redundant newlines the first time.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-09 11:41:31 -07:00
Jesper Juhl 0c5c790109 staging: vt6656: iwctl: Fix up a few remaining brace issues
My previous cleanup patches missed a few cases of
redundant/missing/replaced curly braces. This should fix up the last
ones.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by : Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-09 11:41:31 -07:00
Jesper Juhl 4063d06043 staging: vt6656: iwctl: fix up spacing around operators
A few cases were missed in my previous cleanup, this takes care of the
last cases of missing space (or too much space (as in a newline))
around operators ('=', '==', ',', '<').

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-09 11:41:31 -07:00
Jesper Juhl 8c3337fec4 staging: vt6656: iwctl: Clean up braces on 'if' statements
Clean up braces on 'if' statements to (mostly) match coding style.
A few other bits, like removing a few blank lines and such may have snug in.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-25 11:20:36 -07:00
Jesper Juhl 37f0777fb1 staging: vt6656: iwctl: Cleanup spacing around operators (mostly)
This cleans up spacing around operators according to CodingStyle.
(A few deletions of empty lines that were missed by a previous patch are also included.
 A few bits and pieces broken on multiple lines were put one one line as well).

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-25 11:20:36 -07:00
Jesper Juhl aeadd58d2d staging: vt6656: iwctl: one statement per line (if)
Statement following 'if' should be on its own line.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-25 11:20:36 -07:00
Jesper Juhl 5a67363792 staging: vt6656: iwctl: comment cleanup
All comments now have one space between the code they follow and the
comment start chars and one space after the comment start chars and
the comment text.
Also cleaned up some spacing within comments - mostly removed space
before ':' and added space after ',' etc.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-25 11:20:35 -07:00
Jesper Juhl f269d1c2a7 staging: vt6656: iwctl: space after if/for/while/switch
Our coding style dictates a space after if/for/while/switch and the
opening parenthesis.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-25 11:20:35 -07:00
Jesper Juhl bd4208e922 staging: vt6656: iwctl: remove spaces between casts and variables
We do not usually write a space between a cast and the variable being
converted. this patch removes such spaces where they occour in iwctl.c

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-25 11:17:38 -07:00
Jesper Juhl da06f7dbdb staging: vt6656: iwctl: remove unneeded scope block in iwctl_siwessid()
Reduce indentation by removing completely redundant scope block in the
iwctl_siwessid() function.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-25 11:17:38 -07:00
Jesper Juhl 1a6dd0da0f staging: vt6656: iwctl: remove redundant cast (to PSDevice)
netdev_priv() returns a void*, so there is no reason to explicitly
cast to (PSDevice) when assigning to a variable of type PSDevice. The
cast is done implicitly.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-25 11:17:38 -07:00
Jesper Juhl c5a415cab5 staging: vt6656: iwctl: ensure one space between defined name and value
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-25 11:17:37 -07:00
Jesper Juhl c91a8d5a7b staging: vt6656: iwctl: Fix up variable declarations (whitespace and 'one-per-line')
Ensure that we have only one variable declaration per line and for
each of those lines we have one space between type and variable name
and if there's assignment, then we have one space on each side of the
equals sign (and no more than 80 characters per line).

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-25 11:17:37 -07:00
Jesper Juhl bb6ec004c1 staging: vt6656: iwctl: remove redundant ';'
else clauses don't need to be terminated with ';'.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-25 11:10:29 -07:00
Jesper Juhl 48746d7f4d staging: vt6656: iwctl: Fix indentation
Fix indentation for the entire files to use tabs rather than spaces
and also make sure everything is indented to the proper depth
according to context.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-25 11:10:29 -07:00
Jesper Juhl 921cd68b67 staging: vt6656: iwctl: fix up function declarations/prototypes
The way function prototypes/declarations are written in iwctl.[ch] is
an inconsistent mess.

This patch makes the whole thing consistent by putting the first
function arguments (op to a column width of at most 80) on the same
line as the function name and the remaining ones on the following line
indented by two tabs.

Besides getting rid of the current tabs vs spaces mess it also
shortens the files quite a bit and puts them more in line with most
other kernel files.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-25 11:10:28 -07:00
Jesper Juhl 4c0ad72f01 staging: vt6656: iwctl: Remove redundant blank lines
There are a number of excessive blank lines in iwctl.c - this patch
gets rid of most of those that I personally considered the most
obvious ones.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-25 11:02:04 -07:00
Jesper Juhl 70b3fd34a9 staging: vt6656: Correct a few assignments to be compares in iwctl_siwencodeext()
The result of "foo = bar" is true, so in statements such as
  ...
  if((pDevice->bwextstep0 = TRUE)&&(param->u.wpa_key.key_index ==1))
  ...
an assignment  is most likely not what was intended - a comparison was. As in:
  ...
  if ((pDevice->bwextstep0 == TRUE) && (param->u.wpa_key.key_index == 1))
  ...

There are a 3 such mistakes in the iwctl_siwencodeext() function.
This patch fixes them all.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22 21:04:05 -07:00
Marcos Paulo de Souza 2fdde902ca staging: vt6656: iwctl.c: Rewrite siwrts funciton
This function has the following issues:
	Parameter info and extra are not used
	Wrong error handling(the function not return -EINVAL when it
happens)

This patch simplifies this funtion, remove the not used parameters and
fix the error handilng.

Signed-off-by: Marcos Paulo de Souza <marcos.mage@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:18:27 -08:00
Marcos Paulo de Souza 739ea07640 staging: vt6656: iwctl.c: Remove return statement of iwctl_giwrate
This function will always return 0, and this data is not used by who
calls this function.

Signed-off-by: Marcos Paulo de Souza <marcos.mage@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:18:26 -08:00
Marcos Paulo de Souza caa20de816 staging: vt6656: iwctl.c: Remove return statement of iwctl_giwessid
This function will always return 0, and this data is not used by who
calls this function.

Signed-off-by: Marcos Paulo de Souza <marcos.mage@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:18:26 -08:00
Marcos Paulo de Souza f9b9f93426 staging: vt6656: Remove return statement of iwctl_giwrange
The function iwctl_giwrange will always return 0, and this data is not
used by who calls this function.

Signed-off-by: Marcos Paulo de Souza <marcos.mage@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:18:26 -08:00
Marcos Paulo de Souza 5d11b1737d staging: vt6656: Remove return statement of iwctl_giwmode
This function will always return 0, and this data is not used by who
calls this function.

Signed-off-by: Marcos Paulo de Souza <marcos.mage@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:18:25 -08:00
Marcos Paulo de Souza 506215ba22 staging: vt6656: iwctl.c: Remove useless function
The funciton iwctl_commit does nothing, and can be removed.

Signed-off-by: Marcos Paulo de Souza <marcos.mage@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:18:25 -08:00
Marcos Paulo de Souza 1a2463f6e2 staging: vt6656: iwctl.c: Remove commented code
Signed-off-by: Marcos Paulo de Souza <marcos.mage@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:18:24 -08:00
Marcos Paulo de Souza 428c1fb50e staging:vt6656: iwctl.c: Removed unneeded function
Removed the function iwctl_giwnwid, that just return a error code.

Changes v1 to v2:
	Removed same functions of vt6655 and vt6656.

Signed-off-by: Marcos Paulo de Souza <marcos.mage@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-30 19:25:50 +09:00
Joe Perches 859171ca92 drivers/staging: Remove unnecessary semicolons
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-16 12:06:47 -08:00
Julia Lawall 4d9db977f9 staging: Use available error codes
An error code is stored in a variable, but 0 is returned instead.  Use the
variable instead of 0.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
local idexpression x;
constant C;
@@

if (...) { ...
  x = -C
  ... when != x
(
  return <+...x...+>;
|
  return NULL;
|
  return;
|
* return ...;
)
}
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-31 15:05:12 -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 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 b7526f1460 staging: vt6656: removed update_BssList 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:27 -07:00
Andres More 68746744b1 staging: vt6656: removed Safe_Close 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:27 -07:00
Andres More 89b28e5db8 staging: vt6656: removed '#if 1'/'#if 0' definitions
Removed code guarded by always false definitions.

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-22 11:42:00 -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 2a1a17498b Staging: vt6656: removed '#if 0' definitions
Removed code in .c files that was being skipped by the preprocessor

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-22 15:38:08 -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 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
Julia Lawall 8f18604e6f Staging: drop redundant memset
The region set by the call to memset is immediately overwritten by the
subsequent call to memcpy.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression e1,e2,e3,e4;
@@

- memset(e1,e2,e3);
  memcpy(e1,e4,e3);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:35:34 -07:00
André Goddard Rosa bbc9a9916b Staging: fix assorted typos all over the place
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11 12:23:20 -08: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
Julia Lawall 2e9ab1e72c Staging: Correct use of ! and &
Correct priority problem in the use of ! and &.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@ expression E; constant C; @@
- !E & C
+ !(E & C)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:06 -07:00
Alexander Beregalov 70f38b1053 Staging: vt6656: remove dependency on WIRELESS_EXT version
As the driver is in mainline now we can remove such dependency.
WIRELESS_EXT is 22 now and it is always defined.

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
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 1e28efa3eb Staging: vt6656: Replace net_device->priv accesses with netdev_priv calls.
vt6656: Replace net_device->priv accesses with netdev_priv calls.

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
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