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 D5042C02199 for ; Sat, 8 Feb 2025 02:18:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 49AF06B008C; Fri, 7 Feb 2025 21:18:25 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 44C1E6B0092; Fri, 7 Feb 2025 21:18:25 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2EC3C280001; Fri, 7 Feb 2025 21:18:25 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 108626B008C for ; Fri, 7 Feb 2025 21:18:25 -0500 (EST) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 928C54C822 for ; Sat, 8 Feb 2025 02:18:24 +0000 (UTC) X-FDA: 83095168128.26.3C6F719 Received: from nyc.source.kernel.org (nyc.source.kernel.org [147.75.193.91]) by imf27.hostedemail.com (Postfix) with ESMTP id 0AB9040004 for ; Sat, 8 Feb 2025 02:18:22 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Buo7VuA+; spf=pass (imf27.hostedemail.com: domain of nathan@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=nathan@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=1738981103; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=15OfNUS/NrG0TdtzVpvpS/XT2Gub5qi8v/pSWW7AFoU=; b=yM9gntIdmtzSuUqzHOMWLIvFMHTRa44psy2CvveOXhlrnAUPgQ3NIWD6gaxLYW1AGxWfvk Ljec1amsKlmxW2aTBdCUbnEMfxSghLt7Qs9n+ojIb3BZE+/VvZoaCadQW7+TjaG/Y0GQrN QMIfHozrPdydV5T1WnuSM66tr5kt1Iw= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Buo7VuA+; spf=pass (imf27.hostedemail.com: domain of nathan@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=nathan@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1738981103; a=rsa-sha256; cv=none; b=BUvnS5G+mtkEr2ooxfHIMcjEHQhkA6P49ylsFm+pl0qfITlfuYfaDWNttIrmt0irGki6+M PCnZHQwAaxxxYK/DX5FWJ3V8gvEKOCBLevzC7e+KE4NLBFPsgVekRCSZX7VYp4kKBefSE9 V12hOgUI8dIqpl0YOl/4DvttTjSKb98= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 5F8D1A436C8; Sat, 8 Feb 2025 02:16:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C7973C4CED1; Sat, 8 Feb 2025 02:18:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1738981101; bh=GyKun2jCx4bFpm2ztZa6ChkmElK9wbJagO4KMfSPEQs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Buo7VuA+wqlpwL/QHEGsFqasbaOomFpM/tgqsG0+mp2qoZiE9PXRTZH+rIvl8Dltf n695V9OX1QvmTokZ0eWZ07C5rEfLl67PdaYLoxnrH0TgCb3SnS0/3107QP/R0f29DB 7A3rJ9YwcKACfEyAoh4cqt2SIsB8Pta8FrOuT0/DXjW/A+3yl3LDvfQJa4tduCOVmn F2ZL9+ozzwnQHfBFncMmu9toCIjaI8jcfT/wSVDbdhzm2H7+UnxxFY8VU+K2vQXt1S +f2a+L1CpIriu6icJA43ItUw6qPkPvsnRYNI+5Dghk7uOU4DUBHOhh3vgJ8aXZ70gm OsgqKPb6nIuyA== Date: Fri, 7 Feb 2025 19:18:16 -0700 From: Nathan Chancellor To: Jakub Kicinski Cc: Linus Torvalds , Andrew Morton , Bart Van Assche , linux-mm@kvack.org, Ivan Shapovalov , Vlastimil Babka , David Laight , Pasha Tatashin , David Rientjes , David Hildenbrand , Kaiyang Zhao , Joel Granados , Sourav Panda , Johannes Weiner , llvm@lists.linux.dev Subject: Re: [PATCH] mm: Fix clang W=1 compiler warnings Message-ID: <20250208021816.GA3305705@ax162> References: <20250131191231.1370466-1-bvanassche@acm.org> <20250207164926.6daeac77@kernel.org> <20250207173813.5081ba76@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250207173813.5081ba76@kernel.org> X-Rspam-User: X-Stat-Signature: 16zxhnub9mgxq4pkozsqtpcob74waryx X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 0AB9040004 X-HE-Tag: 1738981102-82958 X-HE-Meta: U2FsdGVkX1/0ichVe/Ud9d6bwmzZZny5/rI9PkQmTGOQK10oGeDDDA9M0Y0ZBH0YQdh0rp4ujez84l1kIeGDJEalK5vjNlGcIr+G1T1P13bsOw8K9GKwnf4ZTOBP+lcx4PivCJhbrOX1Qh5/ZnhIvHuIHYq59U9pqT1bYowReYUe9210YOSplESfBgRW3MucY5rapwu/WfWAJTc9wx46blkWKOe2l3unYyM0Q/wWOqETrZFFLXX3qtCQa/a90o9CFTxWC4V8HtKQSFs51uoltSJ3gCdKF6bTwAAIc/48BA4nGdpKBOpuZQqmqWsmuLyNJzC6dBNnz95SgKKs7+DrF7rM+6il4QcFwr6FYEh69APIP6A0le1TCxitUwCSKnh8kfaOB4wTAQdGDiJRMRBUfahxEsQ1tNuY2mcchdZYqZCLRMV+R2ozvyhvSv0ENWX+KjDjqudJhBb8NKi14wf0ZjpjGUK0LGCMXXuEIqqqWAAu+umqE1JpSyDyLhnMhDbVvpPOLNhYJoR1+e6/2rkglCNAY+MVAix0fUsKJBvD16PL452O/+JyTKpWKZVXfhZolznZvfVzzzQKBddJ0siNKAE6SYbS49vXkHMxVh3Om9RLlnlKLJ4omE2OSkb66zpYf+xQIcuG3q1lYILYXVaFyIbgmI/0GmSC2sWoR6h/z4szIpNn24jGuCiGKRGS9Rk+RjB0zTz40OdcsiAFhzB/SkMA8ihCDoa9l88DDpRdm5M2hHgSzgEcryz2Kaau/MLp60Rsj8LGZQetcJO6/Bm0VkGgcXEoLsZGii+NLym1jif50RnRAZlKjdtmxi7+gvozoTNydpOuGzGfPVwt1OF7uFRCq8U3K598TwpM/NBDCSTa1habuHkRyz7gn7s5Flx4fVByHeDEI4+baUTzRJ2T0vwpmlmWdrEcNrltw2HRA7mO/YtEY8PsTRCJ0Sf6WYajeGkBOEJAxA3Yvy8QA/X alIvT2mp 3GdZHCKKa+NvnUkm/vUry1tybIE89l4oL96EDM2DWGdcwabuJ42YiMvmn0RZ6m0lwTiVbdeYliJ80ZKs5WCJzsKRE42Id9eeVHTuhlNY7lV3HEqFvk55HJzpaVUVlER7qb/wLMX1t+03IJq3lIVPn6a9rcSRG78IySeJMfB0/4MoTD8RjVy+QcM8ubzvrh1wqnjWJIFH8CF3ZWj+8TIcGraSqW6IUVlfF7pQf/mP2q6uHCInVyJbNv2BhUK/M+ksRrwak03pYTyUb5rJv25bB5ClQ7g== 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, Feb 07, 2025 at 05:38:13PM -0800, Jakub Kicinski wrote: > 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? FWIW, I sent a patch to move this warning to W=2 in October and pinged it in December: https://lore.kernel.org/20241017-disable-two-clang-enum-warnings-v2-1-163ac04346ae@kernel.org/ 'b4 shazam' tells me that it is still applicable on Linus's tree so maybe he can just apply it directly? Cheers, Nathan