mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-27 04:22:58 +00:00
tools: ynl-gen: change spacing around __attribute__
checkpatch gets confused and treats __attribute__ as a function call.
It complains about white space before "(":
WARNING:SPACING: space prohibited between function name and open parenthesis '('
+ struct netdev_queue_get_rsp obj __attribute__ ((aligned (8)));
No spaces wins in the kernel:
$ git grep 'attribute__((.*aligned(' | wc -l
480
$ git grep 'attribute__ ((.*aligned (' | wc -l
110
$ git grep 'attribute__ ((.*aligned(' | wc -l
94
$ git grep 'attribute__((.*aligned (' | wc -l
63
So, whatever, change the codegen.
Note that checkpatch also thinks we should use __aligned(),
but this is user space code.
Link: https://lore.kernel.org/all/202310190900.9Dzgkbev-lkp@intel.com/
Acked-by: Stanislav Fomichev <sdf@google.com>
Reviewed-by: Amritha Nambiar <amritha.nambiar@intel.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Link: https://lore.kernel.org/r/20231020221827.3436697-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
@@ -157,7 +157,7 @@ struct ynl_parse_arg {
|
||||
|
||||
struct ynl_dump_list_type {
|
||||
struct ynl_dump_list_type *next;
|
||||
unsigned char data[] __attribute__ ((aligned (8)));
|
||||
unsigned char data[] __attribute__((aligned(8)));
|
||||
};
|
||||
extern struct ynl_dump_list_type *YNL_LIST_END;
|
||||
|
||||
@@ -187,7 +187,7 @@ struct ynl_ntf_base_type {
|
||||
__u8 cmd;
|
||||
struct ynl_ntf_base_type *next;
|
||||
void (*free)(struct ynl_ntf_base_type *ntf);
|
||||
unsigned char data[] __attribute__ ((aligned (8)));
|
||||
unsigned char data[] __attribute__((aligned(8)));
|
||||
};
|
||||
|
||||
extern mnl_cb_t ynl_cb_array[NLMSG_MIN_TYPE];
|
||||
|
||||
Reference in New Issue
Block a user