Re: [PATCH v2] docs: scripts/kernel-doc: Detect absence of FILE arg
From: Jonathan Corbet
Date: Thu Feb 24 2022 - 14:15:20 EST
Akira Yokosawa <akiyks@xxxxxxxxx> writes:
> Currently, when there is no FILE argument following a switch such
> as -man, -rst, or -none, kernel-doc exits with a warning from perl
> (long msg folded):
>
> Use of uninitialized value $ARGV[0] in pattern match (m//)
> at ./scripts/kernel-doc line 438.
>
> , which is unhelpful.
>
> Improve the behavior by adding a check at the bottom of parsing
> loop.
> If the argument is absent, display help text and exit with
> the code of 1 (via usage()).
As might be expected, this applied poorly after the pod patches went in.
I went ahead and resolved the conflict, substituting an appropriate
pod2usage() call.
Thanks,
jon