From nobody Sun Dec 14 21:33:16 2025 Received: from albert.telenet-ops.be (albert.telenet-ops.be [195.130.137.90]) (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 06928195 for ; Wed, 5 Feb 2025 13:10:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.130.137.90 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738761060; cv=none; b=ithtr1GgfTD7bIvYWan01ToJrGvT3AOqK16NwtFCqFx1Nvu3bQ17V4Op3iIdw+gJHIYMVZaT9F0tqjZ9iMOLETtDeAyjSmeiHT59Gkp24QEn5gQ/JEuUmsE2x8YYdMeJkcDURX54wvFsQH0sUlyRUPTRpm4R6Xab5I9JooGEDNk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738761060; c=relaxed/simple; bh=UW4vifzm9dK7PfgtyUA+yHCYk90qPhir9yw0Dk0X//Q=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=TmbCXsproeZxVvT9wxm37KV6fO7hT4sDWqZXLNNbUN2Xy9+BUh6cTovrv6CgNaYy3KlohguiWoSdltw59Eu4bLl/I/Hhx6uCHK/wFOdp/lKL4NyE+BQc9HXIYXqQzJiNQIridJ7aYC8XMuil2DpeT919fxMLeLN0sAtbWaC+2rk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=none smtp.mailfrom=linux-m68k.org; arc=none smtp.client-ip=195.130.137.90 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux-m68k.org Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed80:fa11:c14e:2df5:5273]) by albert.telenet-ops.be with cmsmtp id 9pAn2E0063f221S06pAnbB; Wed, 05 Feb 2025 14:10:47 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.97) (envelope-from ) id 1tffAp-0000000Fva6-0B9f; Wed, 05 Feb 2025 14:10:47 +0100 Received: from geert by rox.of.borg with local (Exim 4.97) (envelope-from ) id 1tffB1-00000006Q4S-0QzP; Wed, 05 Feb 2025 14:10:47 +0100 From: Geert Uytterhoeven To: Dominik Brodowski , Aaro Koskinen , Janusz Krzysztofik , Tony Lindgren , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Cc: linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH v2] pcmcia: omap_cf: Mark driver struct with __refdata to prevent section mismatch Date: Wed, 5 Feb 2025 14:10:44 +0100 Message-ID: <06d57da75b583822a541b2eb9f28b172b3487183.1738760740.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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.tex= t) that triggers on an omap1_defconfig + CONFIG_OMAP_CF=3Dm build. Signed-off-by: Geert Uytterhoeven Acked-by: Aaro Koskinen --- v2: - Add Acked-by. --- 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 f0ccf479f36e5223..9bb80b47f0c453fb 100644 --- a/drivers/pcmcia/omap_cf.c +++ b/drivers/pcmcia/omap_cf.c @@ -302,7 +302,13 @@ static void __exit omap_cf_remove(struct platform_devi= ce *pdev) kfree(cf); } =20 -static struct platform_driver omap_cf_driver =3D { +/* + * 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 =3D { .driver =3D { .name =3D driver_name, }, --=20 2.43.0