checkpatch.pl report about "Missing blank line after declarations" in a structure definition
From: Dotan Barak
Date: Mon Aug 04 2014 - 07:20:51 EST
Hi Joe.
Thanks for fixing the issue that I reported about.
It seems that even after your fix, there is still a false warning of "Missing blank line after declarations".
I executed checkpatch.pl on a header file that exists in the Linux tree:
# ./checkpatch.pl --file --no-tree ../include/linux/mlx5/cq.h
And got the following warning:
WARNING: Missing a blank line after declarations
#49: FILE: ../include/linux/mlx5/cq.h:49:
+ int irqn;
+ void (*comp) (struct mlx5_core_cq *);
Here is the structure that checkpatch.pl is complaining about:
<snip start>
struct mlx5_core_cq {
u32 cqn;
int cqe_sz;
__be32 *set_ci_db;
__be32 *arm_db;
atomic_t refcount;
struct completion free;
unsigned vector;
int irqn;
void (*comp) (struct mlx5_core_cq *);
void (*event) (struct mlx5_core_cq *, enum mlx5_event);
struct mlx5_uar *uar;
u32 cons_index;
unsigned arm_sn;
struct mlx5_rsc_debug *dbg;
int pid;
};
<snip end>
As you can see, this is a structure definition and IMHO the warning above is false.
Thanks!
Dotan Barak
Sr. Staff Engineer, Windows verification
Mellanox Technologies
Beit Mellanox
Yokneam, 20692
Office: +972-74-7236271
Fax: +972-4-9593245
www.mellanox.com
--
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/