All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jesse Brandeburg <jesse.brandeburg@intel.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: <netdev@vger.kernel.org>, <alexandr.lobakin@intel.com>
Subject: Re: [PATCH net v1] dim: initialize all struct fields
Date: Fri, 6 May 2022 08:28:39 -0700	[thread overview]
Message-ID: <16988d95-bee6-f4da-fb1b-21c8a498dcd7@intel.com> (raw)
In-Reply-To: <20220505184033.65d7a6e5@kernel.org>

On 5/5/2022 6:40 PM, Jakub Kicinski wrote:

>>   #define NET_DIM_RX_EQE_PROFILES { \
>> -	{1,   NET_DIM_DEFAULT_RX_CQ_MODERATION_PKTS_FROM_EQE}, \
>> -	{8,   NET_DIM_DEFAULT_RX_CQ_MODERATION_PKTS_FROM_EQE}, \
>> -	{64,  NET_DIM_DEFAULT_RX_CQ_MODERATION_PKTS_FROM_EQE}, \
>> -	{128, NET_DIM_DEFAULT_RX_CQ_MODERATION_PKTS_FROM_EQE}, \
>> -	{256, NET_DIM_DEFAULT_RX_CQ_MODERATION_PKTS_FROM_EQE}, \
>> +	DIM_CQ_MODER(1,   NET_DIM_DEFAULT_RX_CQ_PKTS_FROM_EQE, 0, 0), \
>> +	DIM_CQ_MODER(8,   NET_DIM_DEFAULT_RX_CQ_PKTS_FROM_EQE, 0, 0), \
>> +	DIM_CQ_MODER(64,  NET_DIM_DEFAULT_RX_CQ_PKTS_FROM_EQE, 0, 0), \
>> +	DIM_CQ_MODER(128, NET_DIM_DEFAULT_RX_CQ_PKTS_FROM_EQE, 0, 0), \
>> +	DIM_CQ_MODER(256, NET_DIM_DEFAULT_RX_CQ_PKTS_FROM_EQE, 0, 0)  \
>>   }
> 
> That may give people the false impression that we always have
> to initialize all the fields to appease W=2. The most common
> way of fixing this warning is to tell the compiler that we know
> what we're doing and add a comma after the last member:
> 
> -	{2,  256},             \
> +	{2,  256,},             \
> 
> The commit message needs to at least discuss why this direction
> was not taken. My preference would actually be to do it, tho.

Ok, I'll make that change, thanks for the feedback.

> 
> Also please CC maintainers and authors of patches under Fixes:.

Yeah, my mistake and I'll fix that on the v2!

Jesse

      reply	other threads:[~2022-05-06 15:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-04 18:58 [PATCH net v1] dim: initialize all struct fields Jesse Brandeburg
2022-05-06  1:40 ` Jakub Kicinski
2022-05-06 15:28   ` Jesse Brandeburg [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=16988d95-bee6-f4da-fb1b-21c8a498dcd7@intel.com \
    --to=jesse.brandeburg@intel.com \
    --cc=alexandr.lobakin@intel.com \
    --cc=kuba@kernel.org \
    --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 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.