Re: [PATCH] afs: fix no return statement in function returning non-void

From: David Howells
Date: Thu Apr 08 2021 - 10:08:38 EST


Zheng Zengkai <zhengzengkai@xxxxxxxxxx> wrote:

> static int afs_dir_set_page_dirty(struct page *page)
> {
> BUG(); /* This should never happen. */
> + return 0;
> }

That shouldn't be necessary. BUG() should be marked as 'no return' to the
compiler. What arch and compiler are you using?

David