Messages in this thread |  | | | Date | Mon, 9 Jul 2012 15:23:16 -0700 (PDT) | | From | David Rientjes <> | | Subject | Re: + checkpatch-add-check-for-use-of-sizeof-without-parenthesis.patch added to -mm tree |
| |
On Mon, 9 Jul 2012, akpm@linux-foundation.org wrote:
> From: Joe Perches <joe@perches.com> > Subject: checkpatch: Add acheck for use of sizeof without parenthesis > > Kernel style uses parenthesis around sizeof. >
Nack, there's a difference between "sizeof *task" and "sizeof(struct task_struct)". The former operates on a unary expression and the latter operates on a type. There are over 1000 occurrences in the kernel where the sizeof operator, the former, is used on a unary expression.
|  |