Removed variables used only for return purposes and replaced them for
the return value itself. Found using Coccinelle's semantic patch:
@@
local idexpression ret;
expression e;
@@
-ret =
+return
e;
-return ret;
Signed-off-by: Juliana Rodrigues <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Removed an unecessary blank line after open brace, fixing a checkpatch
issue.
Signed-off-by: Juliana Rodrigues <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Declare the 'arche_apb_ctrl_of_match' array as const. This array is only stored
in the .of_match_table field of a device_driver structure, which is declared as
const. This addresses the checkpatch warning:
WARNING: struct of_device_id should be normally const
Signed-off-by: Eva Rachel Retuya <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Declare the arrays 'arche_platform_of_match' and 'arche_combined_id' as const.
'arche_platform_of_match' is only stored in the .of_match_table field of a
device_driver structure, which is declared as const.
'arche_combined_id' is passed to MODULE_DEVICE_TABLE. This macro does not
modify the array and therefore the array can be declared as const. Checkpatch
pointed out both issues.
WARNING: struct of_device_id should be normally const
Signed-off-by: Eva Rachel Retuya <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Move the test to check if a variable is NULL, to right after it is being
assigned, rather than some statements later.
Signed-off-by: Rehas Sachdeva <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch removes an unnecessary variable used to store return values
in order to reduce memory usage.
Done using coccinelle:
@@
type T;
constant C;
identifier ret;
@@
- T ret = C;
... when != ret
return
- ret
+ C
;
Signed-off-by: sayli karnik <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch fixes multiple black lines issue found by checkpatch.pl
Signed-off-by: Yannis Damigos <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Remove unnecessary parentheses from right side of an assignment. Issue
detected by the following Coccinelle semantic patch:
@r@
identifier x;
expression e1, e2;
@@
- x = (e1 << e2);
+ x = e1 << e2;
Signed-off-by: Rehas Sachdeva <[email protected]>
Acked-by: Julia Lawall <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Setting the variable 'refresh_rate = 60;' has no use to the rest of the
function. Hence the if statement setting it and the variable itself can be
removed. This was detected using the following Coccinelle semantic patch:
@@
type T;
identifier i;
constant C;
@@
(
extern T i;
|
- T i;
<+... when != i
- i = C;
...+>
)
Signed-off-by: Rehas Sachdeva <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Add myself as greybus uart and log protocol driver maintainer.
Signed-off-by: David Lin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Fixes checkpatch.pl warning:
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
Signed-off-by: Chaehyun Lim <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Minor error spotted by checkpatch.pl in greybus
code indent should use tabs where possible
Signed-off-by: Richard Groux <[email protected]>
Reviewed-by: Alex Elder <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Minor error spotted by checkpatch.pl in greybus
space required before the open brace '{'
Signed-off-by: Richard Groux <[email protected]>
Reviewed-by: Alex Elder <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Modify return statement to use the value being returned directly instead of
assigning it first to 'ret' and returning this variable. Coccinelle semantic
patch used:
@@
expression e;
local idexpression ret;
@@
-ret =
+return
e;
-return ret;
Signed-off-by: Eva Rachel Retuya <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch replaces the enum value MOST_CH_ISOC_AVP with the more
appropriate MOST_CH_ISOC.
Signed-off-by: Andrey Shvetsov <[email protected]>
Signed-off-by: Christian Gromm <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch adds the strings 'rx', 'tx' and 'isoc' to the list of accepted
identifiers when setting up a channel configuration. To keep consistency it
removes the prefix "dir_" from strings returned by the attributes
set_direction and available_directions and it removes the suffix "_avp"
from the string "isoc_avp" returned by the attributes set_datatype and
available_datatypes.
Signed-off-by: Christian Gromm <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch removes trailing zeros from the strings returned by the
attributes available_datatypes and available_directions.
Signed-off-by: Andrey Shvetsov <[email protected]>
Signed-off-by: Christian Gromm <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Function most_submit_mbo() causes an exception only if either the pointer
mbo or mbo->context equals NULL. From the underlying architecture's point
of view both cases must _not_ come true and would happen only, if something
has tampered with the pointers. This would render runtime code unable to
recover anyway. So, instead trying to hide that things are already
critically out of control we're better off with a WARN_ON() assertion.
This patch replaces the return type of the function most_submit_mbo() with
'void' and adds a WARN_ONCE() assertion. Additionally, code calling the
function is adapted accordingly.
Signed-off-by: Christian Gromm <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch fixes a checkpatch warning in
a block comment by adapting it to the community
preferred coding style.
Signed-off-by: Juliana Rodrigues <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch fixes a checkpatch warning by moving
arguments to the right and aligning them to their open
parenthesis.
Signed-off-by: Juliana Rodrigues <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch fixes a checkpatch warning by moving
arguments to the right and aligning them to the open
parenthesis above.
Signed-off-by: Juliana Rodrigues <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Moved trailing */ to a new line and added * to subsequent lines on a
block comment.
Signed-off-by: Juliana Rodrigues <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
CONFIG_MEDIA is not a thing, but CONFIG_MEDIA_SUPPORT is, so use that.
Reported-by: Valentin Rothberg <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The inline ULTRA_CHANNELCLI_STRING is not being used so remove it.
Signed-off-by: David Kershner <[email protected]>
Reviewed-by: Tim Sell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The function spar_channel_client_release_os is not being
used so remove it.
Signed-off-by: David Kershner <[email protected]>
Reviewed-by: Tim Sell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The function spar_channel_client_acquire_os is not being used so
remove it.
Signed-off-by: David Kershner <[email protected]>
Reviewed-by: Tim Sell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The function pathname_last_n_nodes is not used, get rid of it.
Signed-off-by: David Kershner <[email protected]>
Reviewed-by: Tim Sell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Add Viresh Kumar as Maintainer of some of the Greybus protocol drivers.
Signed-off-by: Viresh Kumar <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Removes unnecessary space after a cast. Issue found by checkpatch.
Signed-off-by: Rehas Sachdeva <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Replaces position of constant from left to right side of a comparison.
Additionally, modifies logical continuations to be on the previous line and
fixes alignment to match open parenthesis. Issues found by checkpatch.
Signed-off-by: Rehas Sachdeva <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Adds spaces on either side of arithmetic and relational operators like
'-', '<' and '*'. Issue found by checkpatch.
Signed-off-by: Rehas Sachdeva <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Removes unnecessary parentheses from an expression of the form &(x).
Issue found by checkpatch.
Signed-off-by: Rehas Sachdeva <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>