提交 308c32f9 编写于 作者: J Jiayi Ye 提交者: Greg Kroah-Hartman

staging: dgnc: delete successive assignments to the same location

Successive assignments to the same location is meaningless and can be
deleted. The Coccinelle semantic patch was used to find cases.

@@
expression e1,e2,e3;
@@

(
 (<+...e1++...+>)=e2;
|
 (<+...e1--...+>)=e2;
|
 (<+...++e1...+>)=e2;
|
 (<+...--e1...+>)=e2;
|
e1=e2;
e1 = <+...e1...+>;
|
*e1=e2;
*e1=e3;
)
Signed-off-by: NJiayi Ye <yejiayily@gmail.com>
Reviewed-by: NJosh Triplett <josh@joshtriplett.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 f474f5e5
...@@ -2205,8 +2205,6 @@ static int dgnc_set_modem_info(struct tty_struct *tty, unsigned int command, uns ...@@ -2205,8 +2205,6 @@ static int dgnc_set_modem_info(struct tty_struct *tty, unsigned int command, uns
if (!bd || bd->magic != DGNC_BOARD_MAGIC) if (!bd || bd->magic != DGNC_BOARD_MAGIC)
return ret; return ret;
ret = 0;
ret = get_user(arg, value); ret = get_user(arg, value);
if (ret) if (ret)
return ret; return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册