Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1428021pxm; Sat, 26 Feb 2022 15:07:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJwo7gtQGK7X3HV54OQbJAhXXZoVYcOXiizxeMNvb5rkIvbVYQCR1Pt+P8r1iqTZrfy7wark X-Received: by 2002:a63:6201:0:b0:372:d3d1:a684 with SMTP id w1-20020a636201000000b00372d3d1a684mr11675762pgb.523.1645916845171; Sat, 26 Feb 2022 15:07:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645916845; cv=none; d=google.com; s=arc-20160816; b=kHnu7lLyz9dVEyd40EUKVhsLoRhpYEOd52eXkdcSpMqSIPNpBNEdxIrJA2sHf97dfG rV9ujcKX0rk9DYmGJrRF+B20kPCoLIJuXn61IzTCWzMyRUT/H3siydLK6v6VeVD2MVpb multGhuz6rI2yZ2AqZCev1YQLifJrDqXn3DB/AVVbNpgzk9/I0+9uuZa4HNAKFIxhP/z lypOfs+0gx4OeP0bX/vMvuL8V9vtz6YYZmzQLwFNjhVhblJaZn+Y9vyfA/mm5c1k+TKE 1HfYz6HPPRHFRyiAN3mva83j5T9+0BwojF0ErxIwZcLOxPTWEKl9hpjolN7erNmg5R+H SINQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=daxe4mwayP1bC/NxTK83bICRVcna++tD0VeU2H7bbus=; b=SeUguOwKuy1JLOO0QULcdVKuRTs4FQX3oDu7TUk7rkgylOBYneuFzK6V93yxBIhtRH yOU1UeOEbFd5SjiYhmgLR6VHogNHm/EgK4tqeUSUPHoeIxpfAxlLHh93Nlx3ZSNbALpB L7PwRiCrFnfynkVSdmbnlOr1bOwdZj0/rHES3dI9nuODWr2twSfsTzNEpyEQriRieVM6 L5fJhtoiRbZ6hnFi4VkyrXzWd+UDRXFd9dLl5H8HLMjsiCr/H9N9+7xTxCNLrTrZlbCw LnPs+NSRpCDi51y2AlXIoT01Hf7oZyDQHmd62kPS3hxdJUP/d8DNLL6BqvMdQajFLBKW 3QVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=KrhixWl4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id a9-20020a634d09000000b0037347480a76si5128411pgb.254.2022.02.26.15.07.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Feb 2022 15:07:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=KrhixWl4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E916B150427; Sat, 26 Feb 2022 15:03:37 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229949AbiBZXEJ (ORCPT + 99 others); Sat, 26 Feb 2022 18:04:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229940AbiBZXEG (ORCPT ); Sat, 26 Feb 2022 18:04:06 -0500 Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FB5311E3FB for ; Sat, 26 Feb 2022 15:03:29 -0800 (PST) Received: by mail-lj1-x22e.google.com with SMTP id r20so12345701ljj.1 for ; Sat, 26 Feb 2022 15:03:29 -0800 (PST) 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; bh=daxe4mwayP1bC/NxTK83bICRVcna++tD0VeU2H7bbus=; b=KrhixWl4niB53PuH6P7XtpHqxN4ASGoWFyUrFkHE15y2mxuI1jWmYiwvEVAXFwsx98 xed5uehYbrmLVtWAe6Maz5Dcl0bm9FKqWQbYbaRWzLIhSXpzjQjfdvv3QSX6A5HSkDwY jMq+tM7tuV3LPlQ+6TD7pOOUh29ygcOzUTzYw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=daxe4mwayP1bC/NxTK83bICRVcna++tD0VeU2H7bbus=; b=Sd4daFD6r84jQuomRJ4X7rKvizSu2D7/kKCLmOONwvCgr5lm88hnXYqUf+ODFppqye s7OsjQW73kncGEMV1DKJU4ZKGY7UGP373se1iEFEReHg/kOmnxKG55gjVDXhKZ/lDqLX FGnCNHUCVv24JnJktr8TlGdkeSkkRaheN24ILYgMkXvhwxCLHdrb2vs+2MM8kK4IWOkC fHfsyKYyARk6hoHDyCgfNvNhZrhAA6B+I+IlG7mkaxnHJMNzhdIFSXnSNKO/+a8d+eXe Wi76UbyuXwHD1f+BWD+7V6bQm6FUJ4i7vJt/YwnbufjdzDwTqg/bYO2a6eBFitEQsv1O n9lw== X-Gm-Message-State: AOAM532G6IKi5hho7CUK6FcL/7uASkn5cn+htx5KBmdwnYnBiBIPJy5/ Bk09Wr3KMTgsnKztic+XmhtdaBf8FfOMrQ== X-Received: by 2002:a2e:8497:0:b0:241:507e:52d6 with SMTP id b23-20020a2e8497000000b00241507e52d6mr9724479ljh.441.1645916607427; Sat, 26 Feb 2022 15:03:27 -0800 (PST) Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com. [209.85.208.180]) by smtp.gmail.com with ESMTPSA id k5-20020a2e6f05000000b00245de81bb0esm709354ljc.13.2022.02.26.15.03.26 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 15:03:26 -0800 (PST) Received: by mail-lj1-f180.google.com with SMTP id 29so12276172ljv.10 for ; Sat, 26 Feb 2022 15:03:26 -0800 (PST) X-Received: by 2002:a2e:b8cc:0:b0:246:4767:7a29 with SMTP id s12-20020a2eb8cc000000b0024647677a29mr9788910ljp.152.1645916606102; Sat, 26 Feb 2022 15:03:26 -0800 (PST) MIME-Version: 1.0 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> In-Reply-To: From: Linus Torvalds Date: Sat, 26 Feb 2022 15:03:09 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH 03/13] usb: remove the usage of the list iterator after the loop To: Arnd Bergmann Cc: Segher Boessenkool , 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." Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Sat, Feb 26, 2022 at 2:14 PM Arnd Bergmann wrote: > > Could gcc follow the clang behavior then and skip the warning and > sanitizer for this case when -fno-strict-overflow or -fwrapv are used? Well, for the kernel, that horse has already left the barn, and we'd have to use -Wno-shift-negative-value anyway. But yes, from a sanity standpoint, it would be good to shut that warning up automatically if compiling for a 2's complement machine (ie "all of them") with -fwrapv. Considering that gcc doesn't support any non-2's-complement machines anyway afaik, and that the C standards people are also fixing the standard, and gcc has never done anything odd in this area in the first place, I think the warning is probably best removed entirely. But we'll have to do it manually for the existing situation. Linus