Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1298816
| From | Joe Perches <joe@perches.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] /drivers/net/wireless/ath/ath9k remove unnecessary ?: operator |
| Date | 2015-12-29 01:40 +0100 |
| Message-ID | <qKQut-1c8-11@gated-at.bofh.it> (permalink) |
| References | <qKGls-2JC-23@gated-at.bofh.it> <qKKfp-5mY-3@gated-at.bofh.it> <qKKS6-5Vk-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, 2015-12-29 at 01:38 +0700, Ivan Safonov wrote:
> On 12/29/2015 12:56 AM, Joe Perches wrote:
> > On Mon, 2015-12-28 at 20:48 +0700, Ivan Safonov wrote:
> > > ((thermometer < 0) ? 0 : (thermometer == X)) and (thermometer ==
> > > X) are equal for X >= 0.
> > X is not guaranteed to be >= 0 here
>
> X is fixed constant. In this case X is {0, 1, 2}.
Looks like it can be -1 to me (range: -1, 0, 1, 2)
static int ar9003_hw_get_thermometer(struct ath_hw *ah)
{
struct ar9300_eeprom *eep = &ah->eeprom.ar9300_eep;
struct ar9300_base_eep_hdr *pBase = &eep->baseEepHeader;
int thermometer = (pBase->miscConfiguration >> 1) & 0x3;
return --thermometer;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] /drivers/net/wireless/ath/ath9k remove unnecessary ?: operator Ivan Safonov <insafonov@gmail.com> - 2015-12-28 14:50 +0100
Re: [PATCH] /drivers/net/wireless/ath/ath9k remove unnecessary ?: operator Joe Perches <joe@perches.com> - 2015-12-28 19:00 +0100
Re: [PATCH] /drivers/net/wireless/ath/ath9k remove unnecessary ?: operator Ivan Safonov <insafonov@gmail.com> - 2015-12-28 19:40 +0100
Re: [PATCH] /drivers/net/wireless/ath/ath9k remove unnecessary ?: operator Joe Perches <joe@perches.com> - 2015-12-29 01:40 +0100
Re: [PATCH] /drivers/net/wireless/ath/ath9k remove unnecessary ?: operator Ivan Safonov <insafonov@gmail.com> - 2015-12-29 05:10 +0100
csiph-web