From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-b3-smtp.messagingengine.com (fout-b3-smtp.messagingengine.com [202.12.124.146]) (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 7CEC8270048; Thu, 27 Feb 2025 12:05:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.146 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740657911; cv=none; b=r+EM+xvPPFEtsAzr47rSFYS70HxDNrfbUU6cgXQ3gejkMPnYf5cy8hk17IhY5A8NBccdJ512nKXjUc3gcPjgO69ODEBoVWKxzDEhqZ7zBoXPjouAZ/O5w2GTTIcbQIXIzx3+HnIbyZq2bwKarBy7FVgkdeY5E/R0WGSlw+4Z528= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740657911; c=relaxed/simple; bh=8pN9ZtJpWnad92ETYOWFrypWE7zqctvEixPpkbJ7xl0=; h=MIME-Version:Date:From:To:Cc:Message-Id:In-Reply-To:References: Subject:Content-Type; b=ZZNYHdfECyGvE+Owi8weJndMfFezcAjSzc7rzjSzvalFyiQRtS7bRiZAELgLZP+KfwcysPP+oEQ+3GOopP6KwYVGo1DBB3KGUVq29LGZP4CSZAfmqjE2ACq6yuprafm9hFEZ8TrfG3Qp2ny8ql+DZnBZLLfHITYYTfvBiA6D9sI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de; spf=pass smtp.mailfrom=arndb.de; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b=HN5IATKy; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=zjYRfjCx; arc=none smtp.client-ip=202.12.124.146 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arndb.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b="HN5IATKy"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="zjYRfjCx" Received: from phl-compute-11.internal (phl-compute-11.phl.internal [10.202.2.51]) by mailfout.stl.internal (Postfix) with ESMTP id F04A21140163; Thu, 27 Feb 2025 07:05:07 -0500 (EST) Received: from phl-imap-11 ([10.202.2.101]) by phl-compute-11.internal (MEProxy); Thu, 27 Feb 2025 07:05:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1740657907; x=1740744307; bh=wR1yJ7+sfWbEGLOYHNHHr2Z5z5K7L8QPIipqy40eWks=; b= HN5IATKyqc2W4FueNuOQhB//31RcdqjDp6IGbejFqjp8X49ngbkIUeef+Vz3uFka LHT/XQ5GPhnxy/qD6Mgn75DGQDBbehVPsjd2w2M0GFdU9jpMhsv/+SXOkd7NhENw Ydkz/7h/LYp2iszauo0vQIcRcAo5GOjG/uV6DBCem24qzbZzhbpZggJhVUfJdEk4 nurDYGfnHuVr4GPgA4TcCd+PWGMy5JUQLKfdhZkp2pIZqqj1nH924dVwF+6jidez L5T0oSIb/PQ84xdBrMAQ4Eor6VisqUENCKeK91FrOGW4jR9pKpnVvpHrO+9H9Vg2 GpKK3HZSh90Bu8VQbo8zvQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1740657907; x= 1740744307; bh=wR1yJ7+sfWbEGLOYHNHHr2Z5z5K7L8QPIipqy40eWks=; b=z jYRfjCxJ2cPXcbh5P5cSNeAlGxJqU0E7HiFSuPuUtjBOPbSuaCy4/I1rgl7R1uGL 6COMISQyRMu2tQFFKITm9SljU+FCpVyldGhgF5hhBibiHmaDjx75Swd/Zs3P4YOt EDPavd5j3dVfG/hjujLoAO2WSBYFg61lHBz6eSQfj/YGj8hWqYXI2WXUDOpe2s53 JIlvYT4wbcwb0ezNaYnU8msVwjGmpHZsrsFIbyD8K7UTttIP+hrfaooZDzqCcySL KpnTf7kO1A0p+qyoQhmHnmz75pc46lTMVNIGbLU0qxqk4Pf872DEQs5c47z51vG+ qHydthYNUmFQu9L062iIw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdekjeegudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefoggffhffvvefkjghfufgtgfesthejredtredt tdenucfhrhhomhepfdetrhhnugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusg druggvqeenucggtffrrghtthgvrhhnpefhtdfhvddtfeehudekteeggffghfejgeegteef gffgvedugeduveelvdekhfdvieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpegrrhhnugesrghrnhgusgdruggvpdhnsggprhgtphhtthhopedu gedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepuhdrkhhlvghinhgvqdhkohgvnh highessggrhihlihgsrhgvrdgtohhmpdhrtghpthhtohepuggrvhgvmhesuggrvhgvmhhl ohhfthdrnhgvthdprhgtphhtthhopegvughumhgriigvthesghhoohhglhgvrdgtohhmpd hrtghpthhtohepshgrlhhilhdrmhgvhhhtrgeshhhurgifvghirdgtohhmpdhrtghpthht ohepshhhrghojhhijhhivgeshhhurgifvghirdgtohhmpdhrtghpthhtohepshhhvghnjh hirghnudehsehhuhgrfigvihdrtghomhdprhgtphhtthhopegrrhhnugeskhgvrhhnvghl rdhorhhgpdhrtghpthhtohephhhorhhmsheskhgvrhhnvghlrdhorhhgpdhrtghpthhtoh epkhhusggrsehkvghrnhgvlhdrohhrgh X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id C122A2220076; Thu, 27 Feb 2025 07:05:06 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Date: Thu, 27 Feb 2025 13:03:05 +0100 From: "Arnd Bergmann" To: "Jijie Shao" , "Arnd Bergmann" , "Jian Shen" , "Salil Mehta" , "Andrew Lunn" , "David S . Miller" , "Eric Dumazet" , "Jakub Kicinski" , "Paolo Abeni" Cc: "Simon Horman" , =?UTF-8?Q?Uwe_Kleine-K=C3=B6nig?= , "Krzysztof Kozlowski" , Netdev , linux-kernel@vger.kernel.org Message-Id: In-Reply-To: <3e477135-981f-49bd-8e54-0c3ecdcc8a19@huawei.com> References: <20250225163341.4168238-1-arnd@kernel.org> <3e477135-981f-49bd-8e54-0c3ecdcc8a19@huawei.com> Subject: Re: [PATCH 1/2] net: hisilicon: hns_mdio: remove incorrect ACPI_PTR annotation Content-Type: text/plain Content-Transfer-Encoding: 7bit On Thu, Feb 27, 2025, at 12:53, Jijie Shao wrote: > > if CONFIG_ACPI is disabled, ACPI_PTR() will return NULL, so > hns_mdio_acpi_match is unused variable. > > > So use #ifdef is possible and has no side effects, and many drivers do so. Those should be cleaned up eventually, but that is separate from the build warning. > Of course, it also seems possible to remove ACPI_PTR(), > But I'm not sure if it's okay to set a value to acpi_match_table if > CONFIG_ACPI is disabled. Setting .acpi_match_table and .of_match_table unconditionally is the normal case. Historically we had some drivers that used of_match_ptr() to assign the .of_match_table in order to allow drivers to #ifdef out the CONFIG_OF portion of the driver for platforms that did not already use devicetree based probing. There are basically no platforms left that have not been converted to devicetree yet, so there is no point in micro-optimizing the kernel size for that case, but the (mis)use of of_match_ptr() has been copied into drivers after that, and most of the ACPI_PTR() users unfortunately copied from that when drivers started supporting both. Arnd