Peng Li
f23a3da78a
net: farsync: replace comparison to NULL with "fst_card_array[i]"
...
According to the chackpatch.pl, comparison to NULL could
be written "fst_card_array[i]".
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2021-06-08 12:04:05 -07:00
Peng Li
f01f906ffe
net: farsync: remove redundant return
...
Void function return statements are not generally useful.
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2021-06-08 12:04:05 -07:00
Peng Li
d2a1054b8b
net: farsync: fix the alignment issue
...
Alignment should match open parenthesis.
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2021-06-08 12:04:05 -07:00
Peng Li
ae1be3fad5
net: farsync: remove redundant parentheses
...
Unnecessary parentheses around 'port->hwif == X21'.
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2021-06-08 12:04:05 -07:00
Peng Li
b64b5aee73
net: farsync: remove redundant spaces
...
According to the chackpatch.pl,
space prohibited between function name and open parenthesis '(',
no space is necessary after a cast.
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2021-06-08 12:04:05 -07:00
Peng Li
fa8d10b547
net: farsync: remove redundant braces {}
...
This patch removes redundant braces {}, to fix the
checkpatch.pl warning:
"braces {} are not necessary for single statement blocks".
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2021-06-08 12:04:05 -07:00
Peng Li
37947a9be3
net: farsync: add some required spaces
...
Add spaces required around that '=' and '*'.
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2021-06-08 12:04:05 -07:00
Peng Li
7619ab1618
net: farsync: fix the code style issue about macros
...
Macros with complex values should be enclosed in parentheses.
space required after that ',' .
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2021-06-08 12:04:05 -07:00
Peng Li
3a950181f6
net: farsync: code indent use tabs where possible
...
Code indent should use tabs where possible.
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2021-06-08 12:04:05 -07:00
Peng Li
d70711da30
net: farsync: remove trailing whitespaces
...
This patch removes trailing whitespaces.
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2021-06-08 12:04:05 -07:00
Peng Li
14b9764ccf
net: farsync: fix the comments style issue
...
Networking block comments don't use an empty /* line,
use /* Comment...
Block comments use * on subsequent lines.
Block comments use a trailing */ on a separate line.
This patch fixes the comments style issues.
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2021-06-08 12:04:05 -07:00
Peng Li
8ccac4a58a
net: farsync: remove redundant initialization for statics
...
Should not initialise statics to 0.
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2021-06-08 12:04:05 -07:00
Peng Li
40996bcfe9
net: farsync: move out assignment in if condition
...
Should not use assignment in if condition.
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2021-06-08 12:04:05 -07:00
Peng Li
8ea4bfb30a
net: farsync: fix the code style issue about "foo* bar"
...
Fix the checkpatch error as "foo * bar" should be "foo *bar".
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2021-06-08 12:04:04 -07:00
Peng Li
50d4c36336
net: farsync: add blank line after declarations
...
This patch fixes the checkpatch error about missing a blank line
after declarations.
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2021-06-08 12:04:04 -07:00
Peng Li
34de4c85f3
net: farsync: remove redundant blank lines
...
This patch removes some redundant blank lines.
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2021-06-08 12:04:04 -07:00
Peng Li
0f1e7a34c0
net: hd64570: add some required spaces
...
Add space required before the open parenthesis '('.
Add space required after that close brace '}'.
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2021-06-07 12:25:21 -07:00
Peng Li
cb625e9c5d
net: hd64570: remove redundant parentheses
...
Remove redundant parentheses around 'cda >= desc_off'.
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2021-06-07 12:25:21 -07:00
Peng Li
53da5342c5
net: hd64570: fix the comments style issue
...
Block comments use * on subsequent lines.
Block comments use a trailing */ on a separate line.
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2021-06-07 12:25:21 -07:00
Peng Li
3f8b8db695
net: hd64570: add braces {} to all arms of the statement
...
Braces {} should be used on all arms of this statement.
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2021-06-07 12:25:21 -07:00
Peng Li
bc94e642e4
net: hd64570: fix the code style issue about trailing statements
...
Trailing statements should be on next line.
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2021-06-07 12:25:21 -07:00
Peng Li
1d1fa598ac
net: hd64570: fix the code style issue about "foo* bar"
...
Fix the checkpatch error as "foo* bar" and should be "foo *bar",
and "(foo*)" should be "(foo *)".
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2021-06-07 12:25:21 -07:00
Peng Li
d364c0a93a
net: hd64570: add blank line after declarations
...
This patch fixes the checkpatch error about missing a blank line
after declarations.
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2021-06-07 12:25:21 -07:00
Peng Li
725637a802
net: hd64570: remove redundant blank lines
...
This patch removes some redundant blank lines.
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2021-06-07 12:25:21 -07:00
Peng Li
316fe3cc7d
net: hdlc_x25: fix the alignment issue
...
Alignment should match open parenthesis.
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2021-06-04 14:34:17 -07:00
Peng Li
792b070fca
net: hdlc_x25: fix the code issue about "if..else.."
...
According to the chackpatch.pl, else should follow close brace '}'.
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2021-06-04 14:34:17 -07:00
Peng Li
5de446075c
net: hdlc_x25: add some required spaces
...
Add spaces required around that '='.
Add space required after that ','.
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2021-06-04 14:34:17 -07:00
Peng Li
ec1f377412
net: hdlc_x25: move out assignment in if condition
...
Should not use assignment in if condition.
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2021-06-04 14:34:17 -07:00
Peng Li
579ebffe79
net: hdlc_x25: remove unnecessary out of memory message
...
This patch removes unnecessary out of memory message,
to fix the following checkpatch.pl warning:
"WARNING: Possible unnecessary 'out of memory' message"
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2021-06-04 14:34:17 -07:00
Peng Li
1c906e3698
net: hdlc_x25: remove redundant blank lines
...
This patch removes some redundant blank lines.
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2021-06-04 14:34:17 -07:00
Peng Li
4a20f8ecbf
net: hdlc_cisco: remove redundant space
...
Space prohibited between function name and open parenthesis '('.
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2021-06-03 13:27:36 -07:00
Peng Li
4e38d51478
net: hdlc_cisco: add blank line after declaration
...
This patch fixes the checkpatch error about missing a blank line
after declarations.
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2021-06-03 13:27:36 -07:00
Peng Li
05ff5525aa
net: hdlc_cisco: remove unnecessary out of memory message
...
This patch removes unnecessary out of memory message,
to fix the following checkpatch.pl warning:
"WARNING: Possible unnecessary 'out of memory' message"
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2021-06-03 13:27:36 -07:00
Peng Li
c1300f37ea
net: hdlc_cisco: add some required spaces
...
Add spaces required after the close parenthesis '}'.
Add spaces required after that ','.
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2021-06-03 13:27:36 -07:00
Peng Li
001aa27430
net: hdlc_cisco: fix the code style issue about "foo* bar"
...
Fix the checkpatch error as "foo* bar" and should be "foo *bar",
and "(foo*)" should be "(foo *)".
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2021-06-03 13:27:36 -07:00
Peng Li
5abaf211c4
net: hdlc_cisco: remove redundant blank lines
...
This patch removes some redundant blank lines.
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2021-06-03 13:27:36 -07:00
Peng Li
1bb5218252
net: hdlc: add braces {} to all arms of the statement
...
Braces {} should be used on all arms of this statement.
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2021-06-01 16:57:47 -07:00
Peng Li
e50eb6c357
net: hdlc: move out assignment in if condition
...
Should not use assignment in if condition.
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2021-06-01 16:57:47 -07:00
Peng Li
387847f295
net: hdlc: replace comparison to NULL with "!param"
...
According to the chackpatch.pl, comparison to NULL could
be written "!param".
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2021-06-01 16:57:47 -07:00
Peng Li
01506939cc
net: hdlc: fix an code style issue about EXPORT_SYMBOL(foo)
...
According to the chackpatch.pl,
EXPORT_SYMBOL(foo); should immediately follow its function/variable.
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2021-06-01 16:57:47 -07:00
Peng Li
68fd73925b
net: hdlc: fix an code style issue about "foo* bar"
...
Fix the checkpatch error as "foo* bar" and should be "foo *bar".
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2021-06-01 16:57:47 -07:00
Peng Li
04cc04f07b
net: hdlc: add blank line after declarations
...
This patch fixes the checkpatch error about missing a blank line
after declarations.
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2021-06-01 16:57:47 -07:00
Peng Li
30cd458be2
net: hdlc: remove redundant blank lines
...
This patch removes some redundant blank lines.
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2021-06-01 16:57:46 -07:00
Peng Li
e24b608519
net: sealevel: fix the alignment issue
...
Alignment should match open parenthesis.
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
2021-05-31 22:14:04 -07:00
Peng Li
b086ebfce3
net: sealevel: fix the comments style issue
...
Networking block comments don't use an empty /* line,
use /* Comment...
Block comments use * on subsequent lines.
Block comments use a trailing */ on a separate line.
This patch fixes the comments style issues.
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
2021-05-31 22:14:04 -07:00
Peng Li
04d7ad8cca
net: sealevel: remove meaningless comments
...
Remove the meaningless stylistically wrong comment.
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
2021-05-31 22:14:03 -07:00
Peng Li
cc51e3f36e
net: sealevel: fix a code style issue about switch and case
...
According to the chackpatch.pl, switch and case should be
at the same indent.
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
2021-05-31 22:14:03 -07:00
Peng Li
40e8ee9d46
net: sealevel: remove redundant initialization for statics
...
Should not initialise statics to false.
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
2021-05-31 22:14:03 -07:00
Peng Li
52499d202d
net: sealevel: add some required spaces
...
Add spaces required around that '='.
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
2021-05-31 22:14:03 -07:00
Peng Li
f090d1c381
net: sealevel: open brace '{' following struct go on the same line
...
Fix the checkpatch error as open brace '{' following struct should
go on the same line.
Signed-off-by: Peng Li <lipeng321@huawei.com >
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com >
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
2021-05-31 22:14:03 -07:00