Re: [PATCH net-next 2/3] eth: fbnic: hwmon: Add support for reading temperature and voltage sensors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.




[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux