Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp219045lqz; Fri, 29 Mar 2024 14:12:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUmEJQeTyV38VrQWoDDDGr1fKjPOCLzcLLwOk8UYA+SUwg6qj0aUxe9hgzJkxKbxEoGWjuEh0vIDI01UjmeXbIXdM7hQzPXeRV3TBJ7Xg== X-Google-Smtp-Source: AGHT+IFC3l6nZYnaDUlEMWXvo+FNQc5kF7WWCpxmiBaDWxJupi6qFtsnDpyhBj+Z8cmR/bauwBGl X-Received: by 2002:a05:6a21:185:b0:1a6:f93b:e53b with SMTP id le5-20020a056a21018500b001a6f93be53bmr2975463pzb.49.1711746744085; Fri, 29 Mar 2024 14:12:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711746744; cv=pass; d=google.com; s=arc-20160816; b=mUUFfw2J/Sx7UksuG3vuRgISwOD2bU8hrKjizA/ztDmuoG1+is06l7IO4PsHWvqXMA 1neSWzosba704TKl3gz3SI9dfMGtrs69ONXHP9XG2DtOXQ8IaiPadey41v6ahnkeN5vU uCQq291Q0d9uFQcFiIS14cKod/q1YWTUshYJ9ijFPX5ioHOxKDzvHwsGBc8+vgFCdNat 8QRg/jaeqvNw3U2kHqIC8leUPyYIdgw/fIrlcA6yyLfnvYHX6dsJ+L4W6OidqlnG2h4S PB+OvT8fdAZSZbq37ZuqIA4/VqIgnH48+iA2SUetvYrHB0YGWnU03N/wASdCbXyZkxIF tojg== 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:references:in-reply-to:message-id :date:subject:cc:to:from; bh=eyNXiehBqp3o81LBEjEco9jD0WoGbPvLoyycxfgdQaE=; fh=c00v8oZckfT0AJ5Hf9vmMV9VdVokaIhj6gSkweOf5l0=; b=Jlt+LH9UG46lj/3Cy3lwaHFfG1euqkwn07tA8wO6f+PggXnL5a+x7TErPOniJd2tri x9APfDHmkTTjIdUucuBnekg61dmQKW3nXH8xTl3IOhGBmWrz9FOYYnzGI2lvZDX5046B PrlQhugyOLlE+B3WdjJbnm9QBLkuCgUKm05+qTZ3F0yRa6PEAKMazZCHj/iMJVclz38V 0OYcwTanfVTiLLh0RNJTdXxzXfEZ1PxpdDZ4qJWQOpHNPV0tYHFZlS+H4e2NKpc3IpXy cIJsJkX44cl+07p24CpuUYfKeDuJ6qBJvt1pEqcT0Tu451UtKVlEymXmrC0ypgZFHA6Z 8VTg==; 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-125440-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125440-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id o1-20020a056a001b4100b006e546bd270dsi4239247pfv.364.2024.03.29.14.12.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 14:12:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-125440-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-125440-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125440-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id BB095284BBC for ; Fri, 29 Mar 2024 21:12:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8985F13CC4A; Fri, 29 Mar 2024 21:12:08 +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 5DAAC13BC2A for ; Fri, 29 Mar 2024 21:12:05 +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=1711746728; cv=none; b=J7jY3j4NGR+S03gvYm+H03xGcc4QUnvebg+md9/MIBMuiyzgcEe9hAVKKeQw6+aIa/U9mDoyQgnm0Tx1si3JWluEjZNmJPn8T8VpDTvP7da4bolKiavvtf4Plw7yz+KgmE+9lAxbxhXgdu5g1CUjCnXSEqoiVo8nkq1d0K+PjD0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711746728; c=relaxed/simple; bh=+B0EcHTWfRe9T5vqvoCIeZk3emeJgiZZkzvz79SceLI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=tTh0tBcLHgcHyXCe7TBrf2ONHtClEwjodgGRdpOzipM3qkmvDiH1UUXwQINek5L2SlX/85ysW8EXh5NQTKz8+RjSYLu06al3HPACXqa+EhNiu7LTVcEIy355zjwQlppFFYm2f3U8mJayMietkx1dHLz65b2NPy8S+EUQDR8azow= 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 1rqJVy-0001yI-D8; Fri, 29 Mar 2024 22:11:54 +0100 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 1rqJVx-009GFX-Ou; Fri, 29 Mar 2024 22:11:53 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rqJVx-00DTc2-2E; Fri, 29 Mar 2024 22:11:53 +0100 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: "James E.J. Bottomley" , "Martin K. Petersen" Cc: Finn Thain , Michael Schmitz , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/4] scsi: atari_scsi: Mark driver struct with __refdata to prevent section mismatch Date: Fri, 29 Mar 2024 22:11:43 +0100 Message-ID: <0170bda7ac0be3d8b694dca1b2f079fb17d9539b.1711746359.git.u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: 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=1392; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=+B0EcHTWfRe9T5vqvoCIeZk3emeJgiZZkzvz79SceLI=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBmBy6R2Hxu5ahCRTuWgYqbZUR7wXxX+KB9o2mrn drAu51Y5XSJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZgcukQAKCRCPgPtYfRL+ TswvB/9yNSCzyf8x+1PBmtap9Aynu7xZo1qmeWeOk7qFEMxcBKrNT6TUlEW/uX1jylX+/E7S+rz 6B//Pw1yYD3Iv6f9br9/hdRL2MkjyMSRJ+yzt2t2A167Hbhajt1y4sDhYtuRqCgxfcolpfr6bG3 5sFDUTPhgyA84S7eC3bTjQtIyIurIW0IX+f1Lrvx4Gc0CWLdhqXG1SpvKkyKc9wuaxVVg20FIEU 0VZT2jbGtDb/27q3WdOf16OMzsI+ojIFTENOm8HA6idSLTmfqnYSOQyqHzm56TwMdxlsEs3ccXU rHOwVb/Dm6LDcPqmmSjvj6D60TllXTCdZ3Twl8UdG+yQzzDc 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/scsi/atari_scsi: section mismatch in reference: atari_scsi_driver+0x8 (section: .data) -> atari_scsi_remove (section: .exit.text) that triggers on an allmodconfig W=1 build. Signed-off-by: Uwe Kleine-König --- drivers/scsi/atari_scsi.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/atari_scsi.c b/drivers/scsi/atari_scsi.c index d99e70914817..742625ac7d99 100644 --- a/drivers/scsi/atari_scsi.c +++ b/drivers/scsi/atari_scsi.c @@ -878,7 +878,13 @@ static void __exit atari_scsi_remove(struct platform_device *pdev) atari_stram_free(atari_dma_buffer); } -static struct platform_driver atari_scsi_driver = { +/* + * atari_scsi_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 atari_scsi_driver __refdata = { .remove_new = __exit_p(atari_scsi_remove), .driver = { .name = DRV_MODULE_NAME, -- 2.43.0