From: patchwork-bot+netdevbpf@kernel.org
To: Arnd Bergmann <arnd@kernel.org>
Cc: luobin9@huawei.com, davem@davemloft.net, kuba@kernel.org,
arnd@arndb.de, linux@rasmusvillemoes.dk, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [v2] hinic: avoid gcc -Wrestrict warning
Date: Thu, 25 Mar 2021 01:10:08 +0000 [thread overview]
Message-ID: <161663460832.25289.5484476322844888981.git-patchwork-notify@kernel.org> (raw)
In-Reply-To: <20210324130731.1513798-1-arnd@kernel.org>
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
On Wed, 24 Mar 2021 14:07:22 +0100 you wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> With extra warnings enabled, gcc complains that snprintf should not
> take the same buffer as source and destination:
>
> drivers/net/ethernet/huawei/hinic/hinic_ethtool.c: In function 'hinic_set_settings_to_hw':
> drivers/net/ethernet/huawei/hinic/hinic_ethtool.c:480:9: error: 'snprintf' argument 4 overlaps destination object 'set_link_str' [-Werror=restrict]
> 480 | err = snprintf(set_link_str, SET_LINK_STR_MAX_LEN,
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 481 | "%sspeed %d ", set_link_str, speed);
> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/net/ethernet/huawei/hinic/hinic_ethtool.c:464:7: note: destination object referenced by 'restrict'-qualified argument 1 was declared here
> 464 | char set_link_str[SET_LINK_STR_MAX_LEN] = {0};
>
> [...]
Here is the summary with links:
- [v2] hinic: avoid gcc -Wrestrict warning
https://git.kernel.org/netdev/net-next/c/84c7f6c33f42
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
prev parent reply other threads:[~2021-03-25 1:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-24 13:07 [PATCH] [v2] hinic: avoid gcc -Wrestrict warning Arnd Bergmann
2021-03-24 13:29 ` Rasmus Villemoes
2021-03-24 14:25 ` Arnd Bergmann
2021-03-25 1:10 ` patchwork-bot+netdevbpf [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=161663460832.25289.5484476322844888981.git-patchwork-notify@kernel.org \
--to=patchwork-bot+netdevbpf@kernel.org \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=luobin9@huawei.com \
--cc=netdev@vger.kernel.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).