Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3746851pxj; Tue, 15 Jun 2021 07:50:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMbnWwqbvL+38eRo39GZwwNpSs9Mm0sg+NOcvLptbzc0xYEsTfMk77RuelJ8E8bofiSmV0 X-Received: by 2002:a92:2802:: with SMTP id l2mr17479906ilf.298.1623768607803; Tue, 15 Jun 2021 07:50:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623768607; cv=none; d=google.com; s=arc-20160816; b=Y6Yxr08hdquuN0W8FW7meg1P91AVerHlCSylYNUdAz/8ESaTd/YZYxvMGQf106m55V SoEqDONNAb2E2yBNnpvP/bTg5qkpm2k5q10jGbLr1O9g3iF722+l46y0bv8RyFHThtHm 7HrL3WlO4Lxmp0QuJjn1HSlCa5FbJnlGixvkJcN2KuB3gcYu3cn0h5PPpsHUvmR34nEz CP1Zb6jybdrtYbNXgMBXHzbscWe7aTSe9VPPsS3o3TsSI6yKlDEDqwnDNg7kkAA6gCVC J/CYm194GcgB+M78a/CDv77H4hxmmDuP6rjwNp3/qCG6EyNmaUaGunvmZT3zNWvpSDjw nKZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=YyEZLduH7/iFgJwKc9vp/hqM3Vrl8HD6DqfsbR4sDVg=; b=UxcuHItYLtKvEvHUd1iDQcNOXO1BJTmtBqzakb7vPTV1RrmLv79VQANiBLXgWjsr5e nc6Mmz7Ij60jznv8CFxKbmP7oYwIUlaK+eOUzzlBTCVYiq0qE7pPYNtv5QgYcdSRpNKr sQbLIhE5Ox/0nsejvi4hVREJuLisRMTacqpt+PnbQjkyKwzzfvVx/xziTTXV5900+W5j QstwIJ0ADJaPTuKYOnylR8K8O+oPrIxfWbS+YqYfJSA2kYj3IUziM9COcm7j9Ieyj8jI BmqBn3XsUoiutCOxm55/wDqYiVbSXT96t/e4CWxW1KQorDeYib4c5kDm5CW1lMZ3Qtcg 64zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=HprZFfL4; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j16si21956986ioo.11.2021.06.15.07.49.55; Tue, 15 Jun 2021 07:50:07 -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=@linux-foundation.org header.s=google header.b=HprZFfL4; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231222AbhFOOvZ (ORCPT + 99 others); Tue, 15 Jun 2021 10:51:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230267AbhFOOvY (ORCPT ); Tue, 15 Jun 2021 10:51:24 -0400 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6242C061574 for ; Tue, 15 Jun 2021 07:49:18 -0700 (PDT) Received: by mail-lf1-x135.google.com with SMTP id x24so21889403lfr.10 for ; Tue, 15 Jun 2021 07:49:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=YyEZLduH7/iFgJwKc9vp/hqM3Vrl8HD6DqfsbR4sDVg=; b=HprZFfL4N7GTrn8vzzdG12NKJmO6iMJi+xyICKDRcSKmjzKtel9myIFjJw+b/IqOei 66xHWiWeVwCuAn9OGrcgF1N0Ubrlt+z1LoJA1YKBS1nPPucqAaEIoAv/rXFNEUogqMR6 xyEDcW2Pf1Ls1yhJOp8n844CnafVRsw4Toy54= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=YyEZLduH7/iFgJwKc9vp/hqM3Vrl8HD6DqfsbR4sDVg=; b=BZuBtgnTVT0tsnrLmLI5MKgDPbC9PIhzQhst70wK82sZdVCHIaSzBA9JeWnD6ycZ+I OMctwcvaCS79RpyfXCUSKJQf1F+/tM62hCJ2qAEG4YWVNtoP0r/iI3PzA0Y7GzZun3I6 XvUEEFi8TrsVeHzyR09yAgpPL/Q5tH3x3N7x//ew7qZ1IoRH6F4tAc/DwH5a+A4kec8a tIl3H1njrmhlZOJeocZV8DJJUzTG6ueOi6qIKd/FFDfuLKALPyjlFnuxUB3f5xwz1BqF F6k9S70m1cqktI4a81P8zRGaJqVqNCsD1JGpGXZKgarWEj/ktO33qub7+kavzHnC10Jc seMA== X-Gm-Message-State: AOAM531ppfACOH+4Xl4yGTTdISwIQKQ2ai4R7U0e20XJrufZycP5U0DZ 6xoi2O4JOrzyNJlXxY9vl/xirpU2Lp3Fh7llQEc= X-Received: by 2002:ac2:5e36:: with SMTP id o22mr16648115lfg.320.1623768557048; Tue, 15 Jun 2021 07:49:17 -0700 (PDT) Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com. [209.85.167.46]) by smtp.gmail.com with ESMTPSA id d9sm1826835lfv.47.2021.06.15.07.49.16 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 15 Jun 2021 07:49:16 -0700 (PDT) Received: by mail-lf1-f46.google.com with SMTP id p7so27529387lfg.4 for ; Tue, 15 Jun 2021 07:49:16 -0700 (PDT) X-Received: by 2002:a05:6512:3d13:: with SMTP id d19mr15953159lfv.41.1623768556044; Tue, 15 Jun 2021 07:49:16 -0700 (PDT) MIME-Version: 1.0 References: <162375813191.653958.11993495571264748407.stgit@warthog.procyon.org.uk> In-Reply-To: <162375813191.653958.11993495571264748407.stgit@warthog.procyon.org.uk> From: Linus Torvalds Date: Tue, 15 Jun 2021 07:49:00 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] afs: fix no return statement in function returning non-void To: David Howells Cc: Hulk Robot , Zheng Zengkai , Randy Dunlap , Tom Rix , linux-afs@lists.infradead.org, Marc Dionne , linux-fsdevel , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 15, 2021 at 4:55 AM David Howells wrote: > > From: Zheng Zengkai > > Add missing return to fix following compilation issue: > > fs/afs/dir.c: In function =E2=80=98afs_dir_set_page_dirty=E2=80=99: > fs/afs/dir.c:51:1: error: no return statement in function > returning non-void [-Werror=3Dreturn-type] This warning is actively wrong, and the patch is the wrong thing to do. What compiler / architecture / config? Because BUG() should have an "unreachable()", and the compiler should know that a return statement isn't needed (and adding it shouldn't make any difference). And it's not warning for me when I build that code. So I really think the real bug is entirely somewhere else, and this patch is papering over the real problem. Linus