Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

+64 -64
+41 -41
tools/net/ynl/generated/ethtool-user.h
··· 347 347 348 348 struct ethtool_strset_get_list { 349 349 struct ethtool_strset_get_list *next; 350 - struct ethtool_strset_get_rsp obj __attribute__ ((aligned (8))); 350 + struct ethtool_strset_get_rsp obj __attribute__((aligned(8))); 351 351 }; 352 352 353 353 void ethtool_strset_get_list_free(struct ethtool_strset_get_list *rsp); ··· 472 472 473 473 struct ethtool_linkinfo_get_list { 474 474 struct ethtool_linkinfo_get_list *next; 475 - struct ethtool_linkinfo_get_rsp obj __attribute__ ((aligned (8))); 475 + struct ethtool_linkinfo_get_rsp obj __attribute__((aligned(8))); 476 476 }; 477 477 478 478 void ethtool_linkinfo_get_list_free(struct ethtool_linkinfo_get_list *rsp); ··· 487 487 __u8 cmd; 488 488 struct ynl_ntf_base_type *next; 489 489 void (*free)(struct ethtool_linkinfo_get_ntf *ntf); 490 - struct ethtool_linkinfo_get_rsp obj __attribute__ ((aligned (8))); 490 + struct ethtool_linkinfo_get_rsp obj __attribute__((aligned(8))); 491 491 }; 492 492 493 493 void ethtool_linkinfo_get_ntf_free(struct ethtool_linkinfo_get_ntf *rsp); ··· 712 712 713 713 struct ethtool_linkmodes_get_list { 714 714 struct ethtool_linkmodes_get_list *next; 715 - struct ethtool_linkmodes_get_rsp obj __attribute__ ((aligned (8))); 715 + struct ethtool_linkmodes_get_rsp obj __attribute__((aligned(8))); 716 716 }; 717 717 718 718 void ethtool_linkmodes_get_list_free(struct ethtool_linkmodes_get_list *rsp); ··· 727 727 __u8 cmd; 728 728 struct ynl_ntf_base_type *next; 729 729 void (*free)(struct ethtool_linkmodes_get_ntf *ntf); 730 - struct ethtool_linkmodes_get_rsp obj __attribute__ ((aligned (8))); 730 + struct ethtool_linkmodes_get_rsp obj __attribute__((aligned(8))); 731 731 }; 732 732 733 733 void ethtool_linkmodes_get_ntf_free(struct ethtool_linkmodes_get_ntf *rsp); ··· 1014 1014 1015 1015 struct ethtool_linkstate_get_list { 1016 1016 struct ethtool_linkstate_get_list *next; 1017 - struct ethtool_linkstate_get_rsp obj __attribute__ ((aligned (8))); 1017 + struct ethtool_linkstate_get_rsp obj __attribute__((aligned(8))); 1018 1018 }; 1019 1019 1020 1020 void ethtool_linkstate_get_list_free(struct ethtool_linkstate_get_list *rsp); ··· 1129 1129 1130 1130 struct ethtool_debug_get_list { 1131 1131 struct ethtool_debug_get_list *next; 1132 - struct ethtool_debug_get_rsp obj __attribute__ ((aligned (8))); 1132 + struct ethtool_debug_get_rsp obj __attribute__((aligned(8))); 1133 1133 }; 1134 1134 1135 1135 void ethtool_debug_get_list_free(struct ethtool_debug_get_list *rsp); ··· 1144 1144 __u8 cmd; 1145 1145 struct ynl_ntf_base_type *next; 1146 1146 void (*free)(struct ethtool_debug_get_ntf *ntf); 1147 - struct ethtool_debug_get_rsp obj __attribute__ ((aligned (8))); 1147 + struct ethtool_debug_get_rsp obj __attribute__((aligned(8))); 1148 1148 }; 1149 1149 1150 1150 void ethtool_debug_get_ntf_free(struct ethtool_debug_get_ntf *rsp); ··· 1330 1330 1331 1331 struct ethtool_wol_get_list { 1332 1332 struct ethtool_wol_get_list *next; 1333 - struct ethtool_wol_get_rsp obj __attribute__ ((aligned (8))); 1333 + struct ethtool_wol_get_rsp obj __attribute__((aligned(8))); 1334 1334 }; 1335 1335 1336 1336 void ethtool_wol_get_list_free(struct ethtool_wol_get_list *rsp); ··· 1344 1344 __u8 cmd; 1345 1345 struct ynl_ntf_base_type *next; 1346 1346 void (*free)(struct ethtool_wol_get_ntf *ntf); 1347 - struct ethtool_wol_get_rsp obj __attribute__ ((aligned (8))); 1347 + struct ethtool_wol_get_rsp obj __attribute__((aligned(8))); 1348 1348 }; 1349 1349 1350 1350 void ethtool_wol_get_ntf_free(struct ethtool_wol_get_ntf *rsp); ··· 1546 1546 1547 1547 struct ethtool_features_get_list { 1548 1548 struct ethtool_features_get_list *next; 1549 - struct ethtool_features_get_rsp obj __attribute__ ((aligned (8))); 1549 + struct ethtool_features_get_rsp obj __attribute__((aligned(8))); 1550 1550 }; 1551 1551 1552 1552 void ethtool_features_get_list_free(struct ethtool_features_get_list *rsp); ··· 1561 1561 __u8 cmd; 1562 1562 struct ynl_ntf_base_type *next; 1563 1563 void (*free)(struct ethtool_features_get_ntf *ntf); 1564 - struct ethtool_features_get_rsp obj __attribute__ ((aligned (8))); 1564 + struct ethtool_features_get_rsp obj __attribute__((aligned(8))); 1565 1565 }; 1566 1566 1567 1567 void ethtool_features_get_ntf_free(struct ethtool_features_get_ntf *rsp); ··· 1843 1843 1844 1844 struct ethtool_privflags_get_list { 1845 1845 struct ethtool_privflags_get_list *next; 1846 - struct ethtool_privflags_get_rsp obj __attribute__ ((aligned (8))); 1846 + struct ethtool_privflags_get_rsp obj __attribute__((aligned(8))); 1847 1847 }; 1848 1848 1849 1849 void ethtool_privflags_get_list_free(struct ethtool_privflags_get_list *rsp); ··· 1858 1858 __u8 cmd; 1859 1859 struct ynl_ntf_base_type *next; 1860 1860 void (*free)(struct ethtool_privflags_get_ntf *ntf); 1861 - struct ethtool_privflags_get_rsp obj __attribute__ ((aligned (8))); 1861 + struct ethtool_privflags_get_rsp obj __attribute__((aligned(8))); 1862 1862 }; 1863 1863 1864 1864 void ethtool_privflags_get_ntf_free(struct ethtool_privflags_get_ntf *rsp); ··· 2072 2072 2073 2073 struct ethtool_rings_get_list { 2074 2074 struct ethtool_rings_get_list *next; 2075 - struct ethtool_rings_get_rsp obj __attribute__ ((aligned (8))); 2075 + struct ethtool_rings_get_rsp obj __attribute__((aligned(8))); 2076 2076 }; 2077 2077 2078 2078 void ethtool_rings_get_list_free(struct ethtool_rings_get_list *rsp); ··· 2087 2087 __u8 cmd; 2088 2088 struct ynl_ntf_base_type *next; 2089 2089 void (*free)(struct ethtool_rings_get_ntf *ntf); 2090 - struct ethtool_rings_get_rsp obj __attribute__ ((aligned (8))); 2090 + struct ethtool_rings_get_rsp obj __attribute__((aligned(8))); 2091 2091 }; 2092 2092 2093 2093 void ethtool_rings_get_ntf_free(struct ethtool_rings_get_ntf *rsp); ··· 2395 2395 2396 2396 struct ethtool_channels_get_list { 2397 2397 struct ethtool_channels_get_list *next; 2398 - struct ethtool_channels_get_rsp obj __attribute__ ((aligned (8))); 2398 + struct ethtool_channels_get_rsp obj __attribute__((aligned(8))); 2399 2399 }; 2400 2400 2401 2401 void ethtool_channels_get_list_free(struct ethtool_channels_get_list *rsp); ··· 2410 2410 __u8 cmd; 2411 2411 struct ynl_ntf_base_type *next; 2412 2412 void (*free)(struct ethtool_channels_get_ntf *ntf); 2413 - struct ethtool_channels_get_rsp obj __attribute__ ((aligned (8))); 2413 + struct ethtool_channels_get_rsp obj __attribute__((aligned(8))); 2414 2414 }; 2415 2415 2416 2416 void ethtool_channels_get_ntf_free(struct ethtool_channels_get_ntf *rsp); ··· 2697 2697 2698 2698 struct ethtool_coalesce_get_list { 2699 2699 struct ethtool_coalesce_get_list *next; 2700 - struct ethtool_coalesce_get_rsp obj __attribute__ ((aligned (8))); 2700 + struct ethtool_coalesce_get_rsp obj __attribute__((aligned(8))); 2701 2701 }; 2702 2702 2703 2703 void ethtool_coalesce_get_list_free(struct ethtool_coalesce_get_list *rsp); ··· 2712 2712 __u8 cmd; 2713 2713 struct ynl_ntf_base_type *next; 2714 2714 void (*free)(struct ethtool_coalesce_get_ntf *ntf); 2715 - struct ethtool_coalesce_get_rsp obj __attribute__ ((aligned (8))); 2715 + struct ethtool_coalesce_get_rsp obj __attribute__((aligned(8))); 2716 2716 }; 2717 2717 2718 2718 void ethtool_coalesce_get_ntf_free(struct ethtool_coalesce_get_ntf *rsp); ··· 3124 3124 3125 3125 struct ethtool_pause_get_list { 3126 3126 struct ethtool_pause_get_list *next; 3127 - struct ethtool_pause_get_rsp obj __attribute__ ((aligned (8))); 3127 + struct ethtool_pause_get_rsp obj __attribute__((aligned(8))); 3128 3128 }; 3129 3129 3130 3130 void ethtool_pause_get_list_free(struct ethtool_pause_get_list *rsp); ··· 3139 3139 __u8 cmd; 3140 3140 struct ynl_ntf_base_type *next; 3141 3141 void (*free)(struct ethtool_pause_get_ntf *ntf); 3142 - struct ethtool_pause_get_rsp obj __attribute__ ((aligned (8))); 3142 + struct ethtool_pause_get_rsp obj __attribute__((aligned(8))); 3143 3143 }; 3144 3144 3145 3145 void ethtool_pause_get_ntf_free(struct ethtool_pause_get_ntf *rsp); ··· 3360 3360 3361 3361 struct ethtool_eee_get_list { 3362 3362 struct ethtool_eee_get_list *next; 3363 - struct ethtool_eee_get_rsp obj __attribute__ ((aligned (8))); 3363 + struct ethtool_eee_get_rsp obj __attribute__((aligned(8))); 3364 3364 }; 3365 3365 3366 3366 void ethtool_eee_get_list_free(struct ethtool_eee_get_list *rsp); ··· 3374 3374 __u8 cmd; 3375 3375 struct ynl_ntf_base_type *next; 3376 3376 void (*free)(struct ethtool_eee_get_ntf *ntf); 3377 - struct ethtool_eee_get_rsp obj __attribute__ ((aligned (8))); 3377 + struct ethtool_eee_get_rsp obj __attribute__((aligned(8))); 3378 3378 }; 3379 3379 3380 3380 void ethtool_eee_get_ntf_free(struct ethtool_eee_get_ntf *rsp); ··· 3623 3623 3624 3624 struct ethtool_tsinfo_get_list { 3625 3625 struct ethtool_tsinfo_get_list *next; 3626 - struct ethtool_tsinfo_get_rsp obj __attribute__ ((aligned (8))); 3626 + struct ethtool_tsinfo_get_rsp obj __attribute__((aligned(8))); 3627 3627 }; 3628 3628 3629 3629 void ethtool_tsinfo_get_list_free(struct ethtool_tsinfo_get_list *rsp); ··· 3842 3842 3843 3843 struct ethtool_tunnel_info_get_list { 3844 3844 struct ethtool_tunnel_info_get_list *next; 3845 - struct ethtool_tunnel_info_get_rsp obj __attribute__ ((aligned (8))); 3845 + struct ethtool_tunnel_info_get_rsp obj __attribute__((aligned(8))); 3846 3846 }; 3847 3847 3848 3848 void ··· 3964 3964 3965 3965 struct ethtool_fec_get_list { 3966 3966 struct ethtool_fec_get_list *next; 3967 - struct ethtool_fec_get_rsp obj __attribute__ ((aligned (8))); 3967 + struct ethtool_fec_get_rsp obj __attribute__((aligned(8))); 3968 3968 }; 3969 3969 3970 3970 void ethtool_fec_get_list_free(struct ethtool_fec_get_list *rsp); ··· 3978 3978 __u8 cmd; 3979 3979 struct ynl_ntf_base_type *next; 3980 3980 void (*free)(struct ethtool_fec_get_ntf *ntf); 3981 - struct ethtool_fec_get_rsp obj __attribute__ ((aligned (8))); 3981 + struct ethtool_fec_get_rsp obj __attribute__((aligned(8))); 3982 3982 }; 3983 3983 3984 3984 void ethtool_fec_get_ntf_free(struct ethtool_fec_get_ntf *rsp); ··· 4221 4221 4222 4222 struct ethtool_module_eeprom_get_list { 4223 4223 struct ethtool_module_eeprom_get_list *next; 4224 - struct ethtool_module_eeprom_get_rsp obj __attribute__ ((aligned (8))); 4224 + struct ethtool_module_eeprom_get_rsp obj __attribute__((aligned(8))); 4225 4225 }; 4226 4226 4227 4227 void ··· 4340 4340 4341 4341 struct ethtool_phc_vclocks_get_list { 4342 4342 struct ethtool_phc_vclocks_get_list *next; 4343 - struct ethtool_phc_vclocks_get_rsp obj __attribute__ ((aligned (8))); 4343 + struct ethtool_phc_vclocks_get_rsp obj __attribute__((aligned(8))); 4344 4344 }; 4345 4345 4346 4346 void ··· 4458 4458 4459 4459 struct ethtool_module_get_list { 4460 4460 struct ethtool_module_get_list *next; 4461 - struct ethtool_module_get_rsp obj __attribute__ ((aligned (8))); 4461 + struct ethtool_module_get_rsp obj __attribute__((aligned(8))); 4462 4462 }; 4463 4463 4464 4464 void ethtool_module_get_list_free(struct ethtool_module_get_list *rsp); ··· 4473 4473 __u8 cmd; 4474 4474 struct ynl_ntf_base_type *next; 4475 4475 void (*free)(struct ethtool_module_get_ntf *ntf); 4476 - struct ethtool_module_get_rsp obj __attribute__ ((aligned (8))); 4476 + struct ethtool_module_get_rsp obj __attribute__((aligned(8))); 4477 4477 }; 4478 4478 4479 4479 void ethtool_module_get_ntf_free(struct ethtool_module_get_ntf *rsp); ··· 4654 4654 4655 4655 struct ethtool_pse_get_list { 4656 4656 struct ethtool_pse_get_list *next; 4657 - struct ethtool_pse_get_rsp obj __attribute__ ((aligned (8))); 4657 + struct ethtool_pse_get_rsp obj __attribute__((aligned(8))); 4658 4658 }; 4659 4659 4660 4660 void ethtool_pse_get_list_free(struct ethtool_pse_get_list *rsp); ··· 4849 4849 4850 4850 struct ethtool_rss_get_list { 4851 4851 struct ethtool_rss_get_list *next; 4852 - struct ethtool_rss_get_rsp obj __attribute__ ((aligned (8))); 4852 + struct ethtool_rss_get_rsp obj __attribute__((aligned(8))); 4853 4853 }; 4854 4854 4855 4855 void ethtool_rss_get_list_free(struct ethtool_rss_get_list *rsp); ··· 4979 4979 4980 4980 struct ethtool_plca_get_cfg_list { 4981 4981 struct ethtool_plca_get_cfg_list *next; 4982 - struct ethtool_plca_get_cfg_rsp obj __attribute__ ((aligned (8))); 4982 + struct ethtool_plca_get_cfg_rsp obj __attribute__((aligned(8))); 4983 4983 }; 4984 4984 4985 4985 void ethtool_plca_get_cfg_list_free(struct ethtool_plca_get_cfg_list *rsp); ··· 4994 4994 __u8 cmd; 4995 4995 struct ynl_ntf_base_type *next; 4996 4996 void (*free)(struct ethtool_plca_get_cfg_ntf *ntf); 4997 - struct ethtool_plca_get_cfg_rsp obj __attribute__ ((aligned (8))); 4997 + struct ethtool_plca_get_cfg_rsp obj __attribute__((aligned(8))); 4998 4998 }; 4999 4999 5000 5000 void ethtool_plca_get_cfg_ntf_free(struct ethtool_plca_get_cfg_ntf *rsp); ··· 5244 5244 5245 5245 struct ethtool_plca_get_status_list { 5246 5246 struct ethtool_plca_get_status_list *next; 5247 - struct ethtool_plca_get_status_rsp obj __attribute__ ((aligned (8))); 5247 + struct ethtool_plca_get_status_rsp obj __attribute__((aligned(8))); 5248 5248 }; 5249 5249 5250 5250 void ··· 5376 5376 5377 5377 struct ethtool_mm_get_list { 5378 5378 struct ethtool_mm_get_list *next; 5379 - struct ethtool_mm_get_rsp obj __attribute__ ((aligned (8))); 5379 + struct ethtool_mm_get_rsp obj __attribute__((aligned(8))); 5380 5380 }; 5381 5381 5382 5382 void ethtool_mm_get_list_free(struct ethtool_mm_get_list *rsp); ··· 5390 5390 __u8 cmd; 5391 5391 struct ynl_ntf_base_type *next; 5392 5392 void (*free)(struct ethtool_mm_get_ntf *ntf); 5393 - struct ethtool_mm_get_rsp obj __attribute__ ((aligned (8))); 5393 + struct ethtool_mm_get_rsp obj __attribute__((aligned(8))); 5394 5394 }; 5395 5395 5396 5396 void ethtool_mm_get_ntf_free(struct ethtool_mm_get_ntf *rsp); ··· 5504 5504 __u8 cmd; 5505 5505 struct ynl_ntf_base_type *next; 5506 5506 void (*free)(struct ethtool_cable_test_ntf *ntf); 5507 - struct ethtool_cable_test_ntf_rsp obj __attribute__ ((aligned (8))); 5507 + struct ethtool_cable_test_ntf_rsp obj __attribute__((aligned(8))); 5508 5508 }; 5509 5509 5510 5510 void ethtool_cable_test_ntf_free(struct ethtool_cable_test_ntf *rsp); ··· 5527 5527 __u8 cmd; 5528 5528 struct ynl_ntf_base_type *next; 5529 5529 void (*free)(struct ethtool_cable_test_tdr_ntf *ntf); 5530 - struct ethtool_cable_test_tdr_ntf_rsp obj __attribute__ ((aligned (8))); 5530 + struct ethtool_cable_test_tdr_ntf_rsp obj __attribute__((aligned(8))); 5531 5531 }; 5532 5532 5533 5533 void ethtool_cable_test_tdr_ntf_free(struct ethtool_cable_test_tdr_ntf *rsp);
+1 -1
tools/net/ynl/generated/fou-user.h
··· 333 333 /* FOU_CMD_GET - dump */ 334 334 struct fou_get_list { 335 335 struct fou_get_list *next; 336 - struct fou_get_rsp obj __attribute__ ((aligned (8))); 336 + struct fou_get_rsp obj __attribute__((aligned(8))); 337 337 }; 338 338 339 339 void fou_get_list_free(struct fou_get_list *rsp);
+1 -1
tools/net/ynl/generated/handshake-user.h
··· 90 90 __u8 cmd; 91 91 struct ynl_ntf_base_type *next; 92 92 void (*free)(struct handshake_accept_ntf *ntf); 93 - struct handshake_accept_rsp obj __attribute__ ((aligned (8))); 93 + struct handshake_accept_rsp obj __attribute__((aligned(8))); 94 94 }; 95 95 96 96 void handshake_accept_ntf_free(struct handshake_accept_ntf *rsp);
+2 -2
tools/net/ynl/generated/netdev-user.h
··· 69 69 /* NETDEV_CMD_DEV_GET - dump */ 70 70 struct netdev_dev_get_list { 71 71 struct netdev_dev_get_list *next; 72 - struct netdev_dev_get_rsp obj __attribute__ ((aligned (8))); 72 + struct netdev_dev_get_rsp obj __attribute__((aligned(8))); 73 73 }; 74 74 75 75 void netdev_dev_get_list_free(struct netdev_dev_get_list *rsp); ··· 82 82 __u8 cmd; 83 83 struct ynl_ntf_base_type *next; 84 84 void (*free)(struct netdev_dev_get_ntf *ntf); 85 - struct netdev_dev_get_rsp obj __attribute__ ((aligned (8))); 85 + struct netdev_dev_get_rsp obj __attribute__((aligned(8))); 86 86 }; 87 87 88 88 void netdev_dev_get_ntf_free(struct netdev_dev_get_ntf *rsp);
+2 -2
tools/net/ynl/lib/ynl.h
··· 157 157 158 158 struct ynl_dump_list_type { 159 159 struct ynl_dump_list_type *next; 160 - unsigned char data[] __attribute__ ((aligned (8))); 160 + unsigned char data[] __attribute__((aligned(8))); 161 161 }; 162 162 extern struct ynl_dump_list_type *YNL_LIST_END; 163 163 ··· 187 187 __u8 cmd; 188 188 struct ynl_ntf_base_type *next; 189 189 void (*free)(struct ynl_ntf_base_type *ntf); 190 - unsigned char data[] __attribute__ ((aligned (8))); 190 + unsigned char data[] __attribute__((aligned(8))); 191 191 }; 192 192 193 193 extern mnl_cb_t ynl_cb_array[NLMSG_MIN_TYPE];
+1 -1
tools/net/ynl/ynl-gen-c.py
··· 1872 1872 ri.cw.p('__u8 cmd;') 1873 1873 ri.cw.p('struct ynl_ntf_base_type *next;') 1874 1874 ri.cw.p(f"void (*free)({type_name(ri, 'reply')} *ntf);") 1875 - ri.cw.p(f"{type_name(ri, 'reply', deref=True)} obj __attribute__ ((aligned (8)));") 1875 + ri.cw.p(f"{type_name(ri, 'reply', deref=True)} obj __attribute__((aligned(8)));") 1876 1876 ri.cw.block_end(line=';') 1877 1877 ri.cw.nl() 1878 1878 print_free_prototype(ri, 'reply')