[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5ddf7235-dd6c-d4c3-41a8-bc5a538ccd1e@infradead.org>
Date: Tue, 1 Jun 2021 12:10:22 -0700
From: Randy Dunlap <rdunlap@...radead.org>
To: trix@...hat.com, dhowells@...hat.com, marc.dionne@...istor.com
Cc: linux-afs@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] afs: add a return to afs_dir_set_page_dirty()
On 6/1/21 7:08 AM, trix@...hat.com wrote:
> From: Tom Rix <trix@...hat.com>
>
> With gcc 10.3, this compile error is reported
> dir.c: In function 'afs_dir_set_page_dirty':
> dir.c:51:1: error: no return statement in function
> returning non-void [-Werror=return-type]
>
> Even though the code is unreachable, add a return
> to silence the error.
>
> Signed-off-by: Tom Rix <trix@...hat.com>
or this previous patch:
https://lore.kernel.org/lkml/20210327121624.194639-1-zhengzengkai@huawei.com/
but for either of them, ack.
Acked-by: Randy Dunlap <rdunlap@...radead.org>
thanks.
> ---
> fs/afs/dir.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/fs/afs/dir.c b/fs/afs/dir.c
> index 78719f2f567e..988766f88d8b 100644
> --- a/fs/afs/dir.c
> +++ b/fs/afs/dir.c
> @@ -48,6 +48,7 @@ static void afs_dir_invalidatepage(struct page *page, unsigned int offset,
> static int afs_dir_set_page_dirty(struct page *page)
> {
> BUG(); /* This should never happen. */
> + return -EINVAL;
> }
>
> const struct file_operations afs_dir_file_operations = {
>
--
~Randy
Powered by blists - more mailing lists