lkml.org 
[lkml]   [2021]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH linux-next] serial: drop unneeded assignment
From
Date
One more hint:
$ git log --oneline drivers/tty/nozomi.c|grep -i serial
<empty>

Please use some of already used "tty: nozomi:", "tty/nozomi:", or "tty:
nozomi," prefixes for the subject.

On 21. 08. 21, 4:17, CGEL wrote:
> From: Luo penghao <luo.penghao@zte.com.cn>
>
> The first assignment is not used. In order to keep the code style
> consistency of the whole file, the first 'offset' assignment should be
> deleted.
>
> The clang_analyzer complains as follows:
>
> drivers/tty/nozomi.c:520:6: warning:
> Although the value storedto 'offset' is used in the enclosing expression,
> the value is never actually read from 'offset'.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Luo penghao <luo.penghao@zte.com.cn>
> ---
> drivers/tty/nozomi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/tty/nozomi.c b/drivers/tty/nozomi.c
> index 0454c78..210a48f 100644
> --- a/drivers/tty/nozomi.c
> +++ b/drivers/tty/nozomi.c
> @@ -517,7 +517,7 @@ static void nozomi_setup_memory(struct nozomi *dc)
>
> /* Ctrl dl configuration */
> dc->port[PORT_CTRL].dl_addr[CH_A] =
> - (offset += dc->config_table.dl_app2_len);
> + (offset + dc->config_table.dl_app2_len);
> dc->port[PORT_CTRL].dl_size[CH_A] =
> dc->config_table.dl_ctrl_len - buff_offset;
>
>


--
js

\
 
 \ /
  Last update: 2021-08-23 12:41    [W:0.158 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site