public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] docs: find-unused-docs.sh: fixup directory usage
@ 2026-01-02 20:06 Randy Dunlap
  2026-01-02 20:13 ` Matthew Wilcox
  2026-01-06 21:36 ` Jonathan Corbet
  0 siblings, 2 replies; 3+ messages in thread
From: Randy Dunlap @ 2026-01-02 20:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Randy Dunlap, Jonathan Corbet, linux-doc

The recent move of this script from scripts/ to tools/docs/
did not account for the 'cd' directory usage.
Update "cd .." to "cd ../.." to make the script self-correcting.

This also eliminates a shell warning:
./tools/docs/find-unused-docs.sh: line 33: cd: Documentation/: No such file or directory

Fixes: 184414c6a6ca ("docs: move find-unused-docs.sh to tools/docs")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
---
v2: correct subject line typos (2) (arg, kbd error!)

Cc: Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.kernel.org

 tools/docs/find-unused-docs.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-next-20251219.orig/tools/docs/find-unused-docs.sh
+++ linux-next-20251219/tools/docs/find-unused-docs.sh
@@ -28,7 +28,7 @@ if ! [ -d "$1" ]; then
 fi
 
 cd "$( dirname "${BASH_SOURCE[0]}" )"
-cd ..
+cd ../..
 
 cd Documentation/
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] docs: find-unused-docs.sh: fixup directory usage
  2026-01-02 20:06 [PATCH v2] docs: find-unused-docs.sh: fixup directory usage Randy Dunlap
@ 2026-01-02 20:13 ` Matthew Wilcox
  2026-01-06 21:36 ` Jonathan Corbet
  1 sibling, 0 replies; 3+ messages in thread
From: Matthew Wilcox @ 2026-01-02 20:13 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: linux-kernel, Jonathan Corbet, linux-doc

On Fri, Jan 02, 2026 at 12:06:57PM -0800, Randy Dunlap wrote:
> The recent move of this script from scripts/ to tools/docs/
> did not account for the 'cd' directory usage.
> Update "cd .." to "cd ../.." to make the script self-correcting.
> 
> This also eliminates a shell warning:
> ./tools/docs/find-unused-docs.sh: line 33: cd: Documentation/: No such file or directory
> 
> Fixes: 184414c6a6ca ("docs: move find-unused-docs.sh to tools/docs")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>

Hah.  I just committed this same patch.

    docs: Fix find-unused-docs.sh

    find-unused-docs.sh cares about which directory it lives in.
    After being moved from scripts/ to tools/docs/, it emits:

    ./tools/docs/find-unused-docs.sh: line 33: cd: Documentation/: No such file or directory

    and then claims that all files are omitted from the formatted
    documentation.  I opted for the simple fix here rather than trying to
    remove that dependency.

    Fixes: 184414c6a6ca (docs: move find-unused-docs.sh to tools/docs)
    Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>

You posted it first, so:

Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>

(feel free to use any parts of my commit message if you prefer them to
yours)

> v2: correct subject line typos (2) (arg, kbd error!)
> 
> Cc: Jonathan Corbet <corbet@lwn.net>
> Cc: linux-doc@vger.kernel.org
> 
>  tools/docs/find-unused-docs.sh |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- linux-next-20251219.orig/tools/docs/find-unused-docs.sh
> +++ linux-next-20251219/tools/docs/find-unused-docs.sh
> @@ -28,7 +28,7 @@ if ! [ -d "$1" ]; then
>  fi
>  
>  cd "$( dirname "${BASH_SOURCE[0]}" )"
> -cd ..
> +cd ../..
>  
>  cd Documentation/
>  
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] docs: find-unused-docs.sh: fixup directory usage
  2026-01-02 20:06 [PATCH v2] docs: find-unused-docs.sh: fixup directory usage Randy Dunlap
  2026-01-02 20:13 ` Matthew Wilcox
@ 2026-01-06 21:36 ` Jonathan Corbet
  1 sibling, 0 replies; 3+ messages in thread
From: Jonathan Corbet @ 2026-01-06 21:36 UTC (permalink / raw)
  To: Randy Dunlap, linux-kernel; +Cc: Randy Dunlap, linux-doc

Randy Dunlap <rdunlap@infradead.org> writes:

> The recent move of this script from scripts/ to tools/docs/
> did not account for the 'cd' directory usage.
> Update "cd .." to "cd ../.." to make the script self-correcting.
>
> This also eliminates a shell warning:
> ./tools/docs/find-unused-docs.sh: line 33: cd: Documentation/: No such file or directory
>
> Fixes: 184414c6a6ca ("docs: move find-unused-docs.sh to tools/docs")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> ---
> v2: correct subject line typos (2) (arg, kbd error!)
>
> Cc: Jonathan Corbet <corbet@lwn.net>
> Cc: linux-doc@vger.kernel.org
>
>  tools/docs/find-unused-docs.sh |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- linux-next-20251219.orig/tools/docs/find-unused-docs.sh
> +++ linux-next-20251219/tools/docs/find-unused-docs.sh
> @@ -28,7 +28,7 @@ if ! [ -d "$1" ]; then
>  fi
>  
>  cd "$( dirname "${BASH_SOURCE[0]}" )"
> -cd ..
> +cd ../..

Weird, I'm sure I tested that ... evidently not very well.  Applied,
thanks.

jon

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-01-06 21:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-02 20:06 [PATCH v2] docs: find-unused-docs.sh: fixup directory usage Randy Dunlap
2026-01-02 20:13 ` Matthew Wilcox
2026-01-06 21:36 ` Jonathan Corbet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox