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 648F32F0C52; Mon, 22 Sep 2025 19:41:56 +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=1758570116; cv=none; b=SJeLTcZX1EUfjW6mi0bsoXsPuWUsUnEhhL1VZem6z6Q/rQgBBga828I3eUSwEO5kvWpISwjIw+Q+h8dOMdUrXxBh91ZI81ITPTTQ6Og6eVQSCRuzPCs0G9rF5TwwMebU+PgZt4GMASsiiGf1tD+2nCw1VKd35V1wX2ql7/sfFgI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758570116; c=relaxed/simple; bh=t00MHnhd5UMdG/exWnAblrqii3YLcFe5lnX+QdDWjMA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=RMhXQMTxSGVLGystuFeex1+ocriCyeK59n3aT5RfBBuLMRicKBB8h0eGCtZGjZqSO8AFfsaNGE9VQtbhHI65XLcbFpSLRPy3dTYfPtdNeNlVC6fp6MROvmK9TDSGEClOBS40rx1N0wILuEfyKH0Qqgm7y9Ru3cjgj5wXkaJhZjw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=W7+Rsb49; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="W7+Rsb49" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F1E4FC4CEF0; Mon, 22 Sep 2025 19:41:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1758570116; bh=t00MHnhd5UMdG/exWnAblrqii3YLcFe5lnX+QdDWjMA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W7+Rsb49Ja6gN9l9seFY+vv+1A/IufRcPohL0IdOUcby5wRZAsTkVremrxrxYFoka 1GRIqOdyTwrI+/R6vDRF8SfO5k9ZxFNHVg4ie0ippvB+D6HLU4JdKJVLpxc6YOoqNU J4CwTNNh0cslCwhw36fiA+lbty/t0DdPQV05LDvg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Geert Uytterhoeven , Aaro Koskinen , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Dominik Brodowski , Sasha Levin Subject: [PATCH 6.16 011/149] pcmcia: omap_cf: Mark driver struct with __refdata to prevent section mismatch Date: Mon, 22 Sep 2025 21:28:31 +0200 Message-ID: <20250922192413.171918391@linuxfoundation.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250922192412.885919229@linuxfoundation.org> References: <20250922192412.885919229@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Geert Uytterhoeven [ Upstream commit d1dfcdd30140c031ae091868fb5bed084132bca1 ] As described in the added code comment, a reference to .exit.text is ok for drivers registered via platform_driver_probe(). Make this explicit to prevent the following section mismatch warning WARNING: modpost: drivers/pcmcia/omap_cf: section mismatch in reference: omap_cf_driver+0x4 (section: .data) -> omap_cf_remove (section: .exit.text) that triggers on an omap1_defconfig + CONFIG_OMAP_CF=m build. Signed-off-by: Geert Uytterhoeven Acked-by: Aaro Koskinen Reviewed-by: Uwe Kleine-König Signed-off-by: Dominik Brodowski Signed-off-by: Sasha Levin --- drivers/pcmcia/omap_cf.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/pcmcia/omap_cf.c b/drivers/pcmcia/omap_cf.c index 441cdf83f5a44..d6f24c7d15622 100644 --- a/drivers/pcmcia/omap_cf.c +++ b/drivers/pcmcia/omap_cf.c @@ -304,7 +304,13 @@ static void __exit omap_cf_remove(struct platform_device *pdev) kfree(cf); } -static struct platform_driver omap_cf_driver = { +/* + * omap_cf_remove() lives in .exit.text. For drivers registered via + * platform_driver_probe() this is ok because they cannot get unbound at + * runtime. So mark the driver struct with __refdata to prevent modpost + * triggering a section mismatch warning. + */ +static struct platform_driver omap_cf_driver __refdata = { .driver = { .name = driver_name, }, -- 2.51.0