scripts: kernel-doc: Restore anonymous enum parsing
PATCH 1/1 scripts: kernel-doc: Restore anonymous enum parsing
The commit d38c8cfb0571 ("scripts: kernel-doc: add support for typedef enum") broke anonymous enum parsing. Restore it by relying on members rather than its name.
--- scripts/kernel-doc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/kernel-doc +1 -1
@@ -1390,7 +1390,7 @@ sub dump_enum($$) { $members = $2; } - if ($declaration_name) { + if ($members) { my %_members; $members =~ s/\s+$//;
Signature · 1 line
2.28.0
Em Mon, 2 Nov 2020 19:06:37 +0200
Andy Shevchenko <[email protected]> escreveu:
Quoted 8 lines
The commit
d38c8cfb0571("scripts: kernel-doc: add support for typedef enum") broke anonymous enum parsing. Restore it by relying on members rather than its name.Fixes d38c8cfb0571 ("scripts: kernel-doc: add support for typedef enum")Reported-by kernel test robot <[email protected]>Cc Mauro Carvalho Chehab <[email protected]>Signed-off-by Andy Shevchenko <[email protected]>
Patch looks ok to me. Do you have an example about using it for anonymous enum?
Quoted 9 lines
--- scripts/kernel-doc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)scripts/kernel-doc +0
-0
scripts/kernel-doc sub dump_enum($$) { · line 1396
Quoted 8 lines
scripts/kernel-doc +1
-1@@ -1390,7 +1390,7 @@ sub dump_enum($$) { $members = $2; } - if ($declaration_name) { + if ($members) { my %_members; $members =~ s/\s+$//;
Thanks,
Mauro
Quoted 7 lines · Mauro Carvalho Chehab
Em Mon, 2 Nov 2020 19:06:37 +0200
Andy Shevchenko <[email protected]> escreveu:Quoted 4 lines
The commit
d38c8cfb0571("scripts: kernel-doc: add support for typedef enum") broke anonymous enum parsing. Restore it by relying on members rather than its name.
Quoted 7 lines
Quoted 4 lines
Fixes d38c8cfb0571 ("scripts: kernel-doc: add support for typedef enum")Reported-by kernel test robot <[email protected]>Cc Mauro Carvalho Chehab <[email protected]>Signed-off-by Andy Shevchenko <[email protected]>Patch looks ok to me. Do you have an example about using it for anonymous enum?
drivers/pinctrl/intel/pinctrl-intel.c
Signature · 2 lines
With Best Regards, Andy Shevchenko
Mauro Carvalho Chehab
Reviewed-byEm Mon, 2 Nov 2020 19:48:46 +0200
Andy Shevchenko <[email protected]> escreveu:
Quoted 13 lines · Mauro Carvalho Chehab
Quoted 12 lines
Em Mon, 2 Nov 2020 19:06:37 +0200
Andy Shevchenko <[email protected]> escreveu:Quoted 8 lines
The commit
d38c8cfb0571("scripts: kernel-doc: add support for typedef enum") broke anonymous enum parsing. Restore it by relying on members rather than its name.Fixes d38c8cfb0571 ("scripts: kernel-doc: add support for typedef enum")Reported-by kernel test robot <[email protected]>Cc Mauro Carvalho Chehab <[email protected]>Signed-off-by Andy Shevchenko <[email protected]>
Quoted 5 lines
Quoted 2 lines
Patch looks ok to me. Do you have an example about using it for anonymous enum?
drivers/pinctrl/intel/pinctrl-intel.c
Thanks!
Both include/linux/phy.h and drivers/pinctrl/intel/pinctrl-intel.c are parsing fine after your patch.
So,
Thanks,
Mauro
Quoted 22 lines · Mauro Carvalho Chehab
Em Mon, 2 Nov 2020 19:48:46 +0200
Andy Shevchenko <[email protected]> escreveu:Quoted 13 lines · Mauro Carvalho Chehab
Quoted 12 lines
Em Mon, 2 Nov 2020 19:06:37 +0200
Andy Shevchenko <[email protected]> escreveu:Quoted 8 lines
The commit
d38c8cfb0571("scripts: kernel-doc: add support for typedef enum") broke anonymous enum parsing. Restore it by relying on members rather than its name.Fixes d38c8cfb0571 ("scripts: kernel-doc: add support for typedef enum")Reported-by kernel test robot <[email protected]>Cc Mauro Carvalho Chehab <[email protected]>Signed-off-by Andy Shevchenko <[email protected]>Quoted 5 lines
Quoted 2 lines
Patch looks ok to me. Do you have an example about using it for anonymous enum?
drivers/pinctrl/intel/pinctrl-intel.c
Quoted 8 lines
Thanks!
Both
include/linux/phy.handdrivers/pinctrl/intel/pinctrl-intel.care parsing fine after your patch.So,
Reviewed-by Mauro Carvalho Chehab <[email protected]>
Thanks!
Jonathan, can we have this applied?
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 17 lines · On Mon, 2 Nov 2020 19:06:37 +0200 Andy Shevchenko…
The commit
d38c8cfb0571("scripts: kernel-doc: add support for typedef enum") broke anonymous enum parsing. Restore it by relying on members rather than its name.Fixes d38c8cfb0571 ("scripts: kernel-doc: add support for typedef enum")Reported-by kernel test robot <[email protected]>Cc Mauro Carvalho Chehab <[email protected]>Signed-off-by Andy Shevchenko <[email protected]>--- scripts/kernel-doc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)scripts/kernel-doc +0
-0
scripts/kernel-doc sub dump_enum($$) { · line 1394
Quoted 6 lines
scripts/kernel-doc +1
-1@@ -1390,7 +1390,7 @@ sub dump_enum($$) { $members = $2; } - if ($declaration_name) { + if ($members) { my %_members;
Applied, thanks.
jon