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.

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



[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux