From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) (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 6B0A3320CD9 for ; Tue, 7 Jul 2026 08:32:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783413130; cv=none; b=hcG/Fg5RT/g3SyqwaYsSIPY+GGfP3bwm0+qb5FYo4ORj+EP+vE33/EmpD818eviJfu8DKIZ0h+k1hfZ3x88RXREg1pUgxRzAkSTB0bnwcZuG16m3JurlBby1Ddxzgx5ARu0YniuK64imCLYUzI+STfwqmaM/w6NX8xV1XSOqMhU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783413130; c=relaxed/simple; bh=rMXlsBzFmlQJhx/MeT6zc5o4SVLjaNIAsV6KBXJ06FE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=fsIfK0vCTqu6JqSfLaOKrdKuSVKg8rH9WXY2jEfL4JOAywpXCwe/WI1JiicoGBVANdmU9nKi2dGpaHneLz/TjwXIyayIDjvZMZevlNnMYfTG2MBaSUOBifV7qPvJrXeV+NLquMSb3cB+zSFStYvmf0fWe09a6xhtW8KN6xW2ovQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=SS8qhkvA; arc=none smtp.client-ip=209.85.208.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="SS8qhkvA" Received: by mail-ed1-f47.google.com with SMTP id 4fb4d7f45d1cf-6989c0ec3c5so7660355a12.2 for ; Tue, 07 Jul 2026 01:32:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783413128; x=1784017928; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:sender:from:to:cc:subject:date:message-id:reply-to :content-type; bh=JE54RSjKYIkwOy5Cg1CBkstYTBFfezFKodw1/q6j9Kw=; b=SS8qhkvApRBRYFSuMVWyTz5vfAiLzquUuy0gLOcoS0/9ynxKYI5XT0IguKMZmTh6oS Vd40an1hc00YYW9wKpARKrI+SKxF0sT0bS+K9/V1qaMsIvMjgpz2n0AJifJyFvbe8j4R KvHsx4FY5QbpWUoyEO7zxbcbYo6YNPGRiQ3CJIo61g5ZRouW9Nqre4cm9IZTwOcDxueK StrDy4doRhG4ZnB3jROKXm4aBSoYlk6hcEpTv0WsAKGar1bE3hBVZXHdfvLDRxcEesaL Y7g4fYn4hcpnFdcjV7qdCEOYigvevNQ3ZE6CbV5ncQpJ1Xwlawyry6V5o37MskKrPdnk 3Vyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783413128; x=1784017928; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:sender:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to:content-type; bh=JE54RSjKYIkwOy5Cg1CBkstYTBFfezFKodw1/q6j9Kw=; b=Xk/H+GLR9LSFhUQ89mVVNiQdxsrpTRXFuwxw1e2amNffXO4z4Q+BnNu0WuJjo0uwwZ JcovyqvGk1LTF4EIHkQF8h6wI6vHYHKVxoD1lzxh48E30sHREXyYk92XTXX0z0OOMxgy 29loyOfi3i2UzfxYYegdXdz23mwAv7YXo/XzeDTgLDYHkgMwNikV0iXeFdAoLo6tYTWR bHjlF/dsE5SIhz12yAzzkmOWkceINx+BOppBl+gDjfySVJnvBjC+yn5RsQk+IDDFtrLI 6wT8KaRuHBBIA2RUGa4SdgFdmlFdmkqsYSWYD+CWT1B5QLgMq5qmTa09jo6NpqsFNkZK tv1g== X-Forwarded-Encrypted: i=1; AHgh+RqszsBOKwmz4bhgaHk/lG8FHA3Fy09lQODbB4NcCjXrRsOtRKr2E+6iKmjQp8WaUzwg5oyQ/xg/DaVveZ8=@vger.kernel.org X-Gm-Message-State: AOJu0YxKfI79dJuv1hTBpAwVujQORuaKgHacC5QQTqdHp4YvZGcP6D3+ FUQaGofGIF/5buT2eVef0os+5yVSkf+pBfllz9rvMb7bx9D+8KVawnce X-Gm-Gg: AfdE7cmluMncWITN8gslZgQaP08jAwx6n0Bu5m3IURFhfP8UZehYVuV6xiMQ5XSiHfi R6bWjLXzqYf6Vcs9xyEeSiy9Kco/W9QyI184Twf13Ox1vn4yJcvW1PLbKzMX2atXBMrsRFe61KS LqQyIaJR9ZDwRKmouKxANwYGVS/0MWQzdpWrTf0TxjKdkjXL+kYKGNh8WU1wteeJ8FKfwWW0oE4 jYp4zzLH1HrfReqa8wmomOBjAQKh34pxbOc7a9I2ScM82GhooaJAYE2vw0JxNcuH/nmsvRhf8mA doTkrhy0DrFLR+2Yhw1nhGum878FNqyfD6m9Zq/KoY16aoX7zxOUuZeZYDIJiSm1WPPtdxDIcJL gR3J0Tf0Ysp13pAW7kT7x723plGpm6xCo0qupUrqpqUt6hfwb96ltmQaHDpgwndxwUMNDAxOs8u SIwkvHy3IjDJDaEkI/l4rnqELIqKCBpxpUNiOBBNlDUXu4l9cdYfFo9a2cUTcTlWH3YYCWDKa1O ihgKl/KpLyGuhQF8NC1 X-Received: by 2002:a17:906:2ad3:b0:c12:8ade:dce0 with SMTP id a640c23a62f3a-c15a67ea2b2mr149867666b.39.1783413127545; Tue, 07 Jul 2026 01:32:07 -0700 (PDT) Received: from ?IPV6:2001:8a0:e962:d100:9cd:c9aa:d5c0:549a? ([2001:8a0:e962:d100:9cd:c9aa:d5c0:549a]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c15ada091e6sm79462366b.51.2026.07.07.01.32.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Jul 2026 01:32:04 -0700 (PDT) Sender: Julian Braha Message-ID: Date: Tue, 7 Jul 2026 09:32:02 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] kconfig: warn on dead default To: Nathan Chancellor , nsc@kernel.org Cc: rdunlap@infradead.org, masahiroy@kernel.org, grahamr@qti.qualcomm.com, nico@fluxnic.net, linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org References: <20260606140008.271929-1-julianbraha@gmail.com> <20260707053143.GA1381193@ax162> Content-Language: en-US From: Julian Braha In-Reply-To: <20260707053143.GA1381193@ax162> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi Nathan, On 7/7/26 06:31, Nathan Chancellor wrote: > Nicolas pushed this into -next, where it fires several times for me. I > have not looked at these closely yet, I just wanted to get the report > out so that more eyes could be on it. Thank you for sharing, I've taken a close look. > ARCH=powerpc allmodconfig: > > arch/powerpc/platforms/Kconfig.cputype:269:warning: default for 'TUNE_CPU' has the same condition as the earlier default at arch/powerpc/platforms/Kconfig.cputype:268 > arch/powerpc/platforms/Kconfig.cputype:270:warning: default for 'TUNE_CPU' has the same condition as the earlier default at arch/powerpc/platforms/Kconfig.cputype:268 > lib/Kconfig.debug:1083:warning: default for 'PANIC_TIMEOUT' is unreachable: earlier default at arch/powerpc/Kconfig:350 is unconditional > arch/Kconfig:1194:warning: default for 'PGTABLE_LEVELS' is unreachable: earlier default at arch/powerpc/Kconfig:482 is unconditional > > ARCH=s390 allmodconfig: > > arch/Kconfig:1194:warning: default for 'PGTABLE_LEVELS' is unreachable: earlier default at arch/s390/Kconfig:295 is unconditional > lib/Kconfig:372:warning: default for 'HAS_IOMEM' is unreachable: earlier default at arch/s390/Kconfig:760 is unconditional It seems to me that all of these instances are probably intended by the architectures to override the global default. Personally, I find this redefine-and-override style confusing as it requires the reader to think about the order of imports in kconfig. I'll throw them in my kconfig cleanup pile, and see what the relevant maintainers think of my version. > When building with clang-23, which supports '-fms-anonymous-struct': > > init/Kconfig:978:warning: default for 'CC_MS_EXTENSIONS' is unreachable: earlier default at init/Kconfig:977 is unconditional > > I think the init/Kconfig and arch/powerpc/platforms/Kconfig.cputype ones > are intentional due to how cc-option works but I know those might be > hard to silence because they are already evaluated by this stage if I > understand correctly? Not sure about the other ones (apologies if they > are already known or have fixes). Yeah, let's leave these alone. Best not to merge this. Thank you all for taking a look. - Julian Braha