From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9F0BEC433F5 for ; Sun, 27 Feb 2022 23:59:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=pgyX+i+Xh4kBf1e3M2jlQIo9n5zsjanRMkW36VuEPgQ=; b=xzn1nI2S2jqsK8 MWi9oqPxXpEk0RWrb46rbkMaS11x278v5Pe3f3t6ZaV8m+YKWxKPFPBDKt3eCsCP9xMN3esWxAuUo 9B2d8XncKLTei9zRu66AJULdoqhPpFNsiLqRacjfhnE6onoMtoFT8C9TEZROwQzJ/Pnl+qLXJtZRz xFQr14SxeJlYEHpxeP8gxr+ebJmPGYZ835Bd70mNMJj6dC3hmJtZcD+h0v+8BWZGnPLV1HzKMbEhn q3tgqGwNDALTEo8jLH99PNDfX4diZfy3q+fxGAmWtwOGgqbOyIy3DTP6LCb9L7LduT0H5elD12SiF TFi4MBi4RoCpn+WMlY0w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nOTQN-00ALnM-Kw; Sun, 27 Feb 2022 23:57:59 +0000 Received: from mail-io1-xd30.google.com ([2607:f8b0:4864:20::d30]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nOTQK-00ALmp-93 for linux-arm-kernel@lists.infradead.org; Sun, 27 Feb 2022 23:57:57 +0000 Received: by mail-io1-xd30.google.com with SMTP id q8so13034226iod.2 for ; Sun, 27 Feb 2022 15:57:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=TYixXH/oSVNIYPjWy8IDeErfQMBt7NeciGEbuByoJUQ=; b=VA7Y7/hwNTpAG0EJBvjzNcqWEEoLvSuaQCNj01nO45OyMQcgooOoCeTcGzsvRipjXT GR51Exj8tHYQvvBj7rj4BWHnSURg64uycJzHdUCB+hGxEtEhlwx2pPdKlhw0XhHwjAE/ I4bLKsSa7ST5UvIHRTX2rxKh1qtw9ZBdmZ77wJDCw6OPEltA1/Pz2/7JbQRL0duYZ4ct a7VUK+N8cmAKsjrWIe0Rajg2EbIFsIgRyubHIXT65zHok28ikdqymV+/J+ecIosK77WB vpTaCXz61HY+ci7o/cRo3ZW5ylwVRVT+7wiyD0oTOFySlCVCR7thfpDnSjzQN84bD+HM seNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=TYixXH/oSVNIYPjWy8IDeErfQMBt7NeciGEbuByoJUQ=; b=GnnIsC8lY8e6pSCcgMjaX7GAs65ZMg8ntV0f2De43rpICNh4Z8t10HO1DrUiaCLEmw U/DtynJCublMb8bLeDi+C56nyIZ6CMwCdc8Tw5UV7t1BZgQWFZTRhfDDc/wk2aGWbNMd dwsQuF3sWw00pU4CduLsx5h967iCD6NPuBT03uwM9fm8+Wje/vlMq6LFzDlPjr5KAGya WtIn5uF6Pt2cC/KfmJ/Jd5CLykcUWQ8lrTSI7fDIss+jH+0wEPy/YnxsoAJr3+0uPmYD zwiOBhSTmph4ih/pwT6qVSq0lIQR+hvwRBI0A1jZfhOcISv9htOBJ9deNRP6Kp9W4QvJ hGgg== X-Gm-Message-State: AOAM532kIZ3Tngc9Ib4tLPSpsim3XcHBYKb3I4ZqStT03gaK4mNd3YEL AL7XcZ6WrpszsfHzjrFdkacxtuLu1hX7W/rf X-Google-Smtp-Source: ABdhPJyPtYXXq4eTx/zm7hkEn1uc7x7ywQuCdrH5tLSdhR5RU9smY5dt5X0iXebRMULNf0pZ7UBpzA== X-Received: by 2002:a02:c64e:0:b0:311:b1b4:1a08 with SMTP id k14-20020a02c64e000000b00311b1b41a08mr14572997jan.230.1646006275352; Sun, 27 Feb 2022 15:57:55 -0800 (PST) Received: from [172.22.22.26] (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.googlemail.com with ESMTPSA id n7-20020a056602340700b006409737fa99sm5093280ioz.27.2022.02.27.15.57.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Feb 2022 15:57:54 -0800 (PST) Message-ID: <72ff1b04-4f37-9851-a6e6-aded72b46c83@linaro.org> Date: Sun, 27 Feb 2022 17:57:52 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [greybus-dev] [PATCH] Kbuild: remove -std=gnu89 from compiler arguments Content-Language: en-US To: Linus Torvalds Cc: Arnd Bergmann , Linux Kbuild mailing list , Arnd Bergmann , Masahiro Yamada , llvm@lists.linux.dev, Jonathan Corbet , Federico Vaga , Alex Shi , Hu Haowen , Michal Marek , Nick Desaulniers , "open list:DOCUMENTATION" , Linux Kernel Mailing List , linux-doc-tw-discuss@lists.sourceforge.net, Linux ARM , intel-gfx , dri-devel , greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev, linux-btrfs References: <20220227215408.3180023-1-arnd@kernel.org> From: Alex Elder In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220227_155756_385638_211C5749 X-CRM114-Status: GOOD ( 19.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2/27/22 5:11 PM, Linus Torvalds wrote: > On Sun, Feb 27, 2022 at 3:04 PM Alex Elder wrote: >> >> Glancing at the Greybus code, I don't believe there's any >> reason it needs to shift a negative value. Such warnings >> could be fixed by making certain variables unsigned, for >> example. > > As mentioned in the original thread, making things unsigned actually > is likely to introduce bugs and make things worse. Understood. What I meant is that the shifts were producing single-bit masks from plain int values that range from 0 to 10 or something (in a for loop). Looking again though, that it's not so simple. Regardless, your point about the warning is good and I won't plan to "fix" this. Thanks. -Alex > > The warning is simply bogus, and the fact that it was enabled by > -Wextra in gcc for std=gnu99 and up was a mistake that looks likely to > be fixed in gcc. > > So don't try to "fix" the code to make any possible warnings go away. > You may just make things worse. > > (That is often true in general for the more esoteric warnings, but in > this case it's just painfully more obvious). > > Linus _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel