From: Alexander Lobakin <aleksander.lobakin@intel.com>
To: Colin Ian King <colin.i.king@gmail.com>
Cc: Tony Nguyen <anthony.l.nguyen@intel.com>,
Przemek Kitszel <przemyslaw.kitszel@intel.com>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
<intel-wired-lan@lists.osuosl.org>, <netdev@vger.kernel.org>,
<kernel-janitors@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [Intel-wired-lan] [PATCH][next] idpf: make read-only arrays tx_itr and rx_itr static const
Date: Fri, 23 Aug 2024 14:39:36 +0200 [thread overview]
Message-ID: <fa366511-e246-4e6c-9e8d-e539802e49ef@intel.com> (raw)
In-Reply-To: <20240822213410.644665-1-colin.i.king@gmail.com>
From: Colin Ian King <colin.i.king@gmail.com>
Date: Thu, 22 Aug 2024 22:34:10 +0100
> Don't populate the read-only arrays tx_itr and rx_itr on the stack at
> run time, instead make them static const.
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
> drivers/net/ethernet/intel/idpf/idpf_virtchnl.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c b/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c
> index 70986e12da28..d50e5cab05fc 100644
> --- a/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c
> +++ b/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c
> @@ -3149,8 +3149,8 @@ void idpf_vport_init(struct idpf_vport *vport, struct idpf_vport_max_q *max_q)
> struct idpf_adapter *adapter = vport->adapter;
> struct virtchnl2_create_vport *vport_msg;
> struct idpf_vport_config *vport_config;
> - u16 tx_itr[] = {2, 8, 64, 128, 256};
> - u16 rx_itr[] = {2, 8, 32, 96, 128};
> + static const u16 tx_itr[] = {2, 8, 64, 128, 256};
> + static const u16 rx_itr[] = {2, 8, 32, 96, 128};
Move it to the top of the function to keep the RCT style?
> struct idpf_rss_data *rss_data;
> u16 idx = vport->idx;
Thanks,
Olek
prev parent reply other threads:[~2024-08-23 12:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-22 21:34 [PATCH][next] idpf: make read-only arrays tx_itr and rx_itr static const Colin Ian King
2024-08-23 12:39 ` Alexander Lobakin [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=fa366511-e246-4e6c-9e8d-e539802e49ef@intel.com \
--to=aleksander.lobakin@intel.com \
--cc=anthony.l.nguyen@intel.com \
--cc=colin.i.king@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.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).