Re: [PATCH v3] m68k/amiga - Amiga Zorro NCR53C9x boards: new zorro_esp.c

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

 



On Wed, 14 Mar 2018, Michael Schmitz wrote:

> > 
> > Please pass "addr" and "fifo" as macro parameters, too, so it's easier 
> > for the reviewer to notice they are used.
> 
> Yes, I can do that (meaning Finn would need to make the same change to 
> keep our versions in sync).

Personally, I wouldn't want to change it. This wasn't an oversight. Maybe 
if you (Geert) take a look at MAC_ESP_PDMA_LOOP, etc. this style might 
make more sense.

These are not macros in a header file that might get used in any random 
scope. There is exactly one scope in which the macro appears, and the 
variables that appear in the macro are simply the variables from that 
scope.

If you apply the rule, "the macro's parameters should exhaustively list 
all the macro's symbols", then (in this case) you'd violate the rule 
"Don't Repeat Yourself". And if you'd adhere to the latter rule then you'd 
violate the former. So I chose the more readable option.

The preprocessor allows us to pretend we are doing symbolic code 
transformation, but that's not needed here. This was meant to be a textual 
device.

-- 



[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