Re: [PATCH] teach checkpatch.pl about list_for_each

From: Valdis . Kletnieks
Date: Sun Dec 02 2007 - 14:48:10 EST


On Sun, 02 Dec 2007 13:03:35 +0100, Christer Weinigel said:

> WARNING: no space between function name and open parenthesis '('
> #520: FILE: drivers/spi/spi_s3c24xx_dma.c:478:
> + list_for_each_entry (transfer, &message->transfers, transfer_list) {
>
> which I think is a bit bogus since it actually is a for statement in
> disguise.

That's how it's *implemented*. I obviously studied too much Lisp as an
undergrad, I keep thinking of list_for_* helpers as functions that take a
lambda-expression as input. In which case, it's a function and no blank is used.

:)

Attachment: pgp00000.pgp
Description: PGP signature