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

David Howells dhowells at redhat.com
Thu Apr 8 15:06:55 BST 2021


Zheng Zengkai <zhengzengkai at huawei.com> 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




More information about the linux-afs mailing list