Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp1884142lqo; Mon, 13 May 2024 00:54:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWokK/uY8Ef2v5/srniRuG/ZyBhoA8QLbeK0oQXTXJCJRG3mEFvE1CJh3baxCKV1r44oBo5hiCmOKrVx+qBDog/B3Cfcg9lCjr0qA8OKw== X-Google-Smtp-Source: AGHT+IH0NMcZOknd3xzYklppl53X7PnA34X+z3XMuAA/+KCfg1v4avB7AOXdS6BgSGStZy3uIvUU X-Received: by 2002:a25:6802:0:b0:de6:1494:f144 with SMTP id 3f1490d57ef6-dee4f2fe15fmr8114674276.28.1715586852567; Mon, 13 May 2024 00:54:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715586852; cv=pass; d=google.com; s=arc-20160816; b=wBqO38NH3OQ1KdVM7hmVwoLZn4Q28sDJibHroNnSAEzgB9EjoQRcfXboVp/eoh8qCa qlPjD8l7X4W+p9DTFFkKzhmefiVu+6tjjnClIBdcfgCO7tio9SBrs/HD3P03TzcT+P61 QS5OWMFS9xYcEfnypxM+ovKClNIPZLA0KxCjcxaSi5pTG2nnu3xi9q0v3OQUwDzDegr7 lnmJ851Nsmw3KJrUD4mUbgRwNeVME23LUFCMAqm0y87vR8o4r3uoxB+aGL9GoRxEO2VH jYhG+HcHFNAn3VPYEeepvmCslatnTJ6tZCayyfw3dGmWyygbK5W+oQbAL8qy2LbNyJE+ iW/A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=5F/AyWYuRR6g6k3+Pryiwyw5wNq3ygT9Nn0Ympw0RkI=; fh=PrmndChO3WHRnB1kkqkh8qZtciIyPmwLlZ7nKjsRGmE=; b=YFkJO3p+iNGy7D2rR6ws5SAo+zbXeXoJVe20qLOEy0l8sMlYqYoZDTsQy6ADJAljDG KKLGBKWwUqfKVM2eHIDAJtzyP7wtEUBc3gPA8MNVz7WIulSqOb6hYqQ/FfBtgsRSmFOJ FW+t171GeOLyjp3DBmmHrvO+OYwKc454dgk1Uc4Wsh5B9St+wXTpfcIWn5dSNJjW+Zdq Y387NKgA8AGX2B0rMWcG77XDzq9kf1jYg2AbC8NBU+TfSgCUzxrn+lh8o17o5/Qg4VNO tAIdKum/1Pralu5RRyb6tOC4TFDvHH8oaQ7fkdBvqiUDODzhHN1H5yucHfEZct41A0Xy U0Ow==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-177305-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177305-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6a15f29aa6bsi92759066d6.203.2024.05.13.00.54.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 May 2024 00:54:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-177305-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-177305-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177305-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 48E341C203B1 for ; Mon, 13 May 2024 07:54:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 39D72146D55; Mon, 13 May 2024 07:52:21 +0000 (UTC) Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (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 88094146D4A for ; Mon, 13 May 2024 07:52:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715586740; cv=none; b=Br6Wz4TD0ky24duAiY8us8k9APQtD/6ySfLPShHkWkvw573PioHlZP9d3Iwf3RlIFIqsP4QlIf1IkQU8PAPS2Szs4ECB5QtjAsI2z8lE0ZY6bKLmOja1sOFYoXVEHH7d7W11k3o5WC0GFmNtFMMGIc8Lotw8xyAJ8WgMwztjhCU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715586740; c=relaxed/simple; bh=YiWQpfUVhz51i7pucjGEuihmfm4NGHURRmioxAE29UE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=qkS/YtnXsjmNAT3CCOoNoIIigP4XByMGKhg8AyeGs/gtG6HCR9bzPz5rA20a6fTtA1OeVXupNUzMUeEzj/JfCe+Wg13VIcTsCiGT0S0pCFaNnCnQg3HnApiofRgB1701e+6ShQgLDcjaebKRNQOSvrDqWjybQcEtcHYl4iCyMIo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s6QTm-0007T2-0p; Mon, 13 May 2024 09:52:14 +0200 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s6QTl-0017yx-CV; Mon, 13 May 2024 09:52:13 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1s6QTl-003CGV-0y; Mon, 13 May 2024 09:52:13 +0200 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Greg Kroah-Hartman , Sudip Mukherjee Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH RESEND] parport: amiga: Mark driver struct with __refdata to prevent section mismatch Date: Mon, 13 May 2024 09:52:06 +0200 Message-ID: <20240513075206.2337310-2-u.kleine-koenig@pengutronix.de> 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-Type: text/plain; charset=UTF-8 X-Developer-Signature: v=1; a=openpgp-sha256; l=2028; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=YiWQpfUVhz51i7pucjGEuihmfm4NGHURRmioxAE29UE=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBmQcamEm8f/8ndx66W8FXd2QXBvygneFkpwEFpW /SGBWWKfA+JATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZkHGpgAKCRCPgPtYfRL+ TicvB/9lnHwgXeBOzFdnDPBkXdXlpczMnEnlrcXTOCZUT+jVPH3zRX2zkUhU8j8uqlOvlytJJ67 bfZdWvEgNZ4TqV0NmlQy6rLYx36s461++dB8nK5ZUfPGRhVTfIDg73LoQd4tPzEzaRRSBa3cxEw 0NAt4InL038wsaDuZYCkZrmXDItoyyKTSJomzDZRfobJ8yvCOv3n0i8mTcD8q5inRqB8Hw4fHiY /s7BuQzzZSgUEz0FsG54NfLCVutQEizTcYgKA/zScR/wbIGvaYxY/o+dfjnvPDO+sDWAQoY/8K5 5PiCO5+xmrxgFe/hBsLWM9WaS/3D+NkJ5au4kMGoPKxX+8Cq X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org 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: drivers/parport/parport_amiga: section mismatch in reference: amiga_parallel_driver+0x8 (section: .data) -> amiga_parallel_remove (section: .exit.text) that triggers on an allmodconfig W=1 build. Signed-off-by: Uwe Kleine-König --- Hello, earlier submission can be found at https://lore.kernel.org/all/49ab91032bf9b57cd5fb6d306c38884d059dce2f.1711748999.git.u.kleine-koenig@pengutronix.de . Changes since then: - (trivially) rebased to v6.9 - Add Greg to To: as the pings to the parport maintainer don't seem to work and Greg was the one who applied parport patches in the past. - Additionally I held git-send-email wrong for the initial submission which made it a bit more complicated to pick up the patch, should be fine now. drivers/parport/parport_amiga.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/parport/parport_amiga.c b/drivers/parport/parport_amiga.c index e6dc857aac3f..e06c7b2aac5c 100644 --- a/drivers/parport/parport_amiga.c +++ b/drivers/parport/parport_amiga.c @@ -229,7 +229,13 @@ static void __exit amiga_parallel_remove(struct platform_device *pdev) parport_put_port(port); } -static struct platform_driver amiga_parallel_driver = { +/* + * amiga_parallel_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_parallel_driver __refdata = { .remove_new = __exit_p(amiga_parallel_remove), .driver = { .name = "amiga-parallel", base-commit: a38297e3fb012ddfa7ce0321a7e5a8daeb1872b6 -- 2.43.0