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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id BC41CC02199 for ; Sat, 8 Feb 2025 01:38:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5B0766B008C; Fri, 7 Feb 2025 20:38:18 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 56069280005; Fri, 7 Feb 2025 20:38:18 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 45015280004; Fri, 7 Feb 2025 20:38:18 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 275066B008C for ; Fri, 7 Feb 2025 20:38:18 -0500 (EST) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id D8F95C1220 for ; Sat, 8 Feb 2025 01:38:17 +0000 (UTC) X-FDA: 83095067034.20.CD91F0B Received: from nyc.source.kernel.org (nyc.source.kernel.org [147.75.193.91]) by imf28.hostedemail.com (Postfix) with ESMTP id 4ADC7C000F for ; Sat, 8 Feb 2025 01:38:16 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=ZlzZCPDR; spf=pass (imf28.hostedemail.com: domain of kuba@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=kuba@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1738978696; a=rsa-sha256; cv=none; b=PP0jdfTZ6bfWulmaNl4lGbHlJNERk52mn3TOcCm+QG3ycyBdfCGQBmZCkJiQP23GKIPZxV JWCT1xbhhfu+ZfsqapKkT98YBPaPbmZzxLlrFXziTcMabuVVBE3p7NoK2CbP7Z0vTpYz/S BEHsx7TcDYfTbWEs0+zjxQFNw7blHCc= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=ZlzZCPDR; spf=pass (imf28.hostedemail.com: domain of kuba@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=kuba@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1738978696; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=baEFzcXZGB6EdR9PoyTZKsQpxEl+NI5I0ZLVhYgpDZA=; b=dynBJ4I5KEhfJdLHZ708hYRPITIfHGFPcLh17zaTrtWMilFk79O2WULLUv17nSgvgvj+NX 64Y+pP/rieFU78z/9r1UnHW0FSfLlLUwfVplQc+lsvWHO72r7RtUjoqo5arTst/SH84LZe BSm8P2xGIrVGnVnS9sqmXm+HnDftytQ= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id A49C9A43BA7; Sat, 8 Feb 2025 01:36:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A78F7C4CED1; Sat, 8 Feb 2025 01:38:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1738978695; bh=9l26VWfyG6FsKW9zKg4RNpZKAegl42nCqtAfIqEGxIY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ZlzZCPDR6frw7KJxzRCPiADB+gLu2f8e3ztrgjFvQnYIndS/LlGF9AI78X3QfSREH Ry23qgzZBd6wAsEP7fl7sV4Nf5j/gTjCCF5FXPV5bdeRLqmr89VoChyeNMX6Xi6593 DaW3Idb1pAe3HpMWxyLyRq7eeHuOavfMIwxerVCFWg9gXN4BI25nChPJRZSAcLK4Cr Idx+OoaKGmjRS3kQsPxz2gfKwBTDP58QOPwHILs9JPFn16CVZpDCzMj23QPas/ftB0 9ojBD+jl9ZpGnVls51lRexFxpC/IcAkY7uCFmZTSeKLoGg2eX/TQOOKs30yu/MK7Gz fXN68Kr5C4N7w== Date: Fri, 7 Feb 2025 17:38:13 -0800 From: Jakub Kicinski To: Linus Torvalds Cc: Andrew Morton , Bart Van Assche , linux-mm@kvack.org, Ivan Shapovalov , Vlastimil Babka , David Laight , Nathan Chancellor , Pasha Tatashin , David Rientjes , David Hildenbrand , Kaiyang Zhao , Joel Granados , Sourav Panda , Johannes Weiner , llvm@lists.linux.dev, Nathan Chancellor Subject: Re: [PATCH] mm: Fix clang W=1 compiler warnings Message-ID: <20250207173813.5081ba76@kernel.org> In-Reply-To: References: <20250131191231.1370466-1-bvanassche@acm.org> <20250207164926.6daeac77@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Stat-Signature: jzouo8d7kefwgoec9cfhgp38t9e5wk8y X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 4ADC7C000F X-Rspam-User: X-HE-Tag: 1738978696-782497 X-HE-Meta: U2FsdGVkX1/KqyLtSmq8OuZzTdHylTYWCx9SVDWEGtHLy3aW83otmxpmlBGx+kfZEZgu1SV6wZy30evUZlj7Mk5SBaHw3SEjnlMXh8p8BJjLluup2mLzWY8foUqbsajXOHwTXGg/SB9kwTmuNjU0CJHqO4wZhGTOiZ99mbdvOPkFDEPh6neEk1jTes3UnCwEhA3kU8xODPt2/+ykRWvl01HWS882nVd09gIcsxrJ8le3qD8UGKaLFHc5vVzlPPbXxHFeRVIpUidtODURA3qIUTIuE2mAxcHVnR47dub/pTrEPWz+iMH06akBMaDjOzzKXlxUvAE/5Gh7WwjKkYYsy/g1QPfsdXa3mfktyCKvTzJiPCyAEoIRrtynY+h+NcijzjYZBzHNNmgQdjLYnh/PmoCXzQDbkHEEJ3mpYVssW9yHY/nAxDN8A0HEFd6PDkMVnrz27zWij2AC1fbxaTJhpxBBrB1sOdQeZzECpUHnL2HShdt2SzTHRMnJJJtRckoi6fTiCXG/BOitr6+NjMfSPTwyLhrw0NegazImq5KObXuZzsGWHCxQkA+/lk7OTmOaEWWLIvUn0OqmuS/J0BdnARNYS/tyMRsyCuTTU0cTbcYawrbYgxomk+C8XsJhq6oW2nn9n8IknsTZHjdgwEQPYEu1QrEyzVZ1/SReInkp0XSZNzBiHWsMdSKKMIRGQzdf3SSWLZp+7GOPP0w1Esd/Hw7WYjHZnkZjbnvGE9js3sEFSbKxO0XgjTf8udznDcl4x6SHprphmCeq6wZMHtqxyHH9uN1mu74i05ABm3b6lumVcRKDXICVRAior3R1pCSSezowM7F2JRKHLApgiNlM3rgGjbpCSFsWFgUgaSt2Mh5kNTalsSz8XA9D1ftDCBBRP4uJ9oYZeP5qE3QSiQ2OUxcfJdoeZV3jVKE6u+UNmAJg5z7KzAElfQiKC9OPs9hjkgZaMKQeAFTZ0WNOW2r Ihp1JXbd jm3FXs6IjUzlDLVK1OjeHhdFFxWzJW8IRPxPM8oTiNwoe+Mj8POsuAMvzaEbVHPuykbd/Wp0rAtqZDU2USs6O3W47/2uHuQLLdZxGEzy8YmqfQKUnLsOQNWYuVbpt9JvKslXHes64ZrBMyVyP8JjrQvGxvY1ZQjDBnM7V/x+qZqSmzwwuZH2HSTc6QorKih/ETdb1ljEcv7W9EL7i8NHdGnSw4JzX6P+uqFRVt7G7jhiOowTqLTu6G6AAf7I9tQ/bJva8DZtfDXXMfvOLZeO7j6tqrQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Fri, 7 Feb 2025 17:01:00 -0800 Linus Torvalds wrote: > On Fri, 7 Feb 2025 at 16:49, Jakub Kicinski wrote: > > Could we possibly please still consider taking this in for 6.14? :( > > Since the warning comes from vmstat.h pretty much every object file > > generates this warning. clang 19 is getting more widely used now, > > its making it hard to see new warnings. > > So: > > - I build the kernel with clang, but I don't have clang-19, so it's > kind of pointless sending patches that DO NOT EVEN EXPLAIN WHAT THE > WARNINGS ARE. > > - and even if you explain *WHAT* the warnings are, please also > explain *WHY* they are valid and should be cared about. > > Because honestly, W=1 is literally meant for "warnings that aren't > necessarily valid". That's why they aren't on by default. > > So no, I'm certainly not applying unexplained random patches that > don't bother to explain the what or the why. Not for 6.14, not ever. I thought I'd ask.. :) FWIW this for every single object: CC net/core/request_sock.o In file included from ../net/core/request_sock.c:14: In file included from ../include/linux/tcp.h:17: In file included from ../include/linux/skbuff.h:17: In file included from ../include/linux/bvec.h:10: In file included from ../include/linux/highmem.h:8: In file included from ../include/linux/cacheflush.h:5: In file included from ../arch/x86/include/asm/cacheflush.h:5: In file included from ../include/linux/mm.h:2224: ../include/linux/vmstat.h:504:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 504 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 505 | item]; | ~~~~ ../include/linux/vmstat.h:511:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 511 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 512 | NR_VM_NUMA_EVENT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~~ ../include/linux/vmstat.h:524:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 524 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 525 | NR_VM_NUMA_EVENT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~~ 3 warnings generated. > Fix the patch. Explain the problem. And possibly just disable the warning. That'd be great. Nathan, would that be okay with you?