From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 29D8822F74D for ; Fri, 19 Dec 2025 07:08:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766128102; cv=none; b=P4/O4Gl3TsU2AvxMqoN41xBF1ryJov37m9VytAFzDcs2vMHvOtJBdLsfFEgIhYgXMnLGUjIMe+gTQ6shgnxQ2FG5oUuiIIJHVx0JnvG+XD5N6BjlHnF00qJ8/k/5VoMbr4jKWZUJRb09XNO63XNdCRubRiu7jzfQUF3O0Qq7khk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766128102; c=relaxed/simple; bh=chHA3d/r7DdTP2+uwfGEKmhVONsNEHk52FbSC3FS8p0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=MjohG9a6rL8xaEbd30mXuSv4KH/wz18c051OubKmY5XzMCGINIr8kuHMPcrjt+q+101mffo3zQr9wZIYsgBr+RN7x974uBWHr1xoIsmB1LHYv3SNHkcA94aWdQCoEJMBAUowOkSTHfJhwfo9R4deEsDjhqe5fc57S8DnJ+IYFv0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=zOsIxQbN; arc=none smtp.client-ip=209.85.128.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="zOsIxQbN" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-4775895d69cso5598325e9.0 for ; Thu, 18 Dec 2025 23:08:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1766128099; x=1766732899; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=NAJFCYxG6tBk/5BjvMlMhhFWKmM1Im0nbCMAsTTFzMc=; b=zOsIxQbNWbyo2BDTEHAYEqmGQOGxHNG2ddYAmFoAsdej4tI1cRCwo8MO2edeNIwC3t ssqiCryE+KHhp1+7RNnfJCadukVq+xY0EIOqWnbl/G6y/YpalSoA14OXWS5S57Pi44fv blEDXwNfBTmoEaMhiGbwqzUWq42tY1rTno7pClEyC08QtOyiejFYdneyV+wh6smHyiVm 1n8bFkw0YAj0sCx32pDBnRRZod5EEid7MxYdgMj7PgcRw+Bkm2xu75JLiYAecljV9iW3 9RSaV/UPGw0mCn6dDv9wKCyci9DMXRq89OUlHlZ7xt8G+56NmBwOhnABAevYz9LzDfNE 99RQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766128099; x=1766732899; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NAJFCYxG6tBk/5BjvMlMhhFWKmM1Im0nbCMAsTTFzMc=; b=KUsr8YL8O+GzsKDH2tLHGh1h11z6JJ0fyf+6lBoffF7pGvC5Y6KnmVv2jHX7EQsxET KSKVZI8LQ3QLu0WWgnaT2EKCMqyAFLb8qvUBNL7t8p+/zzJxRNbGIabmO9WzUcD8sWgd i3YVDvN9N3VcAq1h1ZNDG9jsxkszu4cafAK9yJU9A12Pa2eh0ntt64NV+AzGSUS9OIEw 6zifaI3WtgwI1fqPhAMTE1Dphd9KIinHvILJQ2zd/EQ+tblxbL1vuqZpJsMjX4K2/ktN B73S1TZBvjOrxldB90c1nUlBOBCIjqhsUDOMYXkWAf+RTSG3TXOs+PQkIf9t0G/VCDDK gUeg== X-Forwarded-Encrypted: i=1; AJvYcCUYcOPsdXnc6tiGQvSdHt7yg2TLDnOlwXPpylOTYKeZ9g0ibMJYbRvAVx9xgjEPbJwqtwMm3YXhV5yUxjA=@vger.kernel.org X-Gm-Message-State: AOJu0YyvCH1BACtEO+2MZwZaJHB9G3BlMBP2C29YYCIDK3pn8Zw4SOlV 8Vk7PSCoCtIc9j4WiS2ujySBsMpBHbnXr2qXv1om9TvGKlklXu5ungaZ3DLOm+CANh0= X-Gm-Gg: AY/fxX6rH7B3aU77eYuSDkxHDfmjR0RpZSuTlqIDaPhE46UUzyYjdgpV5hFy/oFF3pQ qDTvhUEj9uMeZ7CjLbIoTgBOgcQcVgP8ySH381mess2O1szutzTmv2zm6DceQ+46vSCgsej9Ty5 vhiW3Xm3xyCjwhUnOJq+kcC562n4neINz81XhgAnyhCvqq/T5JwDaT19kSM9lnFX8WQpSgls5xy BpwiWFha626gawzvQwhv0o6QT3IiVeqKRSZV6wv/ODBUCFie58SGMF5PURgd7zWRCr/2WOsnoS6 TfFfZ3e9Yc4ZkhVFJFkIEw2aFY1eujtoPGFgesv/zQKYpbyvcwN/VtcLFmlabGKINA53rPRo9LU kRDRe4V2xseZmQht29J+ekLk3zKfi942HPioeu5nMQnyJ3ypyh3Rb2/NW/gidv8m/8mmI7xJhm6 miQV4hSQiEiSk3yrX+ X-Google-Smtp-Source: AGHT+IE7nLrq263HAsObO9ho2ijSSwzHrCJiIV0bJrGj7M+qZEd9hC4pZGfJYlq78GqHGGWD40y0tA== X-Received: by 2002:a05:600c:5251:b0:477:8a29:582c with SMTP id 5b1f17b1804b1-47d195a425bmr13555325e9.34.1766128099504; Thu, 18 Dec 2025 23:08:19 -0800 (PST) Received: from localhost ([196.207.164.177]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47be27b749esm81591275e9.14.2025.12.18.23.08.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Dec 2025 23:08:19 -0800 (PST) Date: Fri, 19 Dec 2025 10:08:16 +0300 From: Dan Carpenter To: David Laight Cc: Linus Torvalds , Vincent Mailhol , Nathan Chancellor , Nicolas Schier , Nick Desaulniers , Bill Wendling , Justin Stitt , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Chris Mason , David Sterba , linux-kbuild@vger.kernel.org, linux-sparse@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, dri-devel@lists.freedesktop.org, linux-btrfs@vger.kernel.org Subject: Re: [PATCH 0/2] kbuild: remove gcc's -Wtype-limits Message-ID: References: <20251218-remove_wtype-limits-v1-0-735417536787@kernel.org> <20251218202644.0bd24aa8@pumpkin> <20251218220651.5cdde06f@pumpkin> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20251218220651.5cdde06f@pumpkin> On Thu, Dec 18, 2025 at 10:06:51PM +0000, David Laight wrote: > On Fri, 19 Dec 2025 08:34:05 +1200 > Linus Torvalds wrote: > > > On Fri, 19 Dec 2025 at 08:26, David Laight wrote: > > > > > > One possibility is to conditionally add _Pragma() > > > > No. That compiler warning is pure and utter garbage. I have pointed it > > out fopr *years*, and compiler people don't get it. > > > > So that warning just needs to die. It's shit. It's wrong. > > True - especially for code like: > if (x < 0 || x > limit) > return ... > where the code is correct even with 'accidental' conversion of a > negative signed value to a large unsigned one. > > clang seems to have a dozen similar warnings, all of which are a PITA > for kernel code - like rejecting !(4 << 16). In this example is 4 a literal or do we at least know that 4 is non-zero? I really thought I had a check for that in Smatch but I guess I don't... regards, dan carpenter