Re: [PATCH][RFC] Removing wrong judgement of checkpatch.pl forreturn as function

From: Andy Whitcroft
Date: Fri Nov 06 2009 - 17:28:50 EST


On Tue, Nov 03, 2009 at 10:49:32AM +0900, Hitoshi Mitake wrote:
>
> Hi,
>
> I found a strange behaviour of checkpatch.pl.
>
> The C statement:
> return (type)value;
> is regarded as return like a function form by checkpatch.pl.
> So checkpatch.pl causes "Return is not a function." error
> when processing statements like this.
>
> I think statements like above are innocence. These are only doing type cast.
> This patch removes the behaviour of checkpatch.pl.
>
> But I don't have confidence about coding style of Linux kernel.
> Is my thought correct? Or the behaviour of current checkpatch.pl is correct?
> Request for comment.

Do you have a patch example which triggers this? If I test the current
version with this specific fragment I do not get a report. This one
collapses to '1value' which means it shouldn't trigger the report.

If you do have a specific patch which triggered this could you email it
over, also could you confirm the version of checkpatch which shows this
with checkpatch -v.

Thanks.

-apw
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/