public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Takashi Iwai" <tiwai@suse.de>, "Sasha Levin" <sashal@kernel.org>,
	perex@perex.cz, tiwai@suse.com, linux-sound@vger.kernel.org
Subject: [PATCH AUTOSEL 6.8 04/15] OSS: dmasound/paula: Mark driver struct with __refdata to prevent section mismatch
Date: Mon, 15 Apr 2024 06:02:44 -0400	[thread overview]
Message-ID: <20240415100311.3126785-4-sashal@kernel.org> (raw)
In-Reply-To: <20240415100311.3126785-1-sashal@kernel.org>

From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

[ Upstream commit 755795cd3da053b0565085d9950c44d7b6cba5c4 ]

As described in the added code comment, a reference to .exit.text is ok
for drivers registered via module_platform_driver_probe(). Make this
explicit to prevent the following section mismatch warning

	WARNING: modpost: sound/oss/dmasound/dmasound_paula: section mismatch in reference: amiga_audio_driver+0x8 (section: .data) -> amiga_audio_remove (section: .exit.text)

that triggers on an allmodconfig W=1 build.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Message-ID: <c216a129aa88f3af5c56fe6612a472f7a882f048.1711748999.git.u.kleine-koenig@pengutronix.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 sound/oss/dmasound/dmasound_paula.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/sound/oss/dmasound/dmasound_paula.c b/sound/oss/dmasound/dmasound_paula.c
index 0ba8f0c4cd99a..3a593da09280d 100644
--- a/sound/oss/dmasound/dmasound_paula.c
+++ b/sound/oss/dmasound/dmasound_paula.c
@@ -725,7 +725,13 @@ static void __exit amiga_audio_remove(struct platform_device *pdev)
 	dmasound_deinit();
 }
 
-static struct platform_driver amiga_audio_driver = {
+/*
+ * amiga_audio_remove() lives in .exit.text. For drivers registered via
+ * module_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 amiga_audio_driver __refdata = {
 	.remove_new = __exit_p(amiga_audio_remove),
 	.driver = {
 		.name	= "amiga-audio",
-- 
2.43.0


  parent reply	other threads:[~2024-04-15 12:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-15 10:02 [PATCH AUTOSEL 6.8 01/15] ASoC: SOF: Intel: hda-dsp: Skip IMR boot on ACE platforms in case of S3 suspend Sasha Levin
2024-04-15 10:02 ` [PATCH AUTOSEL 6.8 02/15] regulator: tps65132: Add of_match table Sasha Levin
2024-04-15 10:02 ` [PATCH AUTOSEL 6.8 03/15] bpf: put uprobe link's path and task in release callback Sasha Levin
2024-04-15 10:02 ` Sasha Levin [this message]
2024-04-15 10:02 ` [PATCH AUTOSEL 6.8 05/15] scsi: ufs: core: WLUN suspend dev/link state error recovery Sasha Levin
2024-04-15 10:02 ` [PATCH AUTOSEL 6.8 06/15] scsi: libsas: Align SMP request allocation to ARCH_DMA_MINALIGN Sasha Levin
2024-04-15 10:02 ` [PATCH AUTOSEL 6.8 07/15] scsi: ufs: core: Fix MCQ mode dev command timeout Sasha Levin
2024-04-15 10:02 ` [PATCH AUTOSEL 6.8 08/15] ALSA: line6: Zero-initialize message buffers Sasha Levin
2024-04-15 10:02 ` [PATCH AUTOSEL 6.8 09/15] block: fix overflow in blk_ioctl_discard() Sasha Levin
2024-04-15 10:02 ` [PATCH AUTOSEL 6.8 10/15] ASoC: codecs: ES8326: Solve error interruption issue Sasha Levin
2024-04-15 10:02 ` [PATCH AUTOSEL 6.8 11/15] ASoC: codecs: ES8326: modify clock table Sasha Levin
2024-04-15 10:02 ` [PATCH AUTOSEL 6.8 12/15] net: bcmgenet: Reset RBUF on first open Sasha Levin
2024-04-15 10:02 ` [PATCH AUTOSEL 6.8 13/15] vboxsf: explicitly deny setlease attempts Sasha Levin
2024-04-15 10:02 ` [PATCH AUTOSEL 6.8 14/15] ata: sata_gemini: Check clk_enable() result Sasha Levin
2024-04-15 10:02 ` [PATCH AUTOSEL 6.8 15/15] firewire: ohci: mask bus reset interrupts between ISR and bottom half Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240415100311.3126785-4-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=stable@vger.kernel.org \
    --cc=tiwai@suse.com \
    --cc=tiwai@suse.de \
    --cc=u.kleine-koenig@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox