From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B7FC2C4708F for ; Tue, 1 Jun 2021 19:10:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9B00261287 for ; Tue, 1 Jun 2021 19:10:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234714AbhFATMG (ORCPT ); Tue, 1 Jun 2021 15:12:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233853AbhFATMF (ORCPT ); Tue, 1 Jun 2021 15:12:05 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0545C061574 for ; Tue, 1 Jun 2021 12:10:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description; bh=LCgeVYYC1zbzbCB+HR8hlhgoNfX1Llo03rabJZIASVE=; b=CgbtqyY5TLK4PK2zjTBtK7w2Uc Ungj/LAldIOXVzKaDEG77+9ME7HPI+CNkkdnFn/bk+CdpiDQXeRoWHF7Rjg/rrEyzyzAEsEWZfD59 vNzMSPhlGqviF7D9xAeK/YYO4uC6zKkJu8k4hQPXNPmm0BLfemyyoH0Pgnq2P/9YRJtqXddwCN1YB OUmSNveTEF6d71vw7HHJ5hoyS4gm2C84AWdnrnxsI3hmPyX7ZNY6q3cEmLCZPRq1E4YzIvm3PsfQL K/RqdNxD3E5CseKhwjnpNy0n+6XORTTU82T/+t/9XN11sdRZ2bJ5QSU4izSklXoFCXZ904Dodk7JU iSQ3CyMQ==; Received: from [2601:1c0:6280:3f0::ce7d] by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1lo9mQ-000Xlz-IA; Tue, 01 Jun 2021 19:10:22 +0000 Subject: Re: [PATCH] afs: add a return to afs_dir_set_page_dirty() To: trix@redhat.com, dhowells@redhat.com, marc.dionne@auristor.com Cc: linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org References: <20210601140820.2626615-1-trix@redhat.com> From: Randy Dunlap Message-ID: <5ddf7235-dd6c-d4c3-41a8-bc5a538ccd1e@infradead.org> Date: Tue, 1 Jun 2021 12:10:22 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: <20210601140820.2626615-1-trix@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/1/21 7:08 AM, trix@redhat.com wrote: > From: Tom Rix > > 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 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 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