Re: [PATCH 5/11v2] ata: replace macro with static inline in libata.h

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

 



> > NAK. This is a sparse bug, fix sparse.
> 
> Yes, fair enough, but that's not all the patch is about.
> 
> 1) it's using a max_t and min_t to force the comparisons as shorts, why
> not just make it a static inline?

Because max_t and min_t also force the comparsion types

> 2) the static inline is a little clearer about the intent here.

Why ?

> 3) the sparse warnings are entirely secondary (and technically correct
> when the macros expand, __x is shadowed)

In a controlled manner. I guess you could make min and max use __x and __y

> 4) I may be mistaken, but I thought then when something can be written
> as a static inline instead of a macro it was preferred. At least I've
> seen akpm say so, but I'll let him speak for himself (added to CC:)

gcc still sometimes seems to optimise macros better than inlines.

Alan
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux