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] [day] [month] [year] [list]
Date:	Fri, 28 Jul 2006 23:43:51 -0700 (PDT)
From:	Alex Dubov <oakad@...oo.com>
To:	Mikael Pettersson <mikpe@...uu.se>
Cc:	linux-kernel@...r.kernel.org, pazke@...pac.ru
Subject: Re: Support for TI FlashMedia (pci id 104c:8033, 104c:803b) flash card readers

No optimization. I just thought both 0xffffffff and -1
are ugly.

--- Mikael Pettersson <mikpe@...uu.se> wrote:

> On Fri, 28 Jul 2006 06:02:11 -0700 (PDT), Alex Dubov
> wrote:
> >The exact condition is (irq_status!=0 &&
> >irq_status!=0xffffffff). I think it is not any
> better
> >that what I have.
> >
> >--- Andrey Panin <pazke@...pac.ru> wrote:
> >
> >> On 208, 07 27, 2006 at 08:34:06PM -0700, Alex
> Dubov
> >> wrote:
> >> 
> >> What this strange line (in tifm_7xx1_isr
> function)
> >> is supposed to do:
> >> 
> >>         if(irq_status && (~irq_status))
> 
> If you're chasing micro-optimisations, you could
> write
> 
>     /* if irq_status is not 0 or ~0, do <blah> */
>     if (((unsigned)irq_status + 1) >= 2)
> 
> which should reduce the number of conditional
> branches
> to a single one. (And drop the cast if irq_status is
> declared as unsigned.)
> 
> But for long-term maintenance just spelling out the
> exact
> condition (irq_status != 0 && irq_status != ~0) is
> preferable.
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ