Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1045582pxm; Wed, 23 Feb 2022 16:44:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJw3O1IBQJ+7pEx8I/UKjFrwVy89GKhOMUm+z7xNEywY9/GypboPa4d39RuGh1xC7F2ejAZo X-Received: by 2002:a63:be0c:0:b0:373:9f38:928e with SMTP id l12-20020a63be0c000000b003739f38928emr298162pgf.241.1645663480440; Wed, 23 Feb 2022 16:44:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645663480; cv=none; d=google.com; s=arc-20160816; b=00bo/Sy/22feR5QGrNRU8jexYgHng+fuoPIyKAwpjJ5yXEWVmIW7HCgkPcRXVfaP1J Gw5k0+ucwO63HCch57I70/A44C2O+e6xMmwxbazyP9j3c+PLw4qHNmCrIlI+qBCvoq9w O6sTglznzbstlsTSlZg8f1gLwlw7w67zhSB/zRb9LDlE0Yz6V6NqJLySyYCqx+ZLje7s KBpm77HacDbXO8VCuiTcwnlTg/cVo9KP2kW2ZK42NqgKLI0SWIHv10O19EX77KtinqBi R4GgxBh6Ya0x/DbMPkIxaxxLzTf7vjqR/2y2MPS79fQM0gao/Qwn+38/vidUp16wNp1Z +pjA== 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; bh=5FNr55rH9XOREiEBySxpOYX8vJqCvc+wZgV/mhf3pGI=; b=BDbfbnyL2ALmxGXhQ5I+R8J+AFPq2KHmb/5+DtkHarYkTWqBquuVe6/tJgQuu4/Gzu 6Rc0rxnYQorHkumn2Rcnxr/0gtVgnw3ZhG3/vkoMHesMCZu0QbdleWCwRCQtlYb+8lSO F1LzyD+vnzJhIuceVYCnZdqUMQjuRycSbz6q1o7dJrQKtJPwXa3RpysA6cHr4TvHGtlE bNsRD4CjShuyUIcPrf4LE5e2wnrXm5YqW1IPUpFbNs/vAM+1pF1m5kQTzkVuiS1VwexY 3ETiPWokpj6MoJyT17ws3P29mDuQURPnZUaqp6omInD1clH1/5wPnY/Oc8G9TN4N/K6B JwjA== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id bm10si1305817pgb.28.2022.02.23.16.44.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 16:44:40 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 30447D007E; Wed, 23 Feb 2022 16:41:30 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242479AbiBWVwk (ORCPT + 99 others); Wed, 23 Feb 2022 16:52:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233941AbiBWVwi (ORCPT ); Wed, 23 Feb 2022 16:52:38 -0500 Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.73]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DBF533C4B9; Wed, 23 Feb 2022 13:52:07 -0800 (PST) Received: from mail-ej1-f51.google.com ([209.85.218.51]) by mrelayeu.kundenserver.de (mreue109 [213.165.67.113]) with ESMTPSA (Nemesis) id 1Mc02T-1nwrnu3KHv-00da4O; Wed, 23 Feb 2022 22:52:05 +0100 Received: by mail-ej1-f51.google.com with SMTP id r13so249489ejd.5; Wed, 23 Feb 2022 13:52:05 -0800 (PST) X-Gm-Message-State: AOAM5308jvEXhpKL/w+dlKOqx/PFZZgd5JfDS6c5Bk8AtLsATnuuPNun FTUsSC+jEyRTsxcmRagkzksfRbiAM3ocICNcygA= X-Received: by 2002:a5d:59aa:0:b0:1ed:9f45:c2ff with SMTP id p10-20020a5d59aa000000b001ed9f45c2ffmr1035641wrr.192.1645649355189; Wed, 23 Feb 2022 12:49:15 -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: Arnd Bergmann Date: Wed, 23 Feb 2022 21:48:59 +0100 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: Linus Torvalds Cc: Arnd Bergmann , 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." , Nathan Chancellor Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:cjkUysxlJscg26BdLEqvQDwPBkRPWuqIBWReqtQZ15RnMmjfj5A FReQE+scpfMJKfK1nSKyO3B+N6OnxYFTXnwyAGB2Eobvu65WBoTlkEx+RaGqyBuqmR2p2vV yt/yJUMtHyZBsuwj2WOWK7cq4UvbcFFPdKOLJimz3wd3kC8J5tiqJYItu3+WU41vGpRkQe8 4AKDYq3OmeMc1vKbCm/pQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:3MLiFAkrs2E=:9Tf5B1NU3+YtBT74Jx1q64 +JNlxJdngVHLKPENxJcTq5Wy3AYtzwF4uAUGLkZluOndrX+1cQMcH770BO+fVqcqBO26KxcPT wyTqxnko6GWoBQTzIL9OPjmZOQvb+TK9bc4KZOoR4AA+OI3eHfw44TcIeHBxcKH+rg5L6j08Z byvTUW/r0foAa9S7xniGGPclGJbRAo9Rt65aRhepIR3u6cX+nBC8EGEwYbULFBSY47bjs8Tu4 Nsftv/BOYuHaqOg5JZ9lw5GIcPpE/2TJAtJFej3Qo9qrQ/lgPE5/NL9nIK05Mdh2dwRso5NeS oS0lMKJlef/2jlC3KpDLdHS1l8Eh5SFjHbih8rO+PPz/bZBNgmgpbLQl4RbWZsrJK8yBgGZVz I+/kUp4XoILQjQus/654TzbeXD3gmbAQg7zSp90wnSwAu4IfRFQi2eexMSRXXwLDrBYimTxlf CD3P9+peR8lw56EoUky+dIpS65Rk5st8cXXx5toWhkRQsS3kAo1a6xfr5K0Pk2HQWQ3nAdT4A PT2cUspSW+Xy6SjqBHqGHhsFsaCqhURKoy+m85RfsYlyk1vsRdxek4MEKeoCvMAoEf0huRxsh 4ipSZexpkrm2sa7rSwN1Rp0OQ0UEYleXjlooqO543a0xxEyZNXWcgP+STje3pD8NSplL27It5 9t4EEUaO8LNjPNZrEIO0sioyXo/A+nVLBsjPas7XBp/0JEYV5buwvjqWF5TjDZAj50ZoO3krV l2YIuoYkD7ntHXD3AmN/5O2kzuQQLQ75/dE17re9G0hm9RC0vpflONqoAyocfXoY+NtFEvsuf JkpUxd7y1Nqo6vDBmavUOSrAJdldpeQXFmdSlq6SGH7U61Anp4= X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, 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 9:43 PM Linus Torvalds wrote: > > 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. Yes, I think that is correct. > Of course, maybe we need to make -Wno-shift-negative-value be > conditional on the compiler supporting it in the first place? I think they all do. I discussed this with Nathan Chancellor on IRC, to see what clang does, and he points out that the warning was made conditional on -fwrapv there a while ago: https://github.com/llvm/llvm-project/commit/59802321785b4b9fc31b10456c62ba3a06d3a631 So the normal behavior on clang is to always warn about it, but since we explicitly ask for sane signed integer behavior, it doesn't warn for the kernel. Arnd