mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@kernel.org>
To: CGEL <cgel.zte@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org,
	Luo penghao <luo.penghao@zte.com.cn>,
	Zeal Robot <zealci@zte.com.cn>
Subject: Re: [PATCH linux-next] serial: drop unneeded assignment
Date: Mon, 23 Aug 2021 12:40:30 +0200	[thread overview]
Message-ID: <16e64194-452f-bac8-c535-df9dd65048c7@kernel.org> (raw)
In-Reply-To: <20210821021727.27170-1-luo.penghao@zte.com.cn>

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

      parent reply	other threads:[~2021-08-23 10:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-21  2:17 CGEL
2021-08-21  5:04 ` Christophe JAILLET
2021-08-23 10:36   ` Jiri Slaby
2021-08-23 10:40 ` Jiri Slaby [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16e64194-452f-bac8-c535-df9dd65048c7@kernel.org \
    --to=jirislaby@kernel.org \
    --cc=cgel.zte@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luo.penghao@zte.com.cn \
    --cc=zealci@zte.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®