From: Colin Ian King <colin.king@canonical.com>
To: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Cc: Vlad Yasevich <vyasevich@gmail.com>,
Neil Horman <nhorman@tuxdriver.com>,
"David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
linux-sctp@vger.kernel.org, netdev@vger.kernel.org,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sctp: remove redundant initialization of variable status
Date: Fri, 24 Jul 2020 13:56:04 +0100 [thread overview]
Message-ID: <ff52bd0f-ff45-477d-4a66-8f8e98328122@canonical.com> (raw)
In-Reply-To: <20200724125514.GD3399@localhost.localdomain>
On 24/07/2020 13:55, Marcelo Ricardo Leitner wrote:
> On Fri, Jul 24, 2020 at 01:17:53PM +0100, Colin King wrote:
>> From: Colin Ian King <colin.king@canonical.com>
>>
>> The variable status is being initialized with a value that is never read
>> and it is being updated later with a new value. The initialization is
>> redundant and can be removed.
>>
>> Addresses-Coverity: ("Unused value")
>> Signed-off-by: Colin Ian King <colin.king@canonical.com>
>
> Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
>
> Are you willing to send another to patch to fix the var ordering in
> reverse christmass tree in there?
Sure, I'll send a V2 to re-order the vars.
>
>> ---
>> net/sctp/protocol.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
>> index 7ecaf7d575c0..a0448f7c64b9 100644
>> --- a/net/sctp/protocol.c
>> +++ b/net/sctp/protocol.c
>> @@ -1368,7 +1368,7 @@ static struct pernet_operations sctp_ctrlsock_ops = {
>> static __init int sctp_init(void)
>> {
>> int i;
>> - int status = -EINVAL;
>> + int status;
>> unsigned long goal;
>> unsigned long limit;
>> unsigned long nr_pages = totalram_pages();
>> --
>> 2.27.0
>>
prev parent reply other threads:[~2020-07-24 12:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-24 12:17 Colin King
2020-07-24 12:55 ` Marcelo Ricardo Leitner
2020-07-24 12:56 ` Colin Ian King [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=ff52bd0f-ff45-477d-4a66-8f8e98328122@canonical.com \
--to=colin.king@canonical.com \
--cc=davem@davemloft.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sctp@vger.kernel.org \
--cc=marcelo.leitner@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
--cc=vyasevich@gmail.com \
/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®