Received: by 2002:a05:6504:1d0:b0:1de:de76:8684 with SMTP id e16csp900577ltn; Fri, 2 Sep 2022 09:55:13 -0700 (PDT) X-Google-Smtp-Source: AA6agR7HPLBHax4xHFAzMZ543GibrBwuxXBPa/E0tqD5a5RRz2Tz1eYOcCz6ZQRVtOnn0b8S+0tg X-Received: by 2002:a05:6402:26c6:b0:448:658e:5b32 with SMTP id x6-20020a05640226c600b00448658e5b32mr22421164edd.250.1662137713085; Fri, 02 Sep 2022 09:55:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662137713; cv=none; d=google.com; s=arc-20160816; b=d5wm/WUDNU34WUDo+Hc21kqmM21HM+f+d6RxVxPmFf7b5SlpErXNEF4U4dTe4Rd9G0 EghSbv88aai0MOlfDZ7Q2SBXpCVy0gHG2pq6t/JoztKRFzUApTCN+OXsP60M4yQv9W4g A/vPpWEIUz1poEZ1m7mNP5SSOQUbEzWz6SoeDsMhV/Wyyn6IEs59JhIlBP2xEENp8wcT 5k0wbK28REXMW+hv+msVte2k68WjfKspkqVqNVzY+5UPadqZfPQxWI0w60C0yhjIUlVM 1q5x+F68tOAySFviIGPrnHvPYgCNwqHyd+vWOJK6JhqQGbRJTz/CoSV7mo619dwLUkVz yVUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=5tOgC3tMb/3prbNKVpeRcLW8LDtMETk9pwmouZtUaOw=; b=JQZp5mMarVenWdUwLBiIQgzcgP15HBtiKV66Xuc+mFSQaB9tMtcwzYv/abEAQL+LBL FAUWI4/yVjIRzMSFEyu5ZFM10GIUoP52N5jcJcB7obz9MQHPWEu724vEw+ElCbkfaLyd 9qj+AtFqP2pNvwHiCXUsKSyrw0O2ahoQrtCf75S/cHUlqdcSadujr9gfcfx2ebKb2snU 90JYaJSWyqTO3DQNtDdOek+Fw0Uh9MY3bKCwFdMNUN5X18xEAItPRnJ+zEBKX1AlDAQg hZV0Xx4PH9O+570ygEXVI6N6l2i5sQv8eXYINoMa4fVMkLYzNxOD+eoWm2jT1p9x+hYX 5XgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GkQbfUn6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y100-20020a50bb6d000000b0043d15f43ab2si1885530ede.580.2022.09.02.09.54.47; Fri, 02 Sep 2022 09:55:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GkQbfUn6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236453AbiIBQPg (ORCPT + 99 others); Fri, 2 Sep 2022 12:15:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237021AbiIBQPC (ORCPT ); Fri, 2 Sep 2022 12:15:02 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1060A117AE6 for ; Fri, 2 Sep 2022 09:11:53 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 70F13B82C7D for ; Fri, 2 Sep 2022 16:11:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C3679C433D6; Fri, 2 Sep 2022 16:11:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662135110; bh=Z+r+C0wXesNeSLz5e3UJqk59d7HBkCsYfjmU8Ig94Nc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GkQbfUn6XOZBr8nDbP6jSghq2ziGVbFCURz1EP8SImFQb0gGum6nav+0oCXZD7ca4 BiYWRgLJZyzHWkTYBOiZte3KsKNZWIaY7JHIgPbUTs39A/svAaTh534v3gZNz3dTpU qcNBiQKyrHWmUFRJXjg5x06pHGiz0vbgXZLq03Kp8fpdRNRmnY1JlsRjNcipWw8zvC ZlboecCfQFKHa5Mo57dBxwMIfOMQb8sbBwobndKOSFII3YyfG4RmjA95dFR3ekTbnC ZDAck3yQCQmVYQ1lyvVjRxls+MRvckUZzmxlE5Lo1Iu6oo7fzaAQkCK9gn9I6CLAVJ Moit4HTADimIA== Date: Fri, 2 Sep 2022 09:11:48 -0700 From: Nathan Chancellor To: Segher Boessenkool Cc: Christophe Leroy , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Nicholas Piggin Subject: Re: [PATCH v2 2/2] powerpc/math-emu: Remove -w build flag and fix warnings Message-ID: References: <35c86b7ca823954c6cd593acc3690dc3748da9b1.1662113301.git.christophe.leroy@csgroup.eu> <20220902155954.GP25951@gate.crashing.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220902155954.GP25951@gate.crashing.org> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 02, 2022 at 10:59:54AM -0500, Segher Boessenkool wrote: > On Fri, Sep 02, 2022 at 08:37:23AM -0700, Nathan Chancellor wrote: > > On Fri, Sep 02, 2022 at 12:08:55PM +0200, Christophe Leroy wrote: > > > This should have been detected by gcc at build time, but due to > > > '-w' flag it went undetected. > > > > > > Removing that flag leads to many warnings hence errors. > > > Thanks for figuring out what was going on here! I took this patch for a > > spin with clang and it has a few more errors around > > -Wimplicit-fallthrough: > > Maybe add -Wno-implicit-fallthrough? This code is a copy from outside > the kernel, no one has ever wanted to maintain it, if nothing else (the > more politically correct formulation is "we cannot as easily pick up > improvements from upstream if we modify stuff"). Sure, we could do something like this if you preferred: diff --git a/arch/powerpc/math-emu/Makefile b/arch/powerpc/math-emu/Makefile index 26fef2e5672e..ed775747a2a5 100644 --- a/arch/powerpc/math-emu/Makefile +++ b/arch/powerpc/math-emu/Makefile @@ -16,3 +16,7 @@ obj-$(CONFIG_SPE) += math_efp.o CFLAGS_fabs.o = -fno-builtin-fabs CFLAGS_math.o = -fno-builtin-fabs + +ifdef CONFIG_CC_IS_CLANG +ccflags-remove-y := $(CONFIG_CC_IMPLICIT_FALLTHROUGH) +endif At the same time, I see other modifications to these files that appear to be for the kernel only so I suspect that this is already in the "we cannot as easily pick up improvements from upstream" category, regardless of that diff. No strong opinion from me, although I see Christophe already included my suggestion in the most recent series: https://lore.kernel.org/2663961738a46073713786d4efeb53100ca156e7.1662134272.git.christophe.leroy@csgroup.eu/ Cheers, Nathan