lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250113200055.20d9c4f3@kernel.org>
Date: Mon, 13 Jan 2025 20:00:55 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Andrew Lunn <andrew@...n.ch>
Cc: Sanman Pradhan <sanman.p211993@...il.com>, netdev@...r.kernel.org,
 alexanderduyck@...com, kernel-team@...a.com, andrew+netdev@...n.ch,
 davem@...emloft.net, edumazet@...gle.com, pabeni@...hat.com,
 kalesh-anakkur.purayil@...adcom.com, linux@...ck-us.net,
 mohsin.bashr@...il.com, jdelvare@...e.com, horms@...nel.org,
 suhui@...china.com, linux-kernel@...r.kernel.org,
 vadim.fedorenko@...ux.dev, linux-hwmon@...r.kernel.org,
 sanmanpradhan@...a.com
Subject: Re: [PATCH net-next 2/3] eth: fbnic: hwmon: Add support for reading
 temperature and voltage sensors

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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ