netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Sanman Pradhan <sanman.p211993@gmail.com>,
	netdev@vger.kernel.org, alexanderduyck@fb.com,
	kernel-team@meta.com, andrew+netdev@lunn.ch, davem@davemloft.net,
	edumazet@google.com, pabeni@redhat.com,
	kalesh-anakkur.purayil@broadcom.com, linux@roeck-us.net,
	mohsin.bashr@gmail.com, jdelvare@suse.com, horms@kernel.org,
	suhui@nfschina.com, linux-kernel@vger.kernel.org,
	vadim.fedorenko@linux.dev, linux-hwmon@vger.kernel.org,
	sanmanpradhan@meta.com
Subject: Re: [PATCH net-next 2/3] eth: fbnic: hwmon: Add support for reading temperature and voltage sensors
Date: Mon, 13 Jan 2025 20:00:55 -0800	[thread overview]
Message-ID: <20250113200055.20d9c4f3@kernel.org> (raw)
In-Reply-To: <5252ffe7-56a7-4be7-9fdb-6d0b810ebfb5@lunn.ch>

On Tue, 14 Jan 2025 02:19:08 +0100 Andrew Lunn wrote:
> > @@ -50,6 +50,10 @@ struct fbnic_fw_completion {
> >  	struct kref ref_count;
> >  	int result;
> >  	union {
> > +		struct {
> > +			s32 millivolts;
> > +			s32 millidegrees;
> > +		} tsene;
> >  	} u;
> >  };  
> 
> Why have a union which only has one member?

One member per command, the commit msg on patch 1 mentions:

  The data from the various response types will be added to 
  the "union u" by subsequent commits.

More commands are on the way. It's a coin toss whether it's better to
add the union later or have to re-indent already added structs.

  reply	other threads:[~2025-01-14  4:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-14  0:07 [PATCH net-next 0/3] eth: fbnic: Add hardware monitoring support Sanman Pradhan
2025-01-14  0:07 ` [PATCH net-next 1/3] eth: fbnic: hwmon: Add completion infrastructure for firmware requests Sanman Pradhan
2025-01-14  8:30   ` Michal Swiatkowski
2025-01-14  0:07 ` [PATCH net-next 2/3] eth: fbnic: hwmon: Add support for reading temperature and voltage sensors Sanman Pradhan
2025-01-14  1:19   ` Andrew Lunn
2025-01-14  4:00     ` Jakub Kicinski [this message]
2025-01-14  8:31   ` Michal Swiatkowski
2025-01-14  0:07 ` [PATCH net-next 3/3] eth: fbnic: Add hardware monitoring support via HWMON interface Sanman Pradhan
2025-01-14  8:35   ` Michal Swiatkowski

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=20250113200055.20d9c4f3@kernel.org \
    --to=kuba@kernel.org \
    --cc=alexanderduyck@fb.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jdelvare@suse.com \
    --cc=kalesh-anakkur.purayil@broadcom.com \
    --cc=kernel-team@meta.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=mohsin.bashr@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sanman.p211993@gmail.com \
    --cc=sanmanpradhan@meta.com \
    --cc=suhui@nfschina.com \
    --cc=vadim.fedorenko@linux.dev \
    /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).