[PATCH] aacraid: Add likely() and unlikely() Take 2

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

 



Thanks Arjan for the comments, much appreciated. I have removed the
superfluous braces and limited the usage of the likely and unlikely to
runtime code. Sorry for the delay, took a four day vacation ...

Add some likely() and unlikely() compiler hints in some of the aacraid
hardware interface layers. There should be no operational side effects
resulting from this patch and the changes should be mostly benign on x86
platforms.

ObligatoryDisclaimer: Please accept my condolences regarding Outlook's
handling of patches attachments.

This attached patch is against current scsi-misc-2.6

Signed-off-by: Mark Salyzyn <aacraid@xxxxxxxxxxx>

---

Sincerely -- Mark Salyzyn

> -----Original Message-----
> From: Arjan van de Ven [mailto:arjan@xxxxxxxxxxxxx] 
> Sent: Thursday, March 22, 2007 5:24 AM
> To: Salyzyn, Mark
> Cc: linux-scsi
> Subject: Re: [PATCH] aacraid: Add likely() and unlikely()
> 
> On Wed, 2007-03-21 at 15:43 -0400, Salyzyn, Mark wrote:
> 
> -               if((fibptr->flags & FIB_CONTEXT_FLAG_TIMED_OUT)){
> +               if(unlikely(fibptr->flags &
FIB_CONTEXT_FLAG_TIMED_OUT)){
>                         return -ETIMEDOUT;
>                 } else {
>                         return 0;
> 
> while you're at it, please remove the extra {}'s as well
> 
> (I assume you're aware that likely/unlikely should only be used for
99:1 or higher ratios, this one looks correct for sure)
> 
> Also I suggest you don't add about half of these; they appear init
time only code, at which point adding likely/unlikely is just code noise
that clutters the driver...

Attachment: aacraid_likely_unlikely_2.patch
Description: aacraid_likely_unlikely_2.patch


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux