Search Linux Wireless

Re: [PATCH v2 06/13] wifi: mac80211: rework RX timestamp flags

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

 



On Tue, 2023-12-19 at 14:41 -0800, Jeff Johnson wrote:
> 
> >  static inline bool
> >  ieee80211_have_rx_timestamp(struct ieee80211_rx_status *status)
> >  {
> > -	WARN_ON_ONCE(status->flag & RX_FLAG_MACTIME_START &&
> > -		     status->flag & RX_FLAG_MACTIME_END);
> > -	return !!(status->flag & (RX_FLAG_MACTIME_START | RX_FLAG_MACTIME_END |
> > -				  RX_FLAG_MACTIME_PLCP_START));
> > +	return status->flag & RX_FLAG_MACTIME;
> 
> curious why you dropped the !!

Just a general cleanup I guess.

> now the code can return a value that doesn't map to the true/false bool
> enums

No, it cannot, at least not if 'bool' is implemented in a C99-compliant
way :) It's not actually an enum, it will return 0/1 in the machine
register even with this code.

johannes





[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux