Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp2338339pxm; Sun, 27 Feb 2022 18:40:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJysQIjO0KyojKftXhTz6QIcynpRL4IT7nP7tPVzCK2iMbFiIOOZ773ottfJmIozg4Bw3P8n X-Received: by 2002:a17:90a:588c:b0:1b8:91a6:6cdf with SMTP id j12-20020a17090a588c00b001b891a66cdfmr14501261pji.239.1646016058462; Sun, 27 Feb 2022 18:40:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646016058; cv=none; d=google.com; s=arc-20160816; b=dPQD1MZthGjkIcEulj8J8Rqed+kGJy7RtF/dRgSlk2jEzalHnb+iHpctR4VcyEgwNr 0bA7rEaEhKFCd6KhHbaihwz3LtiZ30rvhcJh+q+vNsQ5M2F/rIsgiIXsDG3JZEcVtXg2 2OQx/BUyX0ewYJzkTV9tb3w4giczLU9eXed62DJ16zQRRSTMwpUpj1N7qib69+I+q5mj wrzisNt6XCYsWSQo0S8pJoRilTHtmj2Y7KUVzKdCQvjrEgX/aq2lJYwDoWJuHkFRZF7F 4DkScGPfEv/IGOKsT5lyrDD/V+7pW4Djn3tPsYiyDzFOk5oxLmYSSUqb+4wD99prT3WD nDqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=FhoJ2jQ8X7uwPKS7BY2iMQqbwFDXGwZUbc5p0zmOte0=; b=jFvYScoynBi2UT1V/GYyNF87E+hrg+/fy0P9s9s7xJjVvApXZ/krk1H05OVXjYPNgb zPP990eqZem22C7dCSvfawa4f5Q3OsERaZGndyJhLR0DH6SPKnrdKcyHyR9Z2vh9rlay FC+z+jLUYvJMzMmijpUjjJWKPnt4fGaXLZO6WgZoYWT6i89bBxhU4JewXClrb5G9Z84E 0VHp2x+u4p+nJ39ptcJjQH/QqEmhGmK4GHziTuDtaSdZttPry7sQq+yMvKgjzuueOBV0 3vVTauwPLaacsEoUZgvbc11O6TP1uWT4STwx+2g5OGX+J0fm0djqJ5yXuM06yMcivsmD UvIw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d8-20020a633608000000b00372c757c56csi8383712pga.273.2022.02.27.18.40.43; Sun, 27 Feb 2022 18:40:58 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232124AbiB0Wtz (ORCPT + 99 others); Sun, 27 Feb 2022 17:49:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232118AbiB0Wtz (ORCPT ); Sun, 27 Feb 2022 17:49:55 -0500 Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6025B5A080; Sun, 27 Feb 2022 14:49:17 -0800 (PST) Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 21RMhqmu022704; Sun, 27 Feb 2022 16:43:53 -0600 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 21RMhqks022703; Sun, 27 Feb 2022 16:43:52 -0600 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Sun, 27 Feb 2022 16:43:52 -0600 From: Segher Boessenkool To: Arnd Bergmann Cc: Linus Torvalds , Jakob , Linux Kernel Mailing List , linux-arch , Greg Kroah-Hartman , Thomas Gleixner , Andy Shevchenko , Andrew Morton , Kees Cook , Mike Rapoport , "Gustavo A. R. Silva" , Brian Johannesmeyer , Cristiano Giuffrida , "Bos, H.J." Subject: Re: [RFC PATCH 03/13] usb: remove the usage of the list iterator after the loop Message-ID: <20220227224352.GA614@gate.crashing.org> References: <20220217184829.1991035-1-jakobkoschel@gmail.com> <20220217184829.1991035-4-jakobkoschel@gmail.com> <6DFD3D91-B82C-469C-8771-860C09BD8623@gmail.com> <20220226124249.GU614@gate.crashing.org> <20220227010956.GW614@gate.crashing.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, 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 Sun, Feb 27, 2022 at 10:28:41PM +0100, Arnd Bergmann wrote: > On Sun, Feb 27, 2022 at 2:09 AM Segher Boessenkool > wrote: > > > > So imo we should just never do this by default, not just if the nasty > > -fwrapv or nastier -fno-strict-overflow is used, just like we suggest > > in our own documentation. The only valid reason -Wshift-negative-value > > is in -Wextra is it warns for situations that always are undefined > > behaviour (even if not in GCC). > > Ok, I just realized that this is specific to the i915 driver because > that, unlike > most of the kernel builds with -Wextra by default. -Wextra is enabled when > users ask for a 'make W=1' build in linux, and i915 is one of just three > drivers that enable an equivalent set of warnings, the other ones > being greybus and btrfs. > > This means to work around the extra warnings, we also just need to disable > it in the W=1 part of scripts/Makefile.extrawarn, as well as the three drivers > that copy those options, but not the default warnings that don't include them. Ah good, all of the workaround in one simple place, neat. > > Could you open a GCC PR for this? The current situation is quite > > suboptimal, and what we document as our implementation choice is much > > more useful! > > I hope I managed to capture the issue in > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104711 That looks fine. Thank you! (I attached the testcase to the bug itself, we prefer it that way, maybe godbolt will go away some day, who knows.) Segher