From: David Miller <davem@davemloft.net>
To: arnd@arndb.de
Cc: borisp@mellanox.com, aviadye@mellanox.com,
john.fastabend@gmail.com, daniel@iogearbox.net, kuba@kernel.org,
jakub@cloudflare.com, dirk.vandermerwe@netronome.com,
simon.horman@netronome.com, dcaratti@redhat.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net/tls: fix const assignment warning
Date: Wed, 08 Apr 2020 14:34:39 -0700 (PDT) [thread overview]
Message-ID: <20200408.143439.2032281152789533700.davem@davemloft.net> (raw)
In-Reply-To: <20200408185452.279040-1-arnd@arndb.de>
From: Arnd Bergmann <arnd@arndb.de>
Date: Wed, 8 Apr 2020 20:54:43 +0200
> Building with some experimental patches, I came across a warning
> in the tls code:
>
> include/linux/compiler.h:215:30: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
> 215 | *(volatile typeof(x) *)&(x) = (val); \
> | ^
> net/tls/tls_main.c:650:4: note: in expansion of macro 'smp_store_release'
> 650 | smp_store_release(&saved_tcpv4_prot, prot);
>
> This appears to be a legitimate warning about assigning a const pointer
> into the non-const 'saved_tcpv4_prot' global. Annotate both the ipv4 and
> ipv6 pointers 'const' to make the code internally consistent.
>
> Fixes: 5bb4c45d466c ("net/tls: Read sk_prot once when building tls proto ops")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Applied, thanks.
prev parent reply other threads:[~2020-04-08 21:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-08 18:54 [PATCH] net/tls: fix const assignment warning Arnd Bergmann
2020-04-08 18:59 ` Boris Pismenny
2020-04-08 21:34 ` David Miller [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=20200408.143439.2032281152789533700.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=arnd@arndb.de \
--cc=aviadye@mellanox.com \
--cc=borisp@mellanox.com \
--cc=daniel@iogearbox.net \
--cc=dcaratti@redhat.com \
--cc=dirk.vandermerwe@netronome.com \
--cc=jakub@cloudflare.com \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=simon.horman@netronome.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;
as well as URLs for NNTP newsgroup(s).