From: "Agroskin, Shay" <shayagr@amazon.com>
To: Gavin Shan <gshan@redhat.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Belgazal, Netanel" <netanel@amazon.com>,
"Kiyanovski, Arthur" <akiyano@amazon.com>,
"Tzalik, Guy" <gtzalik@amazon.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"shan.gavin@gmail.com" <shan.gavin@gmail.com>,
"agrosshay@gmail.com" <agrosshay@gmail.com>
Subject: Re: [PATCH v2] net/ena: Fix build warning in ena_xdp_set()
Date: Tue, 28 Apr 2020 14:55:40 +0000 [thread overview]
Message-ID: <87r1w7fymt.fsf@amazon.com> (raw)
In-Reply-To: <20200428044945.123511-1-gshan@redhat.com>
Gavin Shan <gshan@redhat.com> writes:
> This fixes the following build warning in ena_xdp_set(), which is
> observed on aarch64 with 64KB page size.
>
> In file included from ./include/net/inet_sock.h:19,
> from ./include/net/ip.h:27,
> from drivers/net/ethernet/amazon/ena/ena_netdev.c:46:
> drivers/net/ethernet/amazon/ena/ena_netdev.c: In function \
> ‘ena_xdp_set’: \
> drivers/net/ethernet/amazon/ena/ena_netdev.c:557:6: warning: \
> format ‘%lu’ \
> expects argument of type ‘long unsigned int’, but argument 4 \
> has type ‘int’ \
> [-Wformat=] "Failed to set xdp program, the current MTU (%d) is \
> larger than the maximum allowed MTU (%lu) while xdp is on",
>
> Signed-off-by: Gavin Shan <gshan@redhat.com>
> ---
> v2: Make ENA_PAGE_SIZE to be "unsigned long" and verify on aarch64
> with 4KB or 64KB page size configuration
> ---
> drivers/net/ethernet/amazon/ena/ena_netdev.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.h b/drivers/net/ethernet/amazon/ena/ena_netdev.h
> index 97dfd0c67e84..9e1860d81908 100644
> --- a/drivers/net/ethernet/amazon/ena/ena_netdev.h
> +++ b/drivers/net/ethernet/amazon/ena/ena_netdev.h
> @@ -69,7 +69,7 @@
> * 16kB.
> */
> #if PAGE_SIZE > SZ_16K
> -#define ENA_PAGE_SIZE SZ_16K
> +#define ENA_PAGE_SIZE (_AC(SZ_16K, UL))
> #else
> #define ENA_PAGE_SIZE PAGE_SIZE
> #endif
thanks for this fix
Acked-by: Shay Agroskin <shayagr@amazon.com>
next prev parent reply other threads:[~2020-04-28 14:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-28 4:49 [PATCH v2] net/ena: Fix build warning in ena_xdp_set() Gavin Shan
2020-04-28 14:55 ` Agroskin, Shay [this message]
2020-04-28 20:58 ` David Miller
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=87r1w7fymt.fsf@amazon.com \
--to=shayagr@amazon.com \
--cc=agrosshay@gmail.com \
--cc=akiyano@amazon.com \
--cc=davem@davemloft.net \
--cc=gshan@redhat.com \
--cc=gtzalik@amazon.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netanel@amazon.com \
--cc=netdev@vger.kernel.org \
--cc=shan.gavin@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;
as well as URLs for NNTP newsgroup(s).