linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: trix@redhat.com, dhowells@redhat.com, marc.dionne@auristor.com
Cc: linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] afs: add a return to afs_dir_set_page_dirty()
Date: Tue, 1 Jun 2021 12:10:22 -0700	[thread overview]
Message-ID: <5ddf7235-dd6c-d4c3-41a8-bc5a538ccd1e@infradead.org> (raw)
In-Reply-To: <20210601140820.2626615-1-trix@redhat.com>

On 6/1/21 7:08 AM, trix@redhat.com wrote:
> From: Tom Rix <trix@redhat.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@redhat.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@infradead.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


      reply	other threads:[~2021-06-01 19:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-01 14:08 [PATCH] afs: add a return to afs_dir_set_page_dirty() trix
2021-06-01 19:10 ` Randy Dunlap [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5ddf7235-dd6c-d4c3-41a8-bc5a538ccd1e@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=dhowells@redhat.com \
    --cc=linux-afs@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.dionne@auristor.com \
    --cc=trix@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).