Commit Graph

591 Commits

Author SHA1 Message Date
Linus Torvalds
159d8133d0 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
Pull trivial tree updates from Jiri Kosina:
 "Usual rocket science -- mostly documentation and comment updates"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial:
  sparse: fix comment
  doc: fix double words
  isdn: capi: fix "CAPI_VERSION" comment
  doc: DocBook: Fix typos in xml and template file
  Bluetooth: add module name for btwilink
  driver core: unexport static function create_syslog_header
  mmc: core: typo fix in printk specifier
  ARM: spear: clean up editing mistake
  net-sysfs: fix comment typo 'CONFIG_SYFS'
  doc: Insert MODULE_ in module-signing macros
  Documentation: update URL to hfsplus Technote 1150
  gpio: update path to documentation
  ixgbe: Fix format string in ixgbe_fcoe.
  Kconfig: Remove useless "default N" lines
  user_namespace.c: Remove duplicated word in comment
  CREDITS: fix formatting
  treewide: Fix typo in Documentation/DocBook
  mm: Fix warning on make htmldocs caused by slab.c
  ata: ata-samsung_cf: cleanup in header file
  idr: remove unused prototype of idr_free()
2014-04-02 16:23:38 -07:00
Tugce Sirin
65fbed376a Staging: bcm: Remove unnecessary parentheses
This patch fixes checkpatch.pl warning Unnecessary parentheses in bcm
driver.

Signed-off-by: Tugce Sirin <ztugcesirin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-19 13:53:56 -07:00
Heena Sirwani
280c4c8f99 staging: bcm: Fix line over 80 characters.
Fix checkpatch.pl issues with line over 80 characters in Adapter.h

Signed-off-by: Heena Sirwani <heenasirwani@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-19 09:32:11 -07:00
Gary Rookard
3c13b046d5 Staging: bcm: CmHost: moved and removed declarations and tmp bracing.
Firstly, some background is needed to confirm the validity of
this patch as error fixing. It seems the developer when writing
this driver from scratch, used what are known to me as error
suppressors in the form of extra tmp bracing added to the case labels.
They aid during construction time, but are not intended to remain.

In this scenario there are declarations occupying space only
reserved for statements. If these tmp braces were to be removed
before the declarations in question were reassigned to there
proper place in the funtion, compile time errors would result.

So, having that said, I moved the declarations,
UINT uiSearchRuleIndex = 0; and ULONG ulSFID;,
and also deleted the duplicates thereof from
the switch/case statement.

Removed temporary bracing from case labels.

Removed new lines as needed.

Properly indented case breaks.

Added /* FALLTHROUGH */ comments to switch/case.

Signed-off-by: Gary Rookard <garyrookard@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-18 16:22:27 -07:00
Jade Bilkey
9b14459654 staging: bcm: Remove unneeded boolean comparisons and reflow lines
Removes needless boolean TRUE and false comparisons and reflows some lines to
eliminate over 80 character if statments.

Signed-off-by: Jade Bilkey <herself@thefumon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-18 11:48:42 -07:00
Jade Bilkey
6246432f73 staging: bcm: Fix space before semicolon
Fixes several checkpatch

WARNING: space prohibited before semicolon

Signed-off-by: Jade Bilkey <herself@thefumon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-18 11:48:42 -07:00
Jade Bilkey
529d08e97d staging: bcm: Fix lines over 80 characters
Signed-off-by: Jade Bilkey <herself@thefumon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-18 11:48:42 -07:00
Jade Bilkey
c6e50bafd0 staging: bcm: Cleanup unneeded boolean comparisons
Cleans up a few needless comparisons with booleans and cleans up an
interupt handler to take advantage of earlier bailout shortcircuit.

Signed-off-by: Jade Bilkey <herself@thefumon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-18 11:48:42 -07:00
Jade Bilkey
6a259d9b7b staging: bcm: Cleanup CreateInterruptUrb() and StartInterruptUrb()
Fixes checkpatch.pl warnings and errors:

ERROR: that open brace { should be on the previous line
+	if (!psIntfAdapter->psInterruptUrb)
+	{

WARNING: line over 80 characters
+		BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Cannot allocate interrupt urb");

ERROR: space required after that ',' (ctx:VxV)
+		BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Cannot allocate interrupt urb");
 		                                        ^

ERROR: space required after that ',' (ctx:VxV)
+		BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Cannot allocate interrupt urb");
 		                                                                                ^

WARNING: line over 80 characters
+								psIntfAdapter->ulInterruptData;

WARNING: line over 80 characters
+							sizeof(psIntfAdapter->ulInterruptData);

WARNING: line over 80 characters
+						psIntfAdapter->sIntrIn.int_in_endpointAddr);

WARNING: line over 80 characters
+					psIntfAdapter->psInterruptUrb->transfer_buffer,

WARNING: line over 80 characters
+					psIntfAdapter->psInterruptUrb->transfer_buffer_length,

WARNING: line over 80 characters
+	BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Interrupt Interval: %d\n",

ERROR: space required after that ',' (ctx:VxV)
+	BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Interrupt Interval: %d\n",
 	                                        ^

ERROR: space required after that ',' (ctx:VxV)
+	BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Interrupt Interval: %d\n",
 	                                                                                ^

ERROR: that open brace { should be on the previous line
+	if( false == psIntfAdapter->psAdapter->device_removed &&
+		false == psIntfAdapter->psAdapter->bEndPointHalted &&
+		false == psIntfAdapter->bSuspended &&
+		false == psIntfAdapter->bPreparingForBusSuspend &&
+		false == psIntfAdapter->psAdapter->StopAllXaction)
+	{

ERROR: space prohibited after that open parenthesis '('
+	if( false == psIntfAdapter->psAdapter->device_removed &&

ERROR: space required before the open parenthesis '('
+	if( false == psIntfAdapter->psAdapter->device_removed &&

WARNING: line over 80 characters
+		status = usb_submit_urb(psIntfAdapter->psInterruptUrb, GFP_ATOMIC);

ERROR: that open brace { should be on the previous line
+		if (status)
+		{

WARNING: line over 80 characters
+			BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Cannot send int urb %d\n", status);

ERROR: space required after that ',' (ctx:VxV)
+			BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Cannot send int urb %d\n", status);
 			                                        ^

ERROR: space required after that ',' (ctx:VxV)
+			BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Cannot send int urb %d\n", status);
 			                                                                                ^

ERROR: that open brace { should be on the previous line
+			if(status == -EPIPE)
+			{

ERROR: space required before the open parenthesis '('
+			if(status == -EPIPE)

WARNING: line over 80 characters
+				psIntfAdapter->psAdapter->bEndPointHalted = TRUE ;

WARNING: space prohibited before semicolon
+				psIntfAdapter->psAdapter->bEndPointHalted = TRUE ;

WARNING: line over 80 characters
+				wake_up(&psIntfAdapter->psAdapter->tx_packet_wait_queue);

Signed-off-by: Jade Bilkey <herself@thefumon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-18 11:48:42 -07:00
Jade Bilkey
94e74333d0 staging: bcm: Cleanup switch statement
Fixes checkpatch.pl warnings and errors:

ERROR: switch and case should be at the same indent
+	switch (status) {
[...]
+	    case STATUS_SUCCESS:
[...]
+		case -ENOENT :
[...]
+		case -EINPROGRESS:
[...]
+		case -EPIPE:
[...]
+	    case -ECONNRESET: //URB got unlinked.
+	    case -ESHUTDOWN:		// hardware gone. this is the serious problem.
[...]
+	    case -ENODEV : //Device got removed
+		case -EINVAL : //Some thing very bad happened with the URB. No description is available.
[...]
+	    default:

ERROR: that open brace { should be on the previous line
+		if ( urb->actual_length )
+		{

ERROR: space prohibited after that open parenthesis '('
+		if ( urb->actual_length )

ERROR: space prohibited before that close parenthesis ')'
+		if ( urb->actual_length )

ERROR: that open brace { should be on the previous line
+			if(psIntfAdapter->ulInterruptData[1] & 0xFF)
+			{

ERROR: space required before the open parenthesis '('
+			if(psIntfAdapter->ulInterruptData[1] & 0xFF)

WARNING: line over 80 characters
+				BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL, "Got USIM interrupt");

ERROR: space required after that ',' (ctx:VxV)
+				BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL, "Got USIM interrupt");
 				                       ^
ERROR: that open brace { should be on the previous line
+			if(psIntfAdapter->ulInterruptData[1] & 0xFF00)
+			{

ERROR: space required before the open parenthesis '('
+			if(psIntfAdapter->ulInterruptData[1] & 0xFF00)

WARNING: line over 80 characters
+					(psIntfAdapter->ulInterruptData[1] & 0xFF00) >> 8);

WARNING: space prohibited between function name and open parenthesis '('
+				atomic_set (&Adapter->uiMBupdate, TRUE);

WARNING: line over 80 characters
+				BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL, "TX mailbox contains %d",

ERROR: space required after that ',' (ctx:VxV)
+				BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL, "TX mailbox contains %d",
 				                       ^
+					atomic_read(&Adapter->CurrNumFreeTxDesc));

ERROR: that open brace { should be on the previous line
+			if(psIntfAdapter->ulInterruptData[1] >> 16)
+			{

ERROR: space required before the open parenthesis '('
+			if(psIntfAdapter->ulInterruptData[1] >> 16)

ERROR: spaces required around that '=' (ctx:VxE)
+				Adapter->CurrNumRecvDescs=
 				                         ^

WARNING: line over 80 characters
+					(psIntfAdapter->ulInterruptData[1]  >> 16);
+				BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"RX mailbox contains %d",

ERROR: space required after that ',' (ctx:VxV)
+				BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"RX mailbox contains %d",
 				                       ^

ERROR: space required after that ',' (ctx:VxV)
+				BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"RX mailbox contains %d",
 				                                                               ^

ERROR: that open brace { should be on the previous line
+			if(Adapter->fw_download_done &&
+				!Adapter->downloadDDR &&
+				atomic_read(&Adapter->CurrNumFreeTxDesc))
+			{

ERROR: space required before the open parenthesis '('
+			if(Adapter->fw_download_done &&

ERROR: spaces required around that '+=' (ctx:WxV)
+				psIntfAdapter->psAdapter->downloadDDR +=1;
 				                                      ^

ERROR: that open brace { should be on the previous line
+			if(false == Adapter->waiting_to_fw_download_done)
+			{

ERROR: space required before the open parenthesis '('
+			if(false == Adapter->waiting_to_fw_download_done)

ERROR: that open brace { should be on the previous line
+			if(!atomic_read(&Adapter->TxPktAvail))
+			{

ERROR: space required before the open parenthesis '('
+			if(!atomic_read(&Adapter->TxPktAvail))

WARNING: line over 80 characters
+			BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Firing interrupt in URB");

ERROR: space required after that ',' (ctx:VxV)
+			BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Firing interrupt in URB");
 			                       ^

ERROR: space required after that ',' (ctx:VxV)
+			BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Firing interrupt in URB");
 			                                                               ^

ERROR: space prohibited before that ':' (ctx:WxE)
+		case -ENOENT :
 		             ^

WARNING: line over 80 characters
+			BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"URB has got disconnected ....");

ERROR: space required after that ',' (ctx:VxV)
+			BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"URB has got disconnected ....");
 			                       ^

ERROR: space required after that ',' (ctx:VxV)
+			BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"URB has got disconnected ....");
 			                                                               ^

WARNING: space prohibited before semicolon
+			return ;

WARNING: line over 80 characters
+			//This situation may happened when URBunlink is used. for detail check usb_unlink_urb documentation.

ERROR: do not use C99 // comments
+			//This situation may happened when URBunlink is used. for detail check usb_unlink_urb documentation.

WARNING: line over 80 characters
+			BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Impossibe condition has occurred... something very bad is going on");

ERROR: space required after that ',' (ctx:VxV)
+			BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Impossibe condition has occurred... something very bad is going on");
 			                       ^

ERROR: space required after that ',' (ctx:VxV)
+			BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Impossibe condition has occurred... something very bad is going on");
 			                                                               ^

WARNING: space prohibited before semicolon
+			break ;

ERROR: do not use C99 // comments
+			//return;

WARNING: line over 80 characters
+				BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Interrupt IN endPoint  has got halted/stalled...need to clear this");

ERROR: space required after that ',' (ctx:VxV)
+				BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Interrupt IN endPoint  has got halted/stalled...need to clear this");
 				                       ^

ERROR: space required after that ',' (ctx:VxV)
+				BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Interrupt IN endPoint  has got halted/stalled...need to clear this");
 				                                                               ^

WARNING: space prohibited before semicolon
+				Adapter->bEndPointHalted = TRUE ;

WARNING: space prohibited before semicolon
+				urb->status = STATUS_SUCCESS ;

ERROR: do not use C99 // comments
+	    case -ECONNRESET: //URB got unlinked.

WARNING: line over 80 characters
+	    case -ESHUTDOWN:		// hardware gone. this is the serious problem.

ERROR: do not use C99 // comments
+	    case -ESHUTDOWN:		// hardware gone. this is the serious problem.

WARNING: line over 80 characters
+	    						//Occurs only when something happens with the host controller device

ERROR: code indent should use tabs where possible
+^I    ^I^I^I^I^I^I//Occurs only when something happens with the host controller device$

WARNING: please, no space before tabs
+^I    ^I^I^I^I^I^I//Occurs only when something happens with the host controller device$

ERROR: do not use C99 // comments
+	    						//Occurs only when something happens with the host controller device

ERROR: do not use C99 // comments
+	    case -ENODEV : //Device got removed

ERROR: space prohibited before that ':' (ctx:WxW)
+	    case -ENODEV : //Device got removed
 	                 ^

WARNING: line over 80 characters
+		case -EINVAL : //Some thing very bad happened with the URB. No description is available.

ERROR: do not use C99 // comments
+		case -EINVAL : //Some thing very bad happened with the URB. No description is available.

ERROR: space prohibited before that ':' (ctx:WxW)
+		case -EINVAL : //Some thing very bad happened with the URB. No description is available.
 		             ^

WARNING: line over 80 characters
+	    	BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"interrupt urb error %d", status);

ERROR: code indent should use tabs where possible
+^I    ^IBCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"interrupt urb error %d", status);$

WARNING: please, no space before tabs
+^I    ^IBCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"interrupt urb error %d", status);$

ERROR: space required after that ',' (ctx:VxV)
+	    	BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"interrupt urb error %d", status);
 	    	                       ^

ERROR: space required after that ',' (ctx:VxV)
+	    	BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"interrupt urb error %d", status);
 	    	                                                               ^

WARNING: space prohibited before semicolon
+			urb->status = STATUS_SUCCESS ;

WARNING: space prohibited before semicolon
+			break ;

ERROR: do not use C99 // comments
+			//return;

ERROR: spaces required around that ':' (ctx:VxE)
+	    default:
 	           ^

WARNING: line over 80 characters
+			//This is required to check what is the defaults conditions when it occurs..

ERROR: do not use C99 // comments
+			//This is required to check what is the defaults conditions when it occurs..

WARNING: line over 80 characters
+			BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL,"GOT DEFAULT INTERRUPT URB STATUS :%d..Please Analyze it...", status);

ERROR: space required after that ',' (ctx:VxV)
+			BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL,"GOT DEFAULT INTERRUPT URB STATUS :%d..Please Analyze it...", status);
 			                       ^

ERROR: space required after that ',' (ctx:VxV)
+			BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL,"GOT DEFAULT INTERRUPT URB STATUS :%d..Please Analyze it...", status);
 			                                                           ^
Signed-off-by: Jade Bilkey <herself@thefumon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-18 11:48:42 -07:00
Jade Bilkey
54585d5e4c staging: bcm: Cleanup real_int_callback()
Fixes checkpatch.pl warnings and errors and removes some dead code.

Checkpath warnings and errors fixed:

WARNING: line over 80 characters
WARNING: space prohibited before semicolon

ERROR: that open brace { should be on the previous line
ERROR: space required before the open parenthesis '('
ERROR: space required after that ',' (ctx:VxV)

Signed-off-by: Jade Bilkey <herself@thefumon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-18 11:48:42 -07:00
Jade Bilkey
9cb516bdd8 staging: bcm: Fix checkpatch errors
This patch fixes the following checkpatch errors:

ERROR: space prohibited after that '&' (ctx:WxW)
+			memcpy((PVOID) & pstHostMibs->
 			               ^

ERROR: space prohibited after that '&' (ctx:WxW)
+			       (PVOID) & Adapter->
 			               ^

ERROR: space prohibited after that '&' (ctx:WxW)
+			memcpy((PVOID) & pstHostMibs->astSFtable[nSfIndex],
 			               ^

ERROR: space prohibited after that '&' (ctx:WxW)
+			       (PVOID) & Adapter->PackInfo[nSfIndex],
 			               ^

Signed-off-by: Jade Bilkey <herself@thefumon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-18 11:48:42 -07:00
Joshua Baldock
a11f5d2b2b Staging: bcm: fixed parentheses and quoted string across lines coding style in CmHost.c
This is a patch to the CmHost.c file that fixes up parentheses and
quoted string across lines warnings found by checkpatch.pl tool.

Signed-off-by: Joshua Baldock <joshua.baldock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 12:11:29 -07:00
Aybuke Ozdemir
cc43adab9a staging: bcm: Typedefs.h Fix "foo * bar" warning.
This patch fixes these error messages found by checkpatch.pl:
ERROR: "foo* bar" should be "foo *bar"

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 22:24:41 -07:00
Aybuke Ozdemir
54585e56ed staging: bcm: Typedefs.h Fix do not use // c99 comments.
This patch fixes "do not use // C99 comments"
errors in Typedefs.h

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 22:23:01 -07:00
Ebru Akagunduz
7d057e7d63 Staging: bcm: Removed unreachable code line in Bcmchar.c
This patch removes unreachable code line and
unnecessary braces in Bcmchar.c

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 20:37:39 -07:00
Ebru Akagunduz
18e26b358a Staging: bcm: fix line over 80 characters in Bcmchar.c
Fix checkpatch.pl issues with line over 80
characters in Bcmchar.c

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 20:37:14 -07:00
Ashley Smith
a7e4be9d0e staging: bcm: Replace <asm/uaccess.h> by <linux/uaccess.h>
This patch fixes the checkpatch warning to include <linux/uaccess.h> instead
of <asm/uaccess.h>.

Signed-off-by: Ashley Smith <ashley@eclipso.ch>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 18:05:44 -07:00
Tugce Sirin
8fa7fdeb62 Staging: bcm: Fix sparse non-static symbol warning
Fix sparse non-static symbol warning in bcm driver.

Signed-off-by: Tugce Sirin <ztugcesirin@gmail.com>
Acked-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 17:54:55 -07:00
Himangi Saraogi
a6eb9af980 Staging: bcm: Replace bcm functions with equivalents
This patch removes unnecessary bcm functions and replaces them with
their equivalents defined in usb/ch9.h.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-27 15:24:20 -08:00
Daeseok Youn
4a467a438a staging: bcm: fix checkpatch error 'assignment in if condition'
clean up checkpatch errors and bClassificationSucceed is set to "TRUE"
proper location.

If protocal is not TCP or UDP, when it checks protocal, bClassificationSucceed
must be set to TRUE.
Also the end of do-while(0) loop, bClassificationSucceed is set to TRUE.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-27 13:07:11 -08:00
Daeseok Youn
24e3b16b99 staging: bcm: Remove unneeded set a variable
bClassificationSucceed is initialized with "false",
do not need to set "false" again.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-27 13:07:11 -08:00
Greg Kroah-Hartman
b42060069f Merge 3.14-rc4 into staging-next.
We want those fixes here as well.
2014-02-24 12:33:52 -08:00
Jiri Kosina
d4263348f7 Merge branch 'master' into for-next 2014-02-20 14:54:28 +01:00
Paul Bolle
c7dcec7dd4 Kconfig: Remove useless "default N" lines
A number of Kconfig entries default to (uppercase) "N". It was clearly
intended to use "default n". But since (lowercase) "n" is the default
anyway, these lines might as well be removed.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-02-20 14:38:06 +01:00
Dan Carpenter
ee2104ea86 staging/bcm: integer underflow leads to Oom
We do:

        if (NOB > DEFAULT_BUFF_SIZE)
                BuffSize = DEFAULT_BUFF_SIZE;
        else
                BuffSize = NOB;

Since NOB can be negative it results in a larger than intended BuffSize
and makes kzalloc() fail.

The code is still a bit crap because it lets the users read as much as
they want from nvram, but I don't know what a sensible upper limit
should be.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-18 11:18:10 -08:00
Dan Carpenter
cfff3e5c8d staging/bcm: two information leaks in ioctl
There are a couple paths where we don't check how much data we copy back
to the user.

Cc: Dave Jones <davej@redhat.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-18 11:18:09 -08:00
Gary Rookard
a469fe1ab8 Staging: bcm: DDRInit: fix up indentation issues.
fixed up a couple of indentation issues.

Signed-off-by: Gary Alan Rookard <garyrookard@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-18 11:16:55 -08:00
Daniel Borkmann
99932d4fc0 netdevice: add queue selection fallback handler for ndo_select_queue
Add a new argument for ndo_select_queue() callback that passes a
fallback handler. This gets invoked through netdev_pick_tx();
fallback handler is currently __netdev_pick_tx() as most drivers
invoke this function within their customized implementation in
case for skbs that don't need any special handling. This fallback
handler can then be replaced on other call-sites with different
queue selection methods (e.g. in packet sockets, pktgen etc).

This also has the nice side-effect that __netdev_pick_tx() is
then only invoked from netdev_pick_tx() and export of that
function to modules can be undone.

Suggested-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-02-17 00:36:34 -05:00
Dave Jones
84f7a542f9 staging/bcm: move IOCTL_BCM_TIME_SINCE_NET_ENTRY case out to its own function.
bcm_char_ioctl is one of the longest non-generated functions in the kernel,
at 1906 lines.  Splitting it up into multiple functions should simplify
this a lot.

Signed-off-by: Dave Jones <davej@fedoraproject.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-13 13:36:16 -08:00
Dave Jones
fe59cefb69 staging/bcm: move IOCTL_BCM_GET_DEVICE_DRIVER_INFO case out to its own function.
bcm_char_ioctl is one of the longest non-generated functions in the kernel,
at 1906 lines.  Splitting it up into multiple functions should simplify
this a lot.

Signed-off-by: Dave Jones <davej@fedoraproject.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-13 13:36:16 -08:00
Dave Jones
8f7e14eee7 staging/bcm: move IOCTL_BCM_CNTRLMSG_MASK case out to its own function.
bcm_char_ioctl is one of the longest non-generated functions in the kernel,
at 1906 lines.  Splitting it up into multiple functions should simplify
this a lot.

Signed-off-by: Dave Jones <davej@fedoraproject.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-13 13:36:15 -08:00
Dave Jones
b3e5804e48 staging/bcm: move IOCTL_BCM_NVM_RAW_READ case out to its own function.
bcm_char_ioctl is one of the longest non-generated functions in the kernel,
at 1906 lines.  Splitting it up into multiple functions should simplify
this a lot.

Signed-off-by: Dave Jones <davej@fedoraproject.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-13 13:36:15 -08:00
Dave Jones
3c06b7a174 staging/bcm: move IOCTL_BCM_SELECT_DSD case out to its own function.
bcm_char_ioctl is one of the longest non-generated functions in the kernel,
at 1906 lines.  Splitting it up into multiple functions should simplify
this a lot.

Signed-off-by: Dave Jones <davej@fedoraproject.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-13 13:36:15 -08:00
Dave Jones
3aae97fb49 staging/bcm: move IOCTL_BCM_GET_FLASH_CS_INFO case out to its own function.
bcm_char_ioctl is one of the longest non-generated functions in the kernel,
at 1906 lines.  Splitting it up into multiple functions should simplify
this a lot.

Signed-off-by: Dave Jones <davej@fedoraproject.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-13 13:36:15 -08:00
Dave Jones
3e2aea5992 staging/bcm: move IOCTL_BCM_COPY_SECTION case out to its own function.
bcm_char_ioctl is one of the longest non-generated functions in the kernel,
at 1906 lines.  Splitting it up into multiple functions should simplify
this a lot.

Signed-off-by: Dave Jones <davej@fedoraproject.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-13 13:36:15 -08:00
Dave Jones
56b682a5ac staging/bcm: formatting cleaning for IOCTL_BCM_IDENTIFY_ACTIVE_SECTION
Signed-off-by: Dave Jones <davej@fedoraproject.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-13 13:36:14 -08:00
Dave Jones
9e0d6e1a0d staging/bcm: move IOCTL_BCM_SET_ACTIVE_SECTION case out to its own function.
bcm_char_ioctl is one of the longest non-generated functions in the kernel,
at 1906 lines.  Splitting it up into multiple functions should simplify
this a lot.

Signed-off-by: Dave Jones <davej@fedoraproject.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-13 13:36:14 -08:00
Dave Jones
338a5c4a36 staging/bcm: move IOCTL_BCM_GET_FLASH2X_SECTION_BITMAP case out to its own function.
bcm_char_ioctl is one of the longest non-generated functions in the kernel,
at 1906 lines.  Splitting it up into multiple functions should simplify
this a lot.

Signed-off-by: Dave Jones <davej@fedoraproject.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-13 13:36:14 -08:00
Dave Jones
174b3b46bd staging/bcm: move IOCTL_BCM_FLASH2X_SECTION_WRITE case out to its own function.
bcm_char_ioctl is one of the longest non-generated functions in the kernel,
at 1906 lines.  Splitting it up into multiple functions should simplify
this a lot.

Signed-off-by: Dave Jones <davej@fedoraproject.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-13 13:36:14 -08:00
Dave Jones
b4571fc206 staging/bcm: move IOCTL_BCM_FLASH2X_SECTION_READ case out to its own function.
bcm_char_ioctl is one of the longest non-generated functions in the kernel,
at 1906 lines.  Splitting it up into multiple functions should simplify
this a lot.

Signed-off-by: Dave Jones <davej@fedoraproject.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-13 13:36:13 -08:00
Dave Jones
5be531c22a staging/bcm: move IOCTL_BCM_NVM_[READ|WRITE] cases out to their own function.
bcm_char_ioctl is one of the longest non-generated functions in the kernel,
at 1906 lines.  Splitting it up into multiple functions should simplify
this a lot.

Signed-off-by: Dave Jones <davej@fedoraproject.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-13 13:36:13 -08:00
Dave Jones
085ca029be staging/bcm: move IOCTL_BCM_SET_DEBUG case out to its own function.
bcm_char_ioctl is one of the longest non-generated functions in the kernel,
at 1906 lines.  Splitting it up into multiple functions should simplify
this a lot.

Signed-off-by: Dave Jones <davej@fedoraproject.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-13 13:10:11 -08:00
Dave Jones
1e1ee18462 staging/bcm: move IOCTL_BCM_CAL_INIT case out to its own function.
bcm_char_ioctl is one of the longest non-generated functions in the kernel,
at 1906 lines.  Splitting it up into multiple functions should simplify
this a lot.

Signed-off-by: Dave Jones <davej@fedoraproject.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-13 13:10:11 -08:00
Dave Jones
1c55e38104 staging/bcm: move IOCTL_BCM_GET_NVM_SIZE case out to its own function.
bcm_char_ioctl is one of the longest non-generated functions in the kernel,
at 1906 lines.  Splitting it up into multiple functions should simplify
this a lot.

Signed-off-by: Dave Jones <davej@fedoraproject.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-13 13:10:10 -08:00
Dave Jones
b32384b43d staging/bcm: move IOCTL_BCM_BULK_WRM case out to its own function.
bcm_char_ioctl is one of the longest non-generated functions in the kernel,
at 1906 lines.  Splitting it up into multiple functions should simplify
this a lot.

Signed-off-by: Dave Jones <davej@fedoraproject.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-13 13:10:10 -08:00
Dave Jones
db9a4dc78f staging/bcm: move IOCTL_BCM_GET_HOST_MIBS case out to its own function.
bcm_char_ioctl is one of the longest non-generated functions in the kernel,
at 1906 lines.  Splitting it up into multiple functions should simplify
this a lot.

Signed-off-by: Dave Jones <davej@fedoraproject.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-13 13:10:09 -08:00
Dave Jones
4d476affec staging/bcm: move IOCTL_BCM_GET_DSX_INDICATION case out to its own function.
bcm_char_ioctl is one of the longest non-generated functions in the kernel,
at 1906 lines.  Splitting it up into multiple functions should simplify
this a lot.

Signed-off-by: Dave Jones <davej@fedoraproject.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-13 13:10:08 -08:00
Dave Jones
cfd01356f9 staging/bcm: move IOCTL_BCM_SET_MAC_TRACING case out to its own function.
bcm_char_ioctl is one of the longest non-generated functions in the kernel,
at 1906 lines.  Splitting it up into multiple functions should simplify
this a lot.

Signed-off-by: Dave Jones <davej@fedoraproject.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-13 13:10:08 -08:00
Dave Jones
9c434f8e23 staging/bcm: move IOCTL_BCM_GET_CURRENT_STATUS case out to its own function.
bcm_char_ioctl is one of the longest non-generated functions in the kernel,
at 1906 lines.  Splitting it up into multiple functions should simplify
this a lot.

Signed-off-by: Dave Jones <davej@fedoraproject.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-13 13:10:07 -08:00