Matthias Beyer
66fa6530fa
Staging: bcm: Qos.c: Line length / Whitespace cleanup in MatchSrcPort()
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 17:14:23 -07:00
Matthias Beyer
fcaa42c71a
Staging: bcm: Qos.c: Line length / Whitespace cleanup in MatchProtocol()
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 17:14:23 -07:00
Matthias Beyer
0144b84e0c
Staging: bcm: Qos.c: Line length / Whitespace cleanup in MatchTos()
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 17:14:23 -07:00
Matthias Beyer
bacc620b1d
Staging: bcm: Qos.c: Line length / Whitespace cleanup in MatchDestIpAddress()
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 17:14:23 -07:00
Matthias Beyer
b2e6c772e4
Staging: bcm: Qos.c: Line length / Whitespace cleanup in MatchSrcIpAddress()
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 17:14:23 -07:00
Matthias Beyer
1ccbecddbc
Staging: bcm: Qos.c: Replaced if-else return with ternary operator
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 17:14:22 -07:00
Matthias Beyer
b8ab70b046
Staging: bcm: Qos.c: Replaced do-while(0) breaks with continue
...
This patch replaces the do-while(0); loop which is used for breaking if
a check fails by using the `continue` statement. This saves one
indentation level.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 17:14:22 -07:00
Matthias Beyer
81797eaf79
Staging: bcm: Qos.c: Replaced member accessing by variable in flush_all_queues()
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 17:14:22 -07:00
Matthias Beyer
a3a741c651
Staging: bcm: Qos.c: Replaced member accessing with variable in PruneQueue()
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 17:14:22 -07:00
Matthias Beyer
6ff4d01016
Staging: bcm: Qos.c: Replaced do-while(0) jumps with goto and label, removes one level of indentation
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 17:14:22 -07:00
Matthias Beyer
e6afae3854
Staging: bcm: Qos.c: Replaced member accessing with variable in MatchDestIpAddress()
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 17:14:22 -07:00
Matthias Beyer
7966988088
Staging: bcm: Qos.c: Replaced member accessing with variable in PruneQueue()
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 17:14:22 -07:00
Matthias Beyer
506da6a6f1
Staging: bcm: IPv6Protocol.c: Line length fixes
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 17:13:24 -07:00
Matthias Beyer
dca9fe7b2c
Staging: bcm: IPv6Protocol.c: Whitespace cleanup
...
Removes whitespace before semicolons and add blank line after
declaration.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 17:13:24 -07:00
Matthias Beyer
bb76972441
Staging: bcm: IPv6Protocol.c: Replaced member accessing with variable
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 17:13:24 -07:00
Matthias Beyer
4d7598370a
Staging: bcm: IPv6Procotol.c: Replaced member accessing with variable
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 17:13:24 -07:00
Matthias Beyer
a370ad07b7
Staging: bcm: IPv6Protocol.c: Removed unnecessary if-else blocks
...
This patch simplifies
if (a) {
x = false;
} else {
if (b) {
x = false;
}
}
to
if (a || b) {
x = false;
}
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 17:13:24 -07:00
Matthias Beyer
b0162025eb
Staging: bcm: IPv6Protocol.c: Reindented switch-case
...
This patch removes the unneccessary blocks inside the case statements
and fixes the indentation of their content.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 17:13:24 -07:00
Sudip Mukherjee
2f3b9d394d
staging: bcm: DDRInit.c: fixed coding style: lines over 80 char
...
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27 11:31:59 -07:00
Zahari Doychev
ad45776bda
bcm: fix code style
...
this patch fixes some errors and warnings reported by checkpatch.pl
Signed-off-by: Zahari Doychev <zahari.doychev@linux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27 08:57:38 -07:00
Matthias Beyer
64f488fb1c
Staging: bcm: nvm.c: Don't pass the index
...
The variable 'i' does not need to be passed, as we set it to 0 (zero)
anyways when starting the iteration here.
Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-23 18:34:27 -07:00
Matthias Beyer
897a88d946
Staging: bcm: nvm.c: Fixed variable type
...
The variable type of the local variable 'j' should be 'int' instead of
'unsigned int'.
Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-23 18:34:27 -07:00
Sudip Mukherjee
c837c549ab
staging:bcm:Transmit.c:coding style:line over 80 char
...
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-23 18:21:59 -07:00
Andrey Utkin
6b86609527
drivers/staging/bcm/Misc.c: fix a check
...
The issue was reported by static analysis.
The value holding flags was &-ed with 0x02, being compared to 0x01
(TRUE) after that. Such comparsion is always false.
Resolution: drop the comparsion to TRUE in the condition.
&-ing with 0x02 is right, according to result variable name
(reporting_mode) and description in drivers/staging/bcm/target_params.h
("bit 1 = 1: CINR reporting in Idlemode Msg").
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80801
Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-23 18:12:23 -07:00
Matthias Beyer
ae5ad41993
Staging: bcm: nvm.c: replaced member accessing with variable
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21 12:30:42 -07:00
Matthias Beyer
aabaf67f6f
Staging: bcm: nvm.c: Removed indentation level by concatenating nested if statements
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21 12:30:42 -07:00
Matthias Beyer
f3ebe23705
Staging: bcm: nvm.c: Removed indentation level by using continue statement
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21 12:30:42 -07:00
Matthias Beyer
093300f444
Staging: bcm: nvm.c: Outsourced chunk of code into function
...
This patch outsources a chunk of code into an own function. It also
refactors the variable names which are used within this function.
The function name may be not appropriate.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21 12:30:41 -07:00
Matthias Beyer
3ccc0fd524
Staging: bcm: nvm.c: Shortened lines
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21 12:30:41 -07:00
Khoa Mai
dfcd909227
staging: bcm: Qos.c: Fix coding style
...
Switch and case should be in same indent level
Signed-off-by: Khoa Mai <mdk194@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-17 18:51:27 -07:00
Khoa Mai
9d1e0d094b
staging: bcm: Qos.c: Fix coding style
...
Fix C99 comment
Signed-off-by: Khoa Mai <mdk194@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-17 18:51:27 -07:00
Matthias Beyer
e86bd61ee6
Staging: bcm: PHSModule.c: Shortened lines
...
This patch shortenes all lines where possible without code refactoring,
as well as comment lines. It does not change the wording of comments.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-15 08:09:49 -07:00
Matthias Beyer
3be738ad55
Staging: bcm: PHSModule.c: Replaced if-else return code with simple return assertion
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-15 08:09:49 -07:00
Matthias Beyer
91283491c6
Staging: bcm: PHSModule.c: Replaced member accessing with variable in CreateSFToClassifierRuleMapping()
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-15 08:09:49 -07:00
Matthias Beyer
18002f567f
Staging: bcm: PHSModule.c: Simplified nested if statements by linking them with logical AND in GetPhsRuleEntry()
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-15 08:09:49 -07:00
Matthias Beyer
1c53f0877e
Staging: bcm: PHSModule.c: Simplified nested if statements by linking them with logical AND in GetServiceFlowEntry()
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-15 08:09:49 -07:00
Matthias Beyer
c842dd2ddb
Staging: bcm: PHSModule.c: Simplified nested if statements by linking them with logical AND in GetServiceFlowEntry()
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-15 08:09:49 -07:00
Matthias Beyer
cf423564fa
Staging: bcm: PHSModule.c: Replaced member accessing with variable in GetServiceFlowEntry()
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-15 08:09:49 -07:00
Matthias Beyer
14d8e91596
Staging: bcm: PHSModule.c: Added const keyword to ValidatePHSRUleComplete() argument
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-15 08:09:49 -07:00
Matthias Beyer
cc872f8070
Staging: bcm: PHSModule.c: Rewrote ValidatePHSRuleComplete()
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-15 08:09:48 -07:00
Matthias Beyer
c8020cc93e
Staging: bcm: PHSModule.c: Replaced indentation level with goto jump on bad condition
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-15 08:09:48 -07:00
Matthias Beyer
3ed150a178
Staging: bcm: PHSModule.c: Replaced member accessing with variable in free_phs_service()
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-15 08:09:48 -07:00
Matthias Beyer
b43b245fb3
Staging: bcm: PHSModule.c: Added missing braces around else block
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-15 08:09:48 -07:00
Matthias Beyer
babb7f9479
Staging: bcm: PHSModule.c: Whitespace cleanup in PhsCompress()
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-15 08:09:48 -07:00
Matthias Beyer
a984b124aa
Staging: bcm: PHSModule.c: Replaced member accessing with variables
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-15 08:09:48 -07:00
Matthias Beyer
fc38bc1d68
Staging: bcm: PHSModule.c: Reduced indentation by using jump label in PhsDeleteSFRules()
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-15 08:09:48 -07:00
Matthias Beyer
93cc6ae8b3
Staging: bcm: PHSModule.c: Shortened lines
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-15 08:09:48 -07:00
Matthias Beyer
525afdd170
Staging: bcm: PHSModule.c: Reduced indentation level by using jump label
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-15 08:09:48 -07:00
Matthias Beyer
31f4f3fb15
Staging: bcm: PHSModule.c: Replaced nested if statements with logical AND concatenation of the conditions
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-15 08:09:48 -07:00
Matthias Beyer
413852b6d4
Staging: bcm: PHSModule.c: Replaced member accessing with variable in PhsDeletePHSRule()
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-15 08:09:47 -07:00