From: David Miller <davem@davemloft.net>
To: dan.carpenter@oracle.com
Cc: samuel@sortiz.org, netdev@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH net] mcs7780: Silence uninitialized variable warning
Date: Mon, 31 Jul 2017 10:37:16 -0700 (PDT) [thread overview]
Message-ID: <20170731.103716.2203333144439591434.davem@davemloft.net> (raw)
In-Reply-To: <20170731070925.ztlfbyd7pvoz46wh@mwanda>
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Mon, 31 Jul 2017 10:41:40 +0300
> On Sat, Jul 29, 2017 at 11:28:55PM -0700, David Miller wrote:
>> From: Dan Carpenter <dan.carpenter@oracle.com>
>> Date: Fri, 28 Jul 2017 17:45:11 +0300
>>
>> > - __u16 rval;
>> > + __u16 rval = -1;
>>
>> Fixing a bogus warning by assigning a signed constant to an
>> unsigned variable doesn't really make me all that happy.
>>
>> I don't think I'll apply this, sorry.
>
> There's no guarantee that small kmallocs will always succeed in future
> kernels so it's not *totally* bogus.
Perhaps the burdon of initializing the value belongs in
mcs_get_reg(), and you can set it properly to 0xffff
instead of -1.
Ok?
next prev parent reply other threads:[~2017-07-31 17:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-28 14:45 [PATCH net] mcs7780: Silence uninitialized variable warning Dan Carpenter
2017-07-30 6:28 ` David Miller
2017-07-31 7:41 ` Dan Carpenter
2017-07-31 17:37 ` David Miller [this message]
2017-08-01 10:45 ` Dan Carpenter
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=20170731.103716.2203333144439591434.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=samuel@sortiz.org \
/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;
as well as URLs for NNTP newsgroup(s).