Commit graph

210936 commits

Author SHA1 Message Date
Andy Shevchenko 2b6d83d662 staging: wlags49_h2: remove useless DbgHwAddr() method
There is no needs to prepare string for MAC addresses beforehand, due to
kernel's *printf() have '%pM' format option.

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19 10:04:17 -07:00
Andy Shevchenko a113af9a35 staging: wlags49_h2: fix format of timeStamp debug output
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19 10:04:17 -07:00
Marek Lindner 1bc80e9527 Staging: batman-adv: process OGMs bigger than MAX_AGGREGATION_BYTES
Reported-by: Sam Yeung <sam.cwyeung@gmail.com>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19 10:04:16 -07:00
Marek Lindner 15f00687e3 Staging: batman-adv: fix crash when new OGM is generated
If aggregation is not enabled the local translation table can grow
much bigger and expects to fill a full ethernet packet.

Reported-by: Sam Yeung <sam.cwyeung@gmail.com>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19 10:04:16 -07:00
Marek Lindner 24fb009bae Staging: batman-adv: protect against ogm packet overflow by checking table length
Reported-by: Sam Yeung <sam.cwyeung@gmail.com>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19 10:04:16 -07:00
Marek Lindner 3c45603024 Staging: batman-adv: document fragmentation sysfs API
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19 10:04:16 -07:00
Linus Lüssing 5dfa2ba9e6 Staging: batman-adv: Fix resizing of broadcast seqno buffers on if deletion
Not only the entries of the deleted interface got erased, but also all
ones with a lower if_num. This commit fixes this issue by setting the
destination appropriately.

Signed-off-by: Linus Lüssing <linus.luessing@web.de>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19 10:04:16 -07:00
Sven Eckelmann 9b37bc2c71 Staging: batman-adv: Don't dereference unchecked incoming soft_iface
send_packet derefenced forw_packet->if_incoming and checked if
forw_packet->if_incoming is NULL.

This cannot happen, but still makes irritates when reading through the
functions.

Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19 10:04:16 -07:00
Sven Eckelmann 1ee600ced3 Staging: batman-adv: Add hash recommendations to TODO
David Miller <davem@davemloft.net> recommended in
20100924.134334.28812338.davem@davemloft.net that we must make the hash
abstraction helper more efficient and may remove it completely.

Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19 10:04:15 -07:00
Dan Carpenter 388b2b97ba Staging: sst: more copy_to_user() changes
Vinod wanted the copy_to_user() calls in this format:
	if (copy_to_user())
		retval = -EFAULT;
instead of this:
	retval = copy_to_user();
	if (retval)
		retval = -EFAULt;

I've done that for the whole intel_sst_app_interface.c file.  In the
process I noticed a couple more places that returned -EBUSY or -EAGAIN
instead of -EFAULT.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 15:42:26 -07:00
Dan Carpenter 9f407840bb Staging: intel_sst: off by one bug
This should be >= instead of > or we go passed the end of the array.

Also the arrays are declared with size MAX_NUM_STREAMS.  This is the
only place that uses MAX_NUM_STREAMS_MFLD.  It seems like asking for
trouble to use two variables for the same information.  I've changed
everything to use MAX_NUM_STREAMS.

This bug isn't really harmful.  In the worst case, if you enabled
debugging then you would see a message.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 15:42:26 -07:00
Dan Carpenter 87b554a04a Staging: intel_sst: return -EFAULT if copy_to_user() fails
copy_to_user() returns the number of bytes remaining to be copied but we
want to return an error code.  And that error code is -EFAULT not -EIO.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 15:41:36 -07:00
Haiyang Zhang e98cb27681 staging: hv: Convert camel cased functions in channel_mgmt.c to lower case
Convert camel cased functions in channel_mgmt.c to lower case

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:45:30 -07:00
Haiyang Zhang 188963ec75 staging: hv: Convert camel cased local variable names in channel_mgmt.c to lower case
Convert camel cased local variable names in channel_mgmt.c to lower case

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:45:30 -07:00
Haiyang Zhang 277997032b staging: hv: Convert camel cased parameter in channel_interface.h to lower case
Convert camel cased parameter in channel_interface.h to lower case

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:45:30 -07:00
Haiyang Zhang 53e4f1e656 staging: hv: Convert camel cased function names in channel_interface.c to lower cases
Convert camel cased function names in channel_interface.c to lower cases

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:45:29 -07:00
Haiyang Zhang 9de050c420 staging: hv: Convert camel cased local variables in channel_interface.c to lower cases
Convert camel cased local variables in channel_interface.c to lower cases

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:45:29 -07:00
Julia Lawall cc58cbb885 staging: tidspbridge: Clean up error-handling code
In the first hunk, 0 is returned on memory allocation failure, even though
other failures return -ENOMEM or other similar values.

In the second hunk, there was error handling code that returned without
freeing psz_path_name.

A simplified version of the semantic match that finds the first problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression ret;
expression x,e1,e2,e3;
@@

ret = 0
... when != ret = e1
*x = \(kmalloc\|kcalloc\|kzalloc\)(...)
... when != ret = e2
if (x == NULL) { ... when != ret = e3
  return ret;
}
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:44:25 -07:00
Marek Belisko aaf0885c30 staging: ft1000: Use specific error return code for reg_ft1000_netdev().
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:42:45 -07:00
Marek Belisko 78890fdb24 staging: ft1000: Use specific return error codes.
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:41:35 -07:00
Marek Belisko dd9b6aa4fd staging: ft1000: Check return value when init net device.
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:41:34 -07:00
Marek Belisko e09aee2a52 staging: ft1000: Remove DRVMGS typedef usage.
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:39:26 -07:00
Marek Belisko b13e39b2f7 staging: ft1000: Remove PSEUDO_HDR typedef usage.
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:30:39 -07:00
Marek Belisko e27d96dd9c staging: ft1000: Remove PROV_RECORD typedef usage.
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:27:05 -07:00
Marek Belisko 151adba757 staging: ft1000: Remove APP_INFO_BLOCK typedef usage.
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:27:05 -07:00
Marek Belisko 369e857e96 staging: ft1000: Remove DSPINITMSG typedef usage.
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:27:05 -07:00
Marek Belisko 1b8a301217 staging: ft1000: Remove MEDIAMSG typedef usage.
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:27:04 -07:00
Marek Belisko 7dc5911599 staging: ft1000: Remove unused function ft1000_hbchk()
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:26:37 -07:00
Dan Carpenter 81a2fff67a Staging: intel_sst: cleanup naming a little
&sst_drv_ctx->streams[str_id].lock and &stream->lock are the same.
The mutex_lock() uses &stream->lock so this makes things consistent and
it's nicer to read as well.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:24:39 -07:00
Dan Carpenter 1055cc99bd Staging: ft1000-usb: use the correct list head
Using pdpram_blk here would cause an oops.  We intended to use
&freercvpool.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Tested by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:24:39 -07:00
Dan Carpenter 79e7c561ae Staging: lirc: fix PTR_ERR() check
This is a typo.  It's supposed to be IS_ERR() here instead of PTR_ERR().

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:24:39 -07:00
Dan Carpenter fcbf77bf87 Staging: ft1000-usb: fix array overflow
The code here is supposed checking if we exited the loop without hitting
a break.  The problem is that in the error handling "i" is out of bounds
and it corrupts memory when we do an info->app_info[i].nRxMsgMiss++.
>From the comments, it looks like someone noticed this corruption and
updated the code, but didn't totally fix the problem.  The correct fix
is just to remove nRxMsgMiss++ from the error path.

I believe this bug can be triggered remotely.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:24:38 -07:00
Christopher Brannon 4073f1b6ab staging: speakup: speakup_dectlk.c: style fixes
* Clean this file based on reports from checkpatch.pl.
* Replace a function-like macro with an inline function.
* Remove an incorrect use of the volatile qualifier.  The
previously-volatile variable is now always protected by a spinlock.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:22:38 -07:00
Christopher Brannon c3d5d98820 staging: speakup: speakup_txprt.c: style fixes
* Clean this file based on reports from checkpatch.pl.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:22:38 -07:00
Christopher Brannon 0d42cfe4c1 staging: speakup: speakup_spkout.c: style fixes
* Clean this file based on reports from checkpatch.pl.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:22:38 -07:00
Christopher Brannon 13f1a041ac staging: speakup: speakup_soft.c: style fixes
* Clean this file based on reports from checkpatch.pl.
* Make the file_operations structure const.
* Use strict_strtoul instead of simple_strtoul.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:22:37 -07:00
Christopher Brannon e66c3d8475 staging: speakup: speakup_ltlk.c: style fixes
* Clean this file based on reports from checkpatch.pl.
* Remove an unused function-like macro.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:22:37 -07:00
Christopher Brannon 75d6282d8b staging: speakup: speakup_keypc.c: style fixes
* Clean this file based on reports from checkpatch.pl.
* Eliminate the unused synth_readable macro.
* Convert function-like macros to inline functions.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:22:37 -07:00
Christopher Brannon 9d096afa06 staging: speakup: speakup_dummy.c: style fixes
* Clean this file based on reports from checkpatch.pl.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:22:37 -07:00
Christopher Brannon 2c9e0cb07f staging: speakup: speakup_dtlk.c: style fixes
* Clean this file based on reports from checkpatch.pl.
* Replace function-like macros with inline functions.
* Simplify some boolean expressions.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:22:36 -07:00
Christopher Brannon 227e18d6b6 staging: speakup: speakup_decpc.c: style fixes
* Clean this file based on reports from checkpatch.pl.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:22:36 -07:00
Christopher Brannon 3d4f7eaf65 staging: speakup: speakup_decext.c: style fixes
* Clean this file based on reports from checkpatch.pl.
* Replace function-like macros with inline macros.
* Eliminate a use of the ternary operator, for readability.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:22:36 -07:00
Christopher Brannon 64d1e5a098 staging: speakup: speakup_bns.c: style fixes
* Clean this file based on reports from checkpatch.pl.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:22:36 -07:00
Christopher Brannon d1c07c416c staging: speakup: speakup_audptr.c: style fixes
* Clean this file based on reports from checkpatch.pl.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:22:36 -07:00
Christopher Brannon f4931441ae staging: speakup: speakup_apollo.c: style fixes
* Clean this file based on reports from checkpatch.pl.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:22:35 -07:00
Christopher Brannon 28ba8677bc staging: speakup: speakup_acntsa.c: style fixes
* Clean this file based on reports from checkpatch.pl.
* Eliminate an unused function-like macro.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:22:35 -07:00
Christopher Brannon bf4a4bacb0 staging: speakup: speakup_acntpc.c: style fixes
* Clean this file based on reports from checkpatch.pl.
* Eliminate the unused synth_readable macro.
* Convert function-like macros to inline functions.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:22:35 -07:00
Pavan Savoy 73f12e8d3d drivers: misc: ti-st: fix review comments
Based on comments from Jiri Slaby, drop the register
storage specifier, remove the unused code, cleanup
the const to non-const type casting.
Also make the line discipline ops structure static, since
its a singleton, unmodified structure which need not be
in heap.

Reported-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Pavan Savoy <pavan_savoy@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-14 12:41:10 -07:00
mike.rapoport@gmail.com da6830ac39 staging: brcm80211: remove unrefrenced malloced field
from 'struct osl_info' structure

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-14 12:30:01 -07:00
mike.rapoport@gmail.com 182acb3ca5 staging: brcm80211: replace MFREE with kfree
Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-14 12:29:56 -07:00