From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D06FA13D531; Mon, 15 Jul 2024 14:40:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721054415; cv=none; b=rJNI96P1/+/ysQlatwrD8B5DKpel/R+pRswL+RsDeqUS0GGR6uAErDb6YBAwNPuA+xqf1EzPp3MJoINO8wj/+Es6d9IW462KEGZemfH0IW+sK/obcjQxlaPpHM0/+z5FWrCDmtcPndyuxJoj8fpBtRgrr00M4OMIiZDOoy2E8Fw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721054415; c=relaxed/simple; bh=gw2ndcYzWrXcWwfMvNwsIdrsWIYeYw1572YOxUCWSHc=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=F40gqLYG4DnlDzKOMctKPYIfA8xa7RmcneO07YISTt0Qsrx8/+VaZE+HRLvBxyeR1+g1oP5/lTdzqJWmktYZWA/Ad2wUYs2ZX+ivNuXO5YJgk1UjwYHLVy0rTycOULhPJvzKFVD6lWNPNawEyw2OLkazA003DrSVdHXBIzJCXyc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OQMK0Q75; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OQMK0Q75" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6686CC32782; Mon, 15 Jul 2024 14:40:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1721054415; bh=gw2ndcYzWrXcWwfMvNwsIdrsWIYeYw1572YOxUCWSHc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=OQMK0Q757KBbSEG6i8nNQN1Jc32yl0zvJ0OnXj446cwAZatYwfT+TICs9NGttRj2n mCYfSBrmIvm3h30AasxhFILcwx+n8hffsjhuiV62hYTHWsr6K+D7wBZyw4JNtPko0p tRvAjs151m7ke0WhKGsx0reosTqNL+Bb0WbYJ3lvB996YCPUHSBvMY3nfM6bje5/nB 3UBVzLqo/ZNNVKTTqTFQ/usp6Aty+lw5oJXRLPs72+LaTCrT4ZRkh8juIilcyLUH+3 eiTsYLXgavQ11tYofAQsd9RuuR//KxLoWCDtfVzNC0dwCFUgVNUc31sY2+b3fgNBZU dJhoDI9jWuY6A== Received: from 82-132-225-32.dab.02.net ([82.132.225.32] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1sTMs9-00CXag-1d; Mon, 15 Jul 2024 15:40:13 +0100 Date: Mon, 15 Jul 2024 15:40:10 +0100 Message-ID: <875xt667n9.wl-maz@kernel.org> From: Marc Zyngier To: Sebastian Ott Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, Oliver Upton , James Morse , Suzuki K Poulose , Catalin Marinas , Will Deacon , Zenghui Yu Subject: Re: [PATCH 1/3] KVM: arm64: fix override-init warnings in W=1 builds In-Reply-To: <3b882ac0-fd2c-35df-38d7-b89cf073bcc3@redhat.com> References: <20240712110332.10970-1-sebott@redhat.com> <20240712110332.10970-2-sebott@redhat.com> <8734oep96j.wl-maz@kernel.org> <3b882ac0-fd2c-35df-38d7-b89cf073bcc3@redhat.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 82.132.225.32 X-SA-Exim-Rcpt-To: sebott@redhat.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, oliver.upton@linux.dev, james.morse@arm.com, suzuki.poulose@arm.com, catalin.marinas@arm.com, will@kernel.org, yuzenghui@huawei.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Mon, 15 Jul 2024 11:28:06 +0100, Sebastian Ott wrote: > > On Fri, 12 Jul 2024, Marc Zyngier wrote: > > On Fri, 12 Jul 2024 12:03:30 +0100, > > Sebastian Ott wrote: > >> > >> -static const exit_handler_fn hyp_exit_handlers[] = { > >> - [0 ... ESR_ELx_EC_MAX] = NULL, > >> +static const exit_handler_fn hyp_exit_handlers[ESR_ELx_EC_MAX + 1] = { > > > > Is this really any better? I don't think so. It makes the intent > > disappear instead of making it explicit. Intent matters *a lot*. > > I'm not claiming that it's an improvement to the code. Silencing pointless warnings should never have priority over keeping the code maintainable and understandable. I hope we can agree we are not in the business of making the kernel *worse* than it already is on that front, right? I like good tooling as much as the next kernel tinkerer. But W=1 is, in its current form, quite the opposite. Mark posted a link to a 5 year old thread, showing a number of ways compilers could use extra annotation to lift the multiple initialisation ambiguity. This approach has seen no traction, which is a bit sad. > But yea, I see your point. How about disabling that flag in the > makefile? Yes, that'd be a reasonable workaround until someone fixes the toolchains. I see that Loongarch is already doing it for the exact same purpose. Thanks, M. -- Without deviation from the norm, progress is not possible.