Re: [PATCH] afs: fix no return statement in function returning non-void
From: David Howells
Date: Wed Jun 16 2021 - 09:41:46 EST
Tom Rix <trix@xxxxxxxxxx> wrote:
> A fix is to use the __noreturn attribute on this function and not add a return
> like this
>
> -static int afs_dir_set_page_dirty(struct page *page)
> +static int __noreturn afs_dir_set_page_dirty(struct page *page)
>
> and to the set of ~300 similar functions in these files.
BUG() really ought to handle it. Do you have CONFIG_BUG=y?
David