Bug in checkpatch.pl

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Audun Hoem
Date: Tuesday, November 2, 2010 - 3:57 pm

I have stumbled about a bug in checkpatch.pl while working on some
code in drivers/staging. It seems to get confused when confronted with
asterisks. For example, this snippe:

kmalloc(sizeof(struct alphatrack_ocmd) * true_size, GFP_KERNEL);

Here the asterisk is in it's binary form, obviously, and performs a
multiplication, however checkpatch reports this:

drivers/staging/frontier/alphatrack.c:772: ERROR: space prohibited
after that '*' (ctx:WxW)

So it's obviously thinking it's the unary operator, which should only
be preceded by a variable name or another unary operator such as ++.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Bug in checkpatch.pl, Audun Hoem, (Tue Nov 2, 3:57 pm)