Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp170666lqo; Tue, 7 May 2024 16:30:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUeRur+SEu+lk4HF6dj2AAOeYEeHR8+kRDRYIgiVvAaVpccq1jU1wglEGhyBdlxKJzsjUwVciEvjOcj9as9Rq8JmaSA4qIQKJN9nZwGgQ== X-Google-Smtp-Source: AGHT+IGXa4/qRtcDuv0bwr8fZQcSwdq/Fav1frYQasdq27uLVxdZ/Ka+MKTlsUONPIjXY0ES50+d X-Received: by 2002:a17:902:b68d:b0:1e9:6609:37d5 with SMTP id d9443c01a7336-1eeb0593a98mr10146725ad.27.1715124645392; Tue, 07 May 2024 16:30:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715124645; cv=pass; d=google.com; s=arc-20160816; b=gDW2yRhuRF895Ll2W0ANeYSLTt33MZYWw1X5wcprdHB0Q0hMsSuplOhOk+i19Zu3lf HASu1AznZcbG3UJm7beF9nfDFKD2pRfRWyw1KNIPGttaDfqDkAgIelAaHgauBULHP7/Y FrrSchBGJuT1/5LKmR32rEMBNPW0opC2SiOx00dsm4Zc8jgzPz12UtUkVYTWZiUSYjOr xxHxBndt9pOLIGOrPh3nWOMuOzJY+1zzYC561/v8/QdRgMroKmmCBb3TYopiEjMajASc EfLkp3ZHKxykDHEIWrWSVgRwT8NEae0gkpEk+SpwZXY5+/HpdDYgJTwrlMEmXj+vCtdU lkdA== 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:dkim-signature; bh=3ATdVsCnx71MbAqYE7Hn7lX4KhiX4gQLzXkEQXban54=; fh=bQG/6NNFH8VUYrOkLlt2ceSE0Bgp/TufkQEofkfW+Qo=; b=uQQtERfU64PU4jagFHYlRu+3IVVEvNMZe9PZORT1GbeKml6+R8xtXZ6U93HGPxDTxd fJEJeUcx7W2JuLfikfG0TXqV++M51RzW6uibAR5GTO8tlfDJfxxA+BFJ4psEUZ/Y6Rpf z/9uZ8hEYhSenFhV9Ncq+UeVS/e4IaDJbeMDt3uYaLiks2ZKC2do2OlXy5FrvaEw+EdX gyvjAr+g2sFZczjpbdA2Vl9GWabHtNShHZm7Xn4uFR2jyATnspI/PVCo14BmTC3giqR/ EPxw5XWvlv5weuKQcj2ZPxhosO1gc143l94D4t0wPcMUuoVwXznE3YQmW2kM4PE2t7RO pesw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=htPpgi+s; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-172377-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172377-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 h6-20020a170902eec600b001e96609310bsi10972383plb.337.2024.05.07.16.30.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 16:30:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-172377-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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=htPpgi+s; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-172377-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172377-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 E092128170C for ; Tue, 7 May 2024 23:30:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8C4F4135415; Tue, 7 May 2024 23:09:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="htPpgi+s" 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 ADEAD1448F1; Tue, 7 May 2024 23:09:07 +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=1715123347; cv=none; b=Wq1PeSoHEJJmGRJXrKYewto166muVBDir7OSAH9/dHytkBSG3RGN1ix/ZTl2ZXGlAfHR/ZL09yh99qmSEIBGrLnv0KpKxCxVF1IUWC96CWK/Nlftz2Ff+Re443lE0Pc5561Pc3P1d5Gz0kfmuTC03qj23EHF38d06+uzCvKyd54= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715123347; c=relaxed/simple; bh=bx1UlMCjaomhWcxGibZRAgeKFjpnOPjnJG0euG0Q+Ss=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=VhwTstbiL9cPERjCxwvmtet6Hf4uiqhjru0VXp66M6IbJAFpJjAPL6OSLwz2IZzzaC0F+BjxZPBax7QMkKAi+fPs0iDWCEQShiSsW7BhciIsCAZsegSG6RbeRf+XOsD+BfqOy9gtRJE4rBhiQ+Yi4/k8mKWcDmK6jpkqfwoMzl4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=htPpgi+s; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 959EFC4AF17; Tue, 7 May 2024 23:09:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715123347; bh=bx1UlMCjaomhWcxGibZRAgeKFjpnOPjnJG0euG0Q+Ss=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=htPpgi+sqJdKrVUWlF8u+h5t7DKHhLjDRNbizZjrIqXmwofKZVvsZRM42Dz498IRR q5u+VrbBEQmrblcwFxGQ6TLPRxTF5j3T92Ns3eiAqAsxTNvxkAqWnKWXQCN5QQiEYp tWrng0+uC/DTRHuClJSkeQJAzlAf1uYKOiWsfq7YRZ9kAOnxv0gkSevBeVt2INWNIh XUiIRKFUdyIZB8EXAQJh+Jhr6Ou35JGo9w9GL7wXdnsjhd0ctmQyBQU0aBjww0fcfU yT0FlGXRO1Dyrk7g78zSsHBJB9J1Rz+tog1Jpl276xuxJ1FUp5EWuOq8FKbknuO/7W oqMZyhWtuEzTA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Dmitry Torokhov , Sasha Levin , linux-input@vger.kernel.org Subject: [PATCH AUTOSEL 6.8 34/52] Input: amimouse - mark driver struct with __refdata to prevent section mismatch Date: Tue, 7 May 2024 19:07:00 -0400 Message-ID: <20240507230800.392128-34-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240507230800.392128-1-sashal@kernel.org> References: <20240507230800.392128-1-sashal@kernel.org> 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-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.8.9 Content-Transfer-Encoding: 8bit From: Uwe Kleine-König [ Upstream commit 0537c8eef4f699aacdeb67c6181c66cccd63c7f5 ] 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/input/mouse/amimouse: section mismatch in reference: amimouse_driver+0x8 (section: .data) -> amimouse_remove (section: .exit.text) that triggers on an allmodconfig W=1 build. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/2e3783106bf6bd9a7bdeb12b706378fb16316471.1711748999.git.u.kleine-koenig@pengutronix.de Signed-off-by: Dmitry Torokhov Signed-off-by: Sasha Levin --- drivers/input/mouse/amimouse.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/input/mouse/amimouse.c b/drivers/input/mouse/amimouse.c index cda0c3ff5a288..2fbbaeb76d708 100644 --- a/drivers/input/mouse/amimouse.c +++ b/drivers/input/mouse/amimouse.c @@ -132,7 +132,13 @@ static void __exit amimouse_remove(struct platform_device *pdev) input_unregister_device(dev); } -static struct platform_driver amimouse_driver = { +/* + * amimouse_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 amimouse_driver __refdata = { .remove_new = __exit_p(amimouse_remove), .driver = { .name = "amiga-mouse", -- 2.43.0