Project

General

Profile

Actions

Feature #3247

open

128: EXPORT* macro should follow immediately after the closing function brace line

Added by Denis Efremov over 12 years ago. Updated over 12 years ago.

Status:
New
Priority:
Normal
Assignee:
Start date:
07/20/2012
Due date:
% Done:

0%

Estimated time:
Published in build:

Description

From documentation: (http://lxr.linux.no/#linux+v3.4.6/Documentation/CodingStyle)
If the function is exported, the EXPORT* macro for it should follow immediately after the closing function brace line. E.g.:

int system_is_up(void) {
return system_state == SYSTEM_RUNNING;
}
EXPORT_SYMBOL(system_is_up);

I have detected about 1500 violations of this rule(except for "}\n\nEXPORT"). It is possible to automatically relocate EXPORT* macros.

Actions #1

Updated by Evgeny Novikov over 12 years ago

Can you find an example when somebody fixed this issue?

Actions #3

Updated by Evgeny Novikov over 12 years ago

Thank you. Developers have to follow the coding style (otherwise, why is it necessary?). So, I guess that we have to inform kernel developers about these mistakes. But, IMHO, this shouldn't be associated with LDV: although finding ~100 new bugs is rather attractive for any verification project, these "bugs" cannot be considered as other ones.

Actions

Also available in: Atom PDF