From: Ying Xue <ying.xue@windriver.com>
To: David Miller <davem@davemloft.net>
Cc: <steffen.klassert@secunet.com>, <dborkman@redhat.com>,
<netdev@vger.kernel.org>
Subject: Re: [PATCH net-next] net: xfrm6: silence sparse warning
Date: Wed, 8 Jan 2014 13:55:09 +0800 [thread overview]
Message-ID: <52CCE83D.5080909@windriver.com> (raw)
In-Reply-To: <20140107.224357.1577838150943921013.davem@davemloft.net>
On 01/08/2014 11:43 AM, David Miller wrote:
> From: Ying Xue <ying.xue@windriver.com>
> Date: Wed, 8 Jan 2014 10:56:40 +0800
>
>> Fix below sparse warning:
>>
>> net/ipv6/xfrm6_state.c:66:26: error: cannot size expression
> ...
>> - memset(count, 0, sizeof(count));
>> + memset(count, 0, sizeof(int) * maxclass);
>
> I think the fix belongs in sparse, making it respect these two expressions
> as equivalent.
>
>
Yes, you are right. Actually the fix just eliminates one 'error' warning
complained from sparse, instead its complete sparse warnings like:
CHECK net/ipv6/xfrm6_state.c
net/ipv6/xfrm6_state.c:64:19: warning: Variable length array is used.
net/ipv6/xfrm6_state.c:66:26: error: cannot size expression
But the first warning(ie, warning: Variable length array is used) to be
fixed needs a big change made, so I think it seems unnecessary.
Therefore, I just fix the latter in the patch.
Which action below should I take in next step?
1. I just update the fix commit description as below:
-----
Fix below sparse error:
CHECK net/ipv6/xfrm6_state.c
net/ipv6/xfrm6_state.c:66:26: error: cannot size expression
-----
2. Fix the former warning as well in the patch by changing the
allocation of count[] array from static mode to dynamical.
3. Just drop the patch
Please tell me.
Thanks,
Ying
next prev parent reply other threads:[~2014-01-08 5:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-08 2:56 [PATCH net-next] net: xfrm6: silence sparse warning Ying Xue
2014-01-08 3:43 ` David Miller
2014-01-08 5:55 ` Ying Xue [this message]
2014-01-08 5:56 ` David Miller
2014-01-09 23:04 ` Stephen Hemminger
2014-01-10 2:53 ` Ben Hutchings
2014-01-10 5:30 ` Stephen Hemminger
2014-01-08 20:46 ` Ben Hutchings
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=52CCE83D.5080909@windriver.com \
--to=ying.xue@windriver.com \
--cc=davem@davemloft.net \
--cc=dborkman@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=steffen.klassert@secunet.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.