Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp484433pxf; Thu, 8 Apr 2021 07:09:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyetq1wQdvth7m1h41uJm0Fex8S2k81rBN3d0Tk4dMZD2dVdURgW5sydfrbQdql+HsSKKSM X-Received: by 2002:a62:7ecc:0:b029:1ee:f61b:a63f with SMTP id z195-20020a627ecc0000b02901eef61ba63fmr7670628pfc.57.1617890954298; Thu, 08 Apr 2021 07:09:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617890954; cv=none; d=google.com; s=arc-20160816; b=ERY8eBkQt264GMixldG0/TvlinbKb8wPpI9lrggt8/deD9q47KxC2hBljeawn2jy5X 2VeajQsB7DVX9FPreEnKvVI6wJb70Q+sf91phoHBJPQjUBtv5wfUG0O0bh/3h/5MuO8z s4IMFQ6EaZ9oTdjEZxrUr2Xhk8rV8e2H5L1EVGsANsEkAN3flMKdHpHkf9R0J9DgaDI8 QhkMyGlhkdLCXpkeaw4/tfQ3I+tqngmL97cGWuTj5zBRL6lWYFHJ1l/eTrLh3qifl7Ru tBzjHPswhSbo/s57fD1ffrMcL/81M/ebYRGCEP5U5eWkXiot33zN5Vsv1GScM+bgI5xO pgLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:content-id:mime-version:subject :cc:to:references:in-reply-to:from:organization:dkim-signature; bh=8hSa8efeV34Ya9UUl4ShXiuzP40qCP3a301EVTQNHAg=; b=rT9ErhTzz5d0mkR6hM0BJIxDT1XH9iB4Z4OUI05Jfyw+l48LEszH9Y43WR0DxvcuOP mC2Sw67x9sa434Scvi35ng5kHilNQLvcKdTvuCTGSoJJ9gIZLnPelITIt7Ddwdp+2sYc ph2g3TdR2BsQ+iGz77/ZGKvwlPTQxywssvcWWzia+7/ukG7nGSznWYbbb5dguVpAqQYp DmVDTHaPyW/WGqg4D64feQJYZnojtVoYXURYVTWaatv1BTOrjd/tqeCqAS4s7qzqIIou r3TH0AwV3yDhJcKo73Cf/rkIKCAmcKovI2ER++A/PZK92gNvlMYqPU8/Blpi81Yizy17 o1SQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DLztGcUI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y13si7338655pgo.327.2021.04.08.07.09.01; Thu, 08 Apr 2021 07:09:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DLztGcUI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231922AbhDHOIj (ORCPT + 99 others); Thu, 8 Apr 2021 10:08:39 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:49450 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232004AbhDHOHL (ORCPT ); Thu, 8 Apr 2021 10:07:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1617890819; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=8hSa8efeV34Ya9UUl4ShXiuzP40qCP3a301EVTQNHAg=; b=DLztGcUI9kXi6+AznToX66zjvX7AykvNRyKOh6CgGg4swDabq+IBOImA74324s6EVtBn9t Q5X4EdB2bz072rQDNztmAsq4XBA1LpRuQpKvCCW274RO6QnWYRg7nV/duk8HYwG5vRg30c nD/H4VNCzMwHh7WvQZJjsHu99dPiCbU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-591-LqkAPl65PdyDD3hekh0hng-1; Thu, 08 Apr 2021 10:06:58 -0400 X-MC-Unique: LqkAPl65PdyDD3hekh0hng-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0C37C8189C6; Thu, 8 Apr 2021 14:06:57 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-119-35.rdu2.redhat.com [10.10.119.35]) by smtp.corp.redhat.com (Postfix) with ESMTP id C7CB95C1C5; Thu, 8 Apr 2021 14:06:55 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20210327121624.194639-1-zhengzengkai@huawei.com> References: <20210327121624.194639-1-zhengzengkai@huawei.com> To: Zheng Zengkai Cc: dhowells@redhat.com, linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org, huawei.libin@huawei.com Subject: Re: [PATCH] afs: fix no return statement in function returning non-void MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <6574.1617890815.1@warthog.procyon.org.uk> Date: Thu, 08 Apr 2021 15:06:55 +0100 Message-ID: <6575.1617890815@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Zheng Zengkai 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