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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no 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 BBED6C433ED for ; Thu, 20 May 2021 07:37:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9A9F660FE5 for ; Thu, 20 May 2021 07:37:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9A9F660FE5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 09B3F6B006C; Thu, 20 May 2021 03:37:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 074BD6B006E; Thu, 20 May 2021 03:37:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E551A6B0070; Thu, 20 May 2021 03:37:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0086.hostedemail.com [216.40.44.86]) by kanga.kvack.org (Postfix) with ESMTP id B50E46B006C for ; Thu, 20 May 2021 03:37:31 -0400 (EDT) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 4856BAF70 for ; Thu, 20 May 2021 07:37:31 +0000 (UTC) X-FDA: 78160804302.14.82B5705 Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) by imf30.hostedemail.com (Postfix) with ESMTP id 672ADE0001AC for ; Thu, 20 May 2021 07:37:29 +0000 (UTC) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4Fm1m53cSsz9sTD; Thu, 20 May 2021 17:37:24 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1621496246; bh=YNXG/fdEW6nOHmkEz2qCjN8pOuAjRqPCQKPeccBNqi0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=E2NI0V8gMrs+8omD0srVpFZyvRCj0GIp2sLRuLZWAyDWo0my2IIWqmITIQVq3fQ62 VMg03LiTgDTQRxDMOvP1QNks5ahwUfv2UskTcqFutkHQAfHl64sKmq2OGrBeq95aiK Bm5pWR6uSSu+VWe3P3FCDMsAzRkNy/67oxdzkoVeN8ngQb0Gt7hLrF2tdOtT2lpcRZ T7XMkJ07GHIwLr6xNdQa04xT8VtMR/mZs3V4iog8qHkR6ZQY3LykPey6viZfHARDUE xlaRLTKKw2vGHZgKvlPXZg8DEFRWkuM0kovL8NlLiAr4kMo9t5KvEyPjk8YLdeECOg ky02tUlUBIiOw== From: Michael Ellerman To: Segher Boessenkool Cc: "Aneesh Kumar K.V" , npiggin@gmail.com, linux-mm@kvack.org, kaleshsingh@google.com, joel@joelfernandes.org, akpm@linux-foundation.org, linuxppc-dev@lists.ozlabs.org, Guenter Roeck Subject: Re: [PATCH v5 5/9] powerpc/mm/book3s64: Update tlb flush routines to take a page walk cache flush argument In-Reply-To: <20210519120306.GD10366@gate.crashing.org> References: <20210422054323.150993-1-aneesh.kumar@linux.ibm.com> <20210422054323.150993-6-aneesh.kumar@linux.ibm.com> <20210515163525.GA1106462@roeck-us.net> <87pmxpqxb1.fsf@linux.ibm.com> <87a6ork1qp.fsf@mpe.ellerman.id.au> <20210519004514.GC10366@gate.crashing.org> <20210519120306.GD10366@gate.crashing.org> Date: Thu, 20 May 2021 17:37:20 +1000 Message-ID: <87y2c9j1ov.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=ellerman.id.au header.s=201909 header.b=E2NI0V8g; dmarc=none; spf=pass (imf30.hostedemail.com: domain of mpe@ellerman.id.au designates 203.11.71.1 as permitted sender) smtp.mailfrom=mpe@ellerman.id.au X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 672ADE0001AC X-Stat-Signature: aorj1iujdiznxdp5ypfiaqohhhc4w4n7 X-HE-Tag: 1621496249-801454 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Segher Boessenkool writes: > On Tue, May 18, 2021 at 07:45:14PM -0500, Segher Boessenkool wrote: >> On Wed, May 19, 2021 at 10:26:22AM +1000, Michael Ellerman wrote: >> > Guenter Roeck writes: >> > > Ah, sorry. I wasn't aware that the following is valid C code >> > > >> > > void f1() >> > > { >> > > return f2(); >> > > ^^^^^^ >> > > } >> > > >> > > as long as f2() is void as well. Confusing, but we live and learn. >> > >> > It might be valid, but it's still bad IMHO. >> > >> > It's confusing to readers, and serves no useful purpose. >> >> And it actually explicitly is undefined behaviour in C90 already >> (3.6.6.4 in C90, 6.8.6.4 in C99 and later). We use gnu89, which presumably does not make it UB. > ... but there is a GCC extension that allows this by default: > > For C only, warn about a 'return' statement with an expression in a > function whose return type is 'void', unless the expression type is > also 'void'. As a GNU extension, the latter case is accepted > without a warning unless '-Wpedantic' is used. There's no chance we'll ever enable -Wpedantic, so I guess it's allowed for practical purposes. I guess clang must accept it too or we'd be seeing warnings from it. cheers