lkml.org 
[lkml]   [2010]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectBug in checkpatch.pl
From
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 ++.


\
 
 \ /
  Last update: 2010-11-02 23:59    [W:0.597 / U:1.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site