Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1054990pxm; Wed, 23 Feb 2022 16:59:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJzDiBm3+pq2NAmd1lbg0+xO7Cin+BA+Qj21UAKgL5LqZLiMJPlFGsUceSo9PJQXjMKA8HUx X-Received: by 2002:a05:6a00:140b:b0:4e1:2cbd:30ba with SMTP id l11-20020a056a00140b00b004e12cbd30bamr382058pfu.46.1645664396611; Wed, 23 Feb 2022 16:59:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645664396; cv=none; d=google.com; s=arc-20160816; b=ux2D9N0yjnNtV8VJKOBSQOy/Ir+gretRsKip1gFvutRFPqGvgmfQc2+KcySdbjarNy V/oe6Ekv72GgGcmVNqRbrHwtEKHSHep66ISljPIdR9QpX/IF7oM14DF+bXN45vUKR8/Q 5mRnUi1Cb46MECK/KjIeFdAcjntHKTkMcW/3TPlsVdQVINGKMsLZqosnuowqXWxRSkD6 FveHeoY2HC1gi88HHmfVR8+nWTC3s86C3nRQO7wPCfe8AXcsMcPJok85y3uFWvecXu/j JAVlktTVay7WwwQaJrH9zyeNJkyGxYtzUhnD3jr5wTlAGLFs2Z7+cyShBNSYNy9lhM5o lsKQ== 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=ToP7+u5TAIA1n+un4iO9944/Fjm/9qjoDI5PHB1SdbA=; b=tUgpNo9JTeaxX6lsb0oNaCqi+K4npElkUUq3W7CLwTf3zUJ9GBgHgpuDGAX2CZqRZO Qaeg1n9W9NwpMvk8mGnjQwmV3EBsWnLmnO9pR8eClzjEOFObQBbBctOjK1gYmbx8gjjC B6EtGd6rQUS3ffgzIbAtcPXK5/r6/arahcKo9n+OEVRKxUSaM5ii6DNq4+kdGKOkNxwn 07Dptjn/pZuUB63H7UC6jJtKEEk+s0H1zBu4+0BtaqCuSIyzUId8BlqAyzpkMw9xRqdS ePHSirXrf9Ih3ZL7tULHBKcUC5z6YQZvn/oO0cnID/pnYfrk9AQ8rulHGuPtwUOm4k3b OZrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=K1sL+JK8; 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 g5si1217007pfj.186.2022.02.23.16.59.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 16:59:56 -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=K1sL+JK8; 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 DFE0FD109F; Wed, 23 Feb 2022 16:51:32 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241725AbiBWUue (ORCPT + 99 others); Wed, 23 Feb 2022 15:50:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241714AbiBWUub (ORCPT ); Wed, 23 Feb 2022 15:50:31 -0500 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CF534DF62 for ; Wed, 23 Feb 2022 12:50:02 -0800 (PST) Received: by mail-ej1-x62f.google.com with SMTP id p14so54892473ejf.11 for ; Wed, 23 Feb 2022 12:50:02 -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=ToP7+u5TAIA1n+un4iO9944/Fjm/9qjoDI5PHB1SdbA=; b=K1sL+JK8G+5oEKb2E8fAwrSR5os84QIowAVzA3JAWOyiezYS97zbR3Od2bvOKCG/Ya kHJfrEiaMRcfMYUW2C/o5y0GvbP0W+EtqpZMZu8JEGyXGRnTf4DiKlI5Ivwjvx0CXlKh ANHqMVyaiR6CAY08j4pgEDEV47Qvbzqi34tlQ= 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=ToP7+u5TAIA1n+un4iO9944/Fjm/9qjoDI5PHB1SdbA=; b=nQupqDkl+FlREn5k+XupMSRhhjWkdXYpOTeoFFhYAtZYjGyl3I0IqgKn2exfd53FCU slDe9LE0yipaGAWA7t88v2OV3qJWkInuKor2iUKBryzyPTdWZ3ZUi8mxrmugs62DIIGE LEX+vDQr80kyXeg6wv+PfglF3jdGnbzMi2MPtSMyWxDbvZbfuJwQoX3MLxf0Lg76OQFv U0ZUrQh17VwLP+tki1VC8jTh7QwXCx+qbZXnqpQAjtPKREiIGBoh7beRWMxcBz7WgYP5 OwsjtMo8KUmv9CjtTqqWMiJT+hAJ8fQlSwy/fh/O9WxW8Q83f85TX3gZ79Uj001WpZK4 t9eA== X-Gm-Message-State: AOAM533o3AfNLw5bXwfzTwD1BbkouNY3ASPgDeXbrD6E08/6apFoPp8H 8ovXLnI6qv9xfjRYtko5YKLtk1Tov79FgDJbp7I= X-Received: by 2002:a17:906:b248:b0:6ce:556:52bd with SMTP id ce8-20020a170906b24800b006ce055652bdmr1093698ejb.479.1645649400816; Wed, 23 Feb 2022 12:50:00 -0800 (PST) Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com. [209.85.221.45]) by smtp.gmail.com with ESMTPSA id 27sm309169eji.66.2022.02.23.12.50.00 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 23 Feb 2022 12:50:00 -0800 (PST) Received: by mail-wr1-f45.google.com with SMTP id o4so4815521wrf.3 for ; Wed, 23 Feb 2022 12:50:00 -0800 (PST) X-Received: by 2002:a2e:bc17:0:b0:246:32b7:464 with SMTP id b23-20020a2ebc17000000b0024632b70464mr792954ljf.506.1645649006967; Wed, 23 Feb 2022 12:43: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> In-Reply-To: From: Linus Torvalds Date: Wed, 23 Feb 2022 12:43:10 -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: 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 Wed, Feb 23, 2022 at 12:25 PM Arnd Bergmann wrote: > > I looked at the gcc documentation for this flag, and it tells me that > it's default-enabled for std=c99 or higher. Turning it on for --std=gnu89 > shows the same warning, so at least it doesn't sound like the actual > behavior changed, only the warning output. clang does not warn > for this code at all, regardless of the --std= flag. Ok, so we should be able to basically convert '--std=gnu89' into '--std=gnu11 -Wno-shift-negative-value' with no expected change of behavior. Of course, maybe we need to make -Wno-shift-negative-value be conditional on the compiler supporting it in the first place? I really would love to finally move forward on this, considering that it's been brewing for many many years. I think the loop iterators are the biggest user-visible thing, but there might be others. And some googling seems to show that the reason for -Wshift-negative-value is that with C99 the semantics changed for targets that weren't two's complement. We *really* don't care. Of course, the C standard being the bunch of incompetents they are, they in the process apparently made left-shifts undefined (rather than implementation-defined). Christ, they keep on making the same mistakes over and over. What was the definition of insanity again? Linus