Commit Graph

227 Commits

Author SHA1 Message Date
Jesper Juhl a6c8ef9526 staging: vt6656: Don't needlessly test for NULL before release_firmware()
Checking for a NULL pointer before calling release_firmware() is
redundant since the function does that check itself.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-18 16:37:05 -07:00
Jesper Juhl 17b7e1ba1e staging: vt6656: Don't leak memory in drivers/staging/vt6656/ioctl.c::private_ioctl()
If copy_to_user() fails in the WLAN_CMD_GET_NODE_LIST case of the
switch in drivers/staging/vt6656/ioctl.c::private_ioctl() we'll leak
the memory allocated to 'pNodeList'. Fix that by kfree'ing the memory
in the failure case.
Also remove a pointless cast (to type 'PSNodeList') of a kmalloc()
return value - kmalloc() returns a void pointer that is implicitly
converted, so there is no need for an explicit cast.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-12 14:34:31 -07:00
Jim Cromie b330f606ed staging: replace open-coded ARRAY_SIZEs
spatch http://coccinelle.lip6.fr/rules/array.cocci did these.

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10 15:25:55 -07:00
Dan Carpenter 4ca5218e39 Staging: vt6655-6: check keysize before memcpy()
We need to check the we don't copy too much memory.  This comes from a
copy_from_user() in the ioctl.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10 09:17:34 -07:00
Masanari Iida 3e495b2104 staging: Fix typo in bssdb.c
Correct spelling "scaning" to "scanning" in
drivers/staging/vt6656/bssdb.c
drivers/staging/vt6655/bssdb.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 12:05:37 -08:00
Jesper Juhl e3b09e4bf6 staging, vt6656/wpactl.c: Fix mem leak in wpa_ioctl()
If we hit the default case in the switch statement in wpa_ioctl()
we'll leak the memory allocated to 'param' when the variable goes out
of scope without having been assigned to anything.

This patch fixes the leak by kfree()'ing the memory before we return
from the function.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:20:06 -08:00
Jesper Juhl 4e1efd6e85 staging, vt6656/wpactl.c: A basic style cleanup
This patch cleans up the coding style in
drivers/staging/vt6656/wpactl.c to closer match the generally accepted
kernel CodingStyle. It is by no means a "make it perfect" patch, but
it does get the file a fair bit closer to matching the accepted style
(whomever was involved in the evolution of this file seriously need to
configure their editors to maintain a consistent style - it was a
mess).

Besides pure style cleanups I also took the liberty of removing some
pointless parens, some unneeded casts and removing some commented out code
(it was obviously not used and git has it if it's ever needed in the
future).

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:20:06 -08: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
Linus Torvalds 12e5550892 Merge branch 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
* 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (466 commits)
  net/hyperv: Add support for jumbo frame up to 64KB
  net/hyperv: Add NETVSP protocol version negotiation
  net/hyperv: Remove unnecessary kmap_atomic in netvsc driver
  staging/rtl8192e: Register against lib80211
  staging/rtl8192e: Convert to lib80211_crypt_info
  staging/rtl8192e: Convert to lib80211_crypt_data and lib80211_crypt_ops
  staging/rtl8192e: Add lib80211.h to rtllib.h
  staging/mei: add watchdog device registration wrappers
  drm/omap: GEM, deal with cache
  staging: vt6656: int.c, int.h: Change return of function to void
  staging: usbip: removed unused definitions from header
  staging: usbip: removed dead code from receive function
  staging:iio: Drop {mark,unmark}_in_use callbacks
  staging:iio: Drop buffer mark_param_change callback
  staging:iio: Drop the unused buffer enable() and is_enabled() callbacks
  staging:iio: Drop buffer busy flag
  staging:iio: Make sure a device is only opened once at a time
  staging:iio: Disallow modifying buffer size when buffer is enabled
  staging:iio: Disallow changing scan elements in all buffered modes
  staging:iio: Use iio_buffer_enabled instead of open coding it
  ...

Fix up conflict in drivers/staging/iio/adc/ad799x_core.c (removal of
module_init due to using module_i2c_driver() helper, next to removal of
MODULE_ALIAS due to using MODULE_DEVICE_TABLE instead).
2012-01-09 12:18:17 -08:00
Marcos Paulo de Souza c25b3c9a43 staging: vt6656: int.c, int.h: Change return of function to void
This patch removes the int return of function INTnsProcessData, because
nobody uses this return.

Signed-off-by: Marcos Paulo de Souza <marcos.mage@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-22 13:45:19 -08:00
Marcos Paulo de Souza 0ae3a912d8 drivers: staging: vt6656: card.c: Remove useless return statement
This patch removes the return of the function CARDbSetMediaChannel, that
always return TRUE value.

Signed-off-by: Marcos Paulo de Souza <marcos.mage@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-22 13:36:25 -08:00
Marcos Paulo de Souza ba768b917f drivers: staging: vt6656: Remove not used returned data of function
This function always return TRUE, and it is not used by the funtions
who calls it.

Signed-off-by: Marcos Paulo de Souza <marcos.mage@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-22 13:36:25 -08:00
Xi Wang 201320435d staging: vt6656: integer overflows in private_ioctl()
There are two potential integer overflows in private_ioctl() if
userspace passes in a large sList.uItem / sNodeList.uItem.  The
subsequent call to kmalloc() would allocate a small buffer, leading
to a memory corruption.

Reported-by: Dan Rosenberg <drosenberg@vsecurity.com>
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-30 19:29:40 +09:00
Marcos Paulo de Souza fee6433bdd staging: vt6656: card.c: Change return of CARDbAddBasicRate to void
In all locations that call this function ignore your returna, so remove
it.

Signed-off-by: Marcos Paulo de Souza <marcos.mage@gmail.com>
Cc: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-30 19:28:19 +09:00
Marcos Paulo de Souza ca76edebce staging: vt6656: baseband.c: Remove commented code
This patch removes a lot of commented code, and some return calls of
void functions.

Signed-off-by: Marcos Paulo de Souza <marcos.mage@gmail.com>
Cc: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-30 19:28:18 +09:00
Marcos Paulo de Souza f001d7e28c staging: vt6656: baseband.c: Removed dead code, and fix coding standards
Remved some commented code, and fixed some style issues. was removed too
a redundant if statement.

Signed-off-by: Marcos Paulo de Souza <marcos.mage@gmail.com>
Cc: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-30 19:28:18 +09:00
Marcos Paulo de Souza 6318237691 staging: vt6656: 80211mgr.c: Code cleanup, removed return of void funcs.
Removed return call of void functions. Removed some code style issues.

Signed-off-by: Marcos Paulo de Souza <marcos.mage@gmail.com>
Cc: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-30 19:28:18 +09:00
Marcos Paulo de Souza ac31e9e8e6 staging: vt6656: main_usb.c: Use kzalloc instead kmalloc
Signed-off-by: Marcos Paulo de Souza <marcos.mage@gmail.com>
Cc: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-30 19:28:18 +09: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
Greg Kroah-Hartman bac2c126e4 USB: convert drivers/staging/* to use module_usb_driver()
This converts the drivers in drivers/staging/* to use the
module_usb_driver() macro which makes the code smaller and a bit
simpler.

Added bonus is that it removes some unneeded kernel log messages about
drivers loading and/or unloading.

Cc: "David Täht" <d@teklibre.com>
Cc: Marek Belisko <marek.belisko@gmail.com>
Cc: Al Cho <acho@novell.com>
Cc: Forest Bond <forest@alittletooquiet.net>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Huajun Li <huajun.li.lee@gmail.com>
Cc: Zac Storer <zac.3.14159@gmail.com>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: edwin_rong <edwin_rong@realsil.com.cn>
Cc: Ben Hutchings <ben@decadent.org.uk>
Cc: Julia Lawall <julia@diku.dk>
Cc: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: Joe Perches <joe@perches.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-18 09:42:11 -08:00
Linus Torvalds aa77677e0a Merge branch 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
* 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1519 commits)
  staging: et131x: Remove redundant check and return statement
  staging: et131x: Mainly whitespace changes to appease checkpatch
  staging: et131x: Remove last of the forward declarations
  staging: et131x: Remove even more forward declarations
  staging: et131x: Remove yet more forward declarations
  staging: et131x: Remove more forward declarations
  staging: et131x: Remove forward declaration of et131x_adapter_setup
  staging: et131x: Remove some forward declarations
  staging: et131x: Remove unused rx_ring.recv_packet_pool
  staging: et131x: Remove call to find pci pm capability
  staging: et131x: Remove redundant et131x_reset_recv() call
  staging: et131x: Remove unused rx_ring.recv_buffer_pool
  Staging: bcm: Fix three initialization errors in InterfaceDld.c
  Staging: bcm: Fix coding style issues in InterfaceDld.c
  staging:iio:dac: Add AD5360 driver
  staging:iio:trigger:bfin-timer: Fix compile error
  Staging: vt6655: add some range checks before memcpy()
  Staging: vt6655: whitespace fixes to iotcl.c
  Staging: vt6656: add some range checks before memcpy()
  Staging: vt6656: whitespace cleanups in ioctl.c
  ...

Fix up conflicts in:
 - drivers/{Kconfig,Makefile}, drivers/staging/{Kconfig,Makefile}:
	vg driver movement
 - drivers/staging/brcm80211/brcmfmac/{dhd_linux.c,mac80211_if.c}:
	driver removal vs now stale changes
 - drivers/staging/rtl8192e/r8192E_core.c:
	driver removal vs now stale changes
 - drivers/staging/et131x/et131*:
	driver consolidation into one file, tried to do fixups
2011-10-26 15:39:02 +02:00
Dan Carpenter 44ec5d2916 Staging: vt6656: add some range checks before memcpy()
We need to verify that we're not writing past the end of the array.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23 10:13:20 +02:00
Dan Carpenter 883aeecc9d Staging: vt6656: whitespace cleanups in ioctl.c
The indents on this file didn't line up so it was hard to work with.
I changed other white space issues as I came across them.  I also
deleted or changed some couple comments and the comment style.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23 10:13:19 +02:00
Dan Carpenter 657d1b0dfc Staging: vt6656: potential memory corruption
param->u.wpa_key.key_len comes from the user.  If it's too large we
would write past the end of the array.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-29 17:34:50 -07:00
Dan Carpenter de0920b1fe Staging: vt6655-6: potential info leak in private_ioctl()
Smatch has a new check for Rosenberg type information leaks where
structs are copied to the user with uninitialized stack data in them.

In this path, the .uLinkRate member doesn't get initialized so I've
set it to zero.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26 17:43:44 -07:00
Andy Shevchenko d6a32aa1b1 staging: vt6656: use %pM for printing MACs
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23 14:36:18 -07:00
Jiri Pirko afc4b13df1 net: remove use of ndo_set_multicast_list in drivers
replace it by ndo_set_rx_mode

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-17 20:22:03 -07:00
Julia Lawall 17fb76165f drivers/staging/vt6656/main_usb.c: Delete unnecessary call to usb_kill_urb
Since in each case nothing has been done with the recently allocated urb,
it is not necessary to kill it before freeing it.

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

// <smpl>
@r exists@
expression urb;
statement S;
position p1,p2;
@@

urb = usb_alloc_urb@p1(...);
... when != urb
if (urb == NULL) S
... when != urb
usb_kill_urb@p2(urb);

@other exists@
position r.p1,r.p2;
@@

... when != usb_alloc_urb@p1(...)
usb_kill_urb@p2(...);

@depends on !other exists@
expression urb;
position r.p1,r.p2;
@@

urb = usb_alloc_urb@p1(...);
...
(
-usb_kill_urb@p2(urb);
+usb_free_urb(urb);
... when != urb
|
-usb_kill_urb@p2(urb);
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-17 11:37:57 -07:00
Joe Perches 95cd17c9f3 staging: Remove unnecessary semicolons when switch (foo) {...};
Done via perl script:

$ cat remove_semi_switch.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(switch\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:35 -07:00
Joe Perches 273f4bef18 staging: Remove unnecessary semicolons when for (foo) {...};
Done via perl script:

$ cat remove_semi_for.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(for\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:35 -07:00
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
Linus Torvalds df9b29d13e Merge branch 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
* 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (28 commits)
  staging: usbip: bugfix for isochronous packets and optimization
  staging: usbip: bugfix add number of packets for isochronous frames
  staging: usbip: bugfixes related to kthread conversion
  staging: usbip: fix shutdown problems.
  staging: hv: Fix GARP not sent after Quick Migration
  staging: IIO: IMU: ADIS16400: Avoid using printk facility directly
  staging: IIO: IMU: ADIS16400: Fix product ID check, skip embedded revision number
  staging: IIO: IMU: ADIS16400: Make sure only enabled scan_elements are pushed into the ring
  staging: IIO: IMU: ADIS16400: Fix addresses of GYRO and ACCEL calibration offset
  staging: IIO: IMU: ADIS16400: Add delay after self test
  staging: IIO: IMU: ADIS16400: Fix up SPI messages cs_change behavior
  staging/rtl81*: build as loadable modules only
  staging: brcm80211: removed 'is_amsdu causing toss' log spam
  staging: brcm80211: fix for 'Short CCK' log spam
  staging: brcm80211: fix for 'AC_BE txop..' logs spammed problem
  staging: memrar: remove driver from tree
  staging: sep: remove last memrar remnants
  staging: fix hv_mouse build, needs delay.h
  staging: fix olpc_dcon build errors
  staging: sm7xx: fixed defines
  ...

Fix up trivial conflict in drivers/staging/memrar/memrar_handler.c
(deleted vs trivial spelling fixes)
2011-04-07 11:36:44 -07:00
Greg Kroah-Hartman 07e195fde6 Staging: vt665?: prevent modules from being built into the kernel.
It causes lots of linking errors when both of these modules are built into the
kernel directly due to their global symbol mess.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-04 21:33:26 -07:00
Lucas De Marchi 25985edced Fix common misspellings
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-31 11:26:23 -03:00
Ilia Mirkin 1d5c536efe staging: vt6656: Remove NULL check before kfree
This patch was generated by the following semantic patch:
// <smpl>
@@ expression E; @@
- if (E != NULL) { kfree(E); }
+ kfree(E);

@@ expression E; @@
- if (E != NULL) { kfree(E); E = NULL; }
+ kfree(E);
+ E = NULL;
// </smpl>

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-14 11:57:37 -07:00
Philip Worrall 8c81161615 Staging: vt6656: Clean up switching to power saving mode.
When switching to power saving mode we only need to notify
the receiver when in infrastructure mode.

Signed-off-by: Philip Worrall <philip.worrall@googlemail.com>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-02 15:52:30 -05:00
Philip Worrall b898cf21ad Staging: vt6656: Ensure power.c uses proper tabbing.
Simplify setting of power state in power.c when sending power
state notifications to the access point.

Signed-off-by: Philip Worrall <philip.worrall at googlemail.com>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-02 15:52:29 -05:00
Philip Worrall c5b0b5fcdb Staging: vt6656: Clean up spaces around parenthesized expressions
Clean up a number of places where unneeded spaces are used around
expressions.

Signed-off-by: Philip Worrall <philip.worrall@googlemail.com>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-02 15:52:29 -05:00
Philip Worrall e25b75ec83 Staging: vt6656: Clean up return from sending power state notifications
Clean up power.c so that unnecessary final return statements
are not used when sending power state notifications to
the access point.

Signed-off-by: Philip Worrall <philip.worrall@googlemail.com>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-02 15:52:28 -05:00
Philip Worrall 036dba14d5 Staging: vt6656: Clean up unneccessary braces in power.c
Clean up some unnecessary braces for conditional statements
where a single statement will do.

Signed-off-by: Philip Worrall <philip.worrall@googlemail.com>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-02 15:52:28 -05:00
Philip Worrall 7404eab294 Staging: vt6656: Use C89 comments in power.c
Reformat the comments in power.c to use the C89 commenting
style instead of the C99 commenting style.

Signed-off-by: Philip Worrall <philip.worrall@googlemail.com>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-02 15:52:27 -05:00
Philip Worrall f9cfbe943c Staging: vt6656: Ensure power.c uses proper tabbing.
Cleanup power.c to use proper tabbing as per coding standards.

Signed-off-by: Philip Worrall <philip.worrall@googlemail.com>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-02 15:52:27 -05:00
Justin P. Mattock 682a45382b staging: vt6656: main_usb.c remove one to many l's in the word.
The patch below removes an extra "l" in the word.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28 18:24:47 -08:00
Ben Hutchings 31d5bbf3da vt6656: Use request_firmware() to load firmware
The file added to linux-firmware is a copy of the current array which
does not have a recognisable header, so no validation is done.

Change the firmware version check to accept newer versions.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-21 12:19:11 -08: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
Greg Kroah-Hartman 491acf0032 Staging: Merge 2.6.37-rc2 into staging-next
This was necessary in order  to resolve some conflicts that happened
between -rc1 and -rc2 with the following files:
	drivers/staging/bcm/Bcmchar.c
	drivers/staging/intel_sst/intel_sst_app_interface.c

All should be resolved now.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-16 10:44:50 -08: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
Ariel Savini 99b7bbb9b5 staging: vt6656 resolved parenthesis not spaces
removes before parenthesis

Signed-off-by: Ariel Savini <arielsavini@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:55:54 -08:00
Mariano Reingart 4a499de2d1 staging: vt6656: resolved checkpatch finding
removed a C99 '//' comment and added a space around '='

Signed-off-by: Mariano Reingart <reingart@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:55:54 -08:00
Matias De la Puente fc4f558602 staging: vt6656: resolved checkpatch finding
removed parentesis and spaces at the start of a line of a return

Signed-off-by: Matias De la Puente <mfpuente.ar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:55:53 -08:00
Vasiliy Kulikov eacd121c3d staging: vt6656: implement missing brackets
Identation says that copy_to_user() should be called only iff
wrq->u.essid.pointer is not zero.  Also it is useless to call copy_to_user(0, ...).

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 14:05:23 -08:00
Tracey Dent 60930a0198 Staging: vt6656: Makefile: cleaned up Makefile cflag lines
Changed to use the proper ccflags-y option

Signed-off-by: Tracey Dent <tdent48227@gmail.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-05 11:56:38 -07:00
Charles Clément a09eae8550 Staging: vt665x: remove unused DEF definition
Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16 13:02:36 -07:00
Clelia V. Korol b411f12174 staging: vt6656: Fixed indentation with spaces
Fixed the last 5 lines, indented with spaces, replacing spaces with tabs.

Signed-off-by: Clelia V. Korol <cvkorol@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16 12:37:35 -07:00
Ema Cuevas c3aca01be6 staging: vt6656: removed dummy errors like extra spaces
As reported by checkpatch.

Signed-off-by: Ema Cuevas <emacupk@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16 12:37:35 -07:00
matias cd74ea33e3 staging: vt6656: delete some parenthesis
I remove parenthesis for a return variable, and also delete a space and tab the code line

Signed-off-by: matias <munozmatiasn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16 12:37:35 -07:00
Emanuel Mariano Ravera 357bcdfb45 staging: vt6656: Space Added after definition of Variable MSG_LEVEL_INFO
Added an space after the definition of the variable MSG_LEVEL_INFO on line 43

Signed-off-by: Emanuel Mariano Ravera <ravera.emanuel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16 12:37:35 -07:00
Diego H. Iglesias b168ae4d4b staging: vt6656: removed not required parentheses.
Removed not required parentheses in return statements.

Signed-off-by: Diego H. Iglesias <diegohi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16 12:37:34 -07:00
Nikitas Angelinas baa5251e8c Staging: vt6656: use ARRAY_SIZE macro in channel.c
Replace (sizeof(ChannelRuleTab) / sizeof(ChannelRuleTab[0])) with
ARRAY_SIZE(ChannelRuleTab) in drivers/staging/vt6656/channel.c

Signed-off-by: Nikitas Angelinas <nikitasangelinas@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-08 21:31:25 -07: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
Dan Carpenter e3a92cdedf Staging: vt6656: problems in error handling
The first kfree(pDevice) is pointless because pDevice is NULL.  The
second kfree(pDevice) is a double free because pDevice is the driver's
private data and that is already freed by free_netdev(netdev).  Also the
free_netdev() error path doesn't call usb_put_dev().

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-31 11:35:06 -07:00
Luis Bosch fe149785a4 staging: vt6656: resolved checkpatch finding
Added spaces in for loop arguments.

Signed-off-by: Luis Bosch <luis.bosch@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-31 11:35:06 -07:00
Victor Rosales 62e7e96148 staging: vt6656: removed extra spaces
Removed spaces between functions name and parenthesis.

Signed-off-by: Victor Rosales <victorhrosales@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-31 11:35:05 -07:00
Alejandro Emanuel Paredes 4846cbc13a staging: vt6656: changed comments convention and removed spaces before tab
resolved checkpatch finding

Signed-off-by: Alejandro Emanuel Paredes <aleparedes@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-31 11:34:53 -07: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 27264fb8c7 staging: vt6656: removed NDIS_STATUS int redefinition
Removed int redefinition for function results.

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
Andres More 22040bbf84 staging: vt6656: simplified tests involving both multi/broad-casts
By definition the broadcast address is also a multicast address.
Lindented the modified section as required by checkpatch.pl.

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-02 18:18:37 -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 529e5b3235 staging: vt6656: code cleanup in device_netdev_ops' device_xmit()
Lindented, cleared checkpatch findings and simplified error handling.

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-22 11:43:05 -07:00
Andres More 6d4e807c5a staging: vt6656: replaced MAX_PACKET_LEN with ETH_FRAME_LEN
Replaced custom macro with one from include/linux/if_ether.h.
Also removed MAX_LOOKAHEAD_SIZE as it is not used elsewhere.

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-22 11:43:05 -07:00
Andres More 5e03f73fe8 staging: vt6656: replaced MIN_PACKET_LEN with ETH_ZLEN
Removed custom macro with one from include/linux/if_ether.h.
Also removed MIN_DATA_LEN as it is not used elsewhere.

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-22 11:43:05 -07:00
Andres More 020c0a9a78 staging: vt6656: replaced MAX_DATA_LEN with ETH_DATA_LEN
Removed custom macro with one 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-07-22 11:43:04 -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 24fe608a2d staging: vt6656: removed WPA_SM_Transtatus 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 5926b9ae32 staging: vt6656: removed Adhoc_STA 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 e1669ed0d4 staging: vt6656: code cleanup in vt6656 DMA TX
Lindented, removed unused variables and cleared checkpatch warnings.

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-22 11:42:01 -07:00
Andres More 7a8b005526 staging: vt6656: code cleanup in vt6656_probe()
Lindented, cleared checkpatch warnings and removed legacy comments.

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-22 11:42:01 -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 5583dcf587 staging: vt6656: removed SndEvt_ToAPI 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-08 13:02:04 -07:00
Andres More feaf03d3b4 staging: vt6656: removed TxInSleep 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-08 13:01:05 -07:00
Andres More 3adb149d2b staging: vt6656: removed unused IS_NULL_ADDRESS definition
Removed custom definition not used elsewhere, is_zero_ether_addr()
is already provided if required.

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-08 13:01:05 -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 6cda24f5df Staging: vt6656: code cleanup of vt6656_disconnect()
Fixed style and debugging printks.
Not replaced PSDevice here, nor removed wireless_send_event() yet.

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 e54d9eb951 Staging: vt6656: code cleanup in vt6656_suspend()/vt6656_resume()
Not changed PSDevice priv struct, just fixed style and removed printks.

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-22 15:42:31 -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
Uwe Kleine-König 0d74395177 Staging: vt665*: fix typos concerning "management"
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 10:42:07 -07:00