Received: by 2002:ab2:715a:0:b0:1fd:c064:50c with SMTP id l26csp23687lqm; Mon, 10 Jun 2024 11:25:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUPv1EYPV63pFwCMSpN8soLz3Ltl+A7ExL3hdXBdmUpDuJh1wjL256oga1G43LMFULHXoH2ZNVXTPXt3hOa3bf6z18vy/R8wvd/atmnZw== X-Google-Smtp-Source: AGHT+IGIg3M7OZ0Bx7FAxWxTHMAkgJC2EV8znMkYTlPAPXhqV2piW8ru96jSmaPW7k1m1/CGh9z4 X-Received: by 2002:a50:d61a:0:b0:57c:7303:a9ff with SMTP id 4fb4d7f45d1cf-57c7303aa6dmr3368103a12.6.1718043949009; Mon, 10 Jun 2024 11:25:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718043948; cv=pass; d=google.com; s=arc-20160816; b=r+tiveVOuzM2GXXMKA5L7v7XJqKm13Xi4cQLe9eYtkuNcAoBucmwhCNnqBav+TQjD6 INtja38U4JVPLiHGQBqaEnHg0+j0ZBl4HBDQ3EPlsUT6AxY5TP9QfrlhyY/cueTdMN1c 56Ig+m+64OQ8dc68+8ZAmCG/gBRCzhsRnTUzLQy9HGwcxZYvoHh+WSA8GCBb022sDjDj UdxbTBnkeOQLYP9C4A3dp/hswejMSKZNeUnS3Et9pf0LkzEYOg/Ey8Ib338JUGD6XDjo +tG86Uf3oSahNQ/6eLOLkCUjxtS1/Dv8NIemAv9Iu9RGnSjyLU1PUfyVpRG8pw4nO88Q RrBw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:subject:cc:to:from:date:references :in-reply-to:message-id:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:user-agent:feedback-id:dkim-signature :dkim-signature; bh=vY0HlAqLR+9vVLht9gOAcC05xIRzjm1Orljq/RiGYz8=; fh=r7d1MLb0kOIitWSAm02+ucv2/uN9cy5tGabPHzQQsOM=; b=DWlHHp7FxQtkh0DWQtna0vfH/xSLHUSpDrRBRWk/58hFeA1A5SgV+0XwheNvyfhA9c +RZpu+MXhrgj7DiuyboGWRAF6OBHmX7V54nyO9Js416Q4mYaAop+/prKwDGAbj7dtqgq cyQ/70UfnwbOg9yKHMRs50Smdk/b9cIwWDf51bgsr7Cz8m+vZ5RnDh/xOmxhD5InoTMC 2iup4yHspLyHPI+KhSbOBSuFGqWy54K+bHw6Zg+lKEDExF85AQerne55Sj7bG/CKCokT eTm6K12m9glC9zl0d+Y8W9ztnfgPygRAWIIF9wTfnFYIN9YHPpCTlCQLrnGDsfgqMkql S/cA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm1 header.b="B/67php/"; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b="aZVo2f/h"; arc=pass (i=1 spf=pass spfdomain=arndb.de dkim=pass dkdomain=arndb.de dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=arndb.de); spf=pass (google.com: domain of linux-kernel+bounces-208728-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208728-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57c60c5b41esi3486929a12.593.2024.06.10.11.25.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 11:25:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-208728-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm1 header.b="B/67php/"; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b="aZVo2f/h"; arc=pass (i=1 spf=pass spfdomain=arndb.de dkim=pass dkdomain=arndb.de dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=arndb.de); spf=pass (google.com: domain of linux-kernel+bounces-208728-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208728-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 8815A1F2227F for ; Mon, 10 Jun 2024 18:25:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0F27314B95F; Mon, 10 Jun 2024 18:25:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b="B/67php/"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="aZVo2f/h" Received: from wfhigh3-smtp.messagingengine.com (wfhigh3-smtp.messagingengine.com [64.147.123.154]) (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 C7D4215A8; Mon, 10 Jun 2024 18:25:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=64.147.123.154 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718043941; cv=none; b=X7p0eFqd/nmdPw74G1+RwQkpLtmLwDxFS/0I1WchQNEniRwchuaVycWA2SFI3UfYbr1Xsr8GfST3Ej+3s0cpRg/7yLF3YmG/gqm85mb9jU+Iig0gtc0bzjGLTKmYYGRz1yMFQUVp1txHyvyCU1GhvogX4PQtO3QEuZKpRe1IFbY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718043941; c=relaxed/simple; bh=aP9cBapF3uNo1FI3ZpJLWwcc9xHK/PpDMbxjJDR6N/Y=; h=MIME-Version:Message-Id:In-Reply-To:References:Date:From:To:Cc: Subject:Content-Type; b=tHPfac90X8fTPp/6a0BjU7kGpif2M1hKDyGInksFbMr+5UWAMpDbc9R83AodxBbCPPszNPTV7lUI2Xa3hTMQ9DpVe+/WIiSpp9rzjy/uBkUf50uxuNlsXHNidvh+TOnMqExy5Jm3bFCC6PCU/9hmoxywewt3WK1/q15TI8FYeys= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de; spf=pass smtp.mailfrom=arndb.de; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b=B/67php/; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=aZVo2f/h; arc=none smtp.client-ip=64.147.123.154 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arndb.de Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfhigh.west.internal (Postfix) with ESMTP id 43FCB18000BA; Mon, 10 Jun 2024 14:25:38 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Mon, 10 Jun 2024 14:25:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1718043937; x=1718130337; bh=vY0HlAqLR+9vVLht9gOAcC05xIRzjm1Orljq/RiGYz8=; b= B/67php/Rvpfq7xJAzp7JETj7d7LxHNcEYBxCdZr2S0xEY/COiXxiARQQna1g5Zx UEAlfrtPB7ai5Qd7HPLxRFqWz6Hcp/9htXjSKG1G4Qwlpni6k/gIVrFTqyT5RCjn mHFLW3N4ZXOCaAsOME1le4k8Rq6jD+j19ABgnW3FGiE2CjNVc3AIV6Ws60lvEyiv Pwbwbngbgj7EKe7pxaUUJj3YO9AYyCd+89jdBZ3FcFZiaMS/mQu6J6Uynb9hz3bg ToLd+vIcr/VLg4hTMIrU8ca+wlSP0OmYZ9VGDGclKQfPal0Li8colOpeRjsaURVl 13fP/OF7iGWgFHBhy+9ZKA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1718043937; x= 1718130337; bh=vY0HlAqLR+9vVLht9gOAcC05xIRzjm1Orljq/RiGYz8=; b=a ZVo2f/hcnhew9AfvgyeNJcm0bu7wzwdwDPcA8GSCbPWmQOq62Z4qBKvxBy6p1jct 1+o+1E2SKuH/nW3wGR2d9Ce5y8hdCd4OYpzkUrepbt9YgLp4ftO8fn3CdR8kQuIU T8XSp9rO4hJc6R6XR0eJQItTiNUsuFpsiMdi8WhD4ltHM6r448u6oa4s5X5klJ/7 jiQ/afvr8TtBIVJOyShLcyaOvMPZ2uUQCoyMsBtasxmvZpA8HLJB5xMUWxlqyDt5 jizyWUDJTBpv8LxRYGOyoX5xNIO51/RTJsd0XynhNNFI1v3DQX1qbJnsPfQfK5ZL uWPhw2qBfbJ5LLD9qR00g== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfedutddguddvgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvvefutgfgsehtqhertderreejnecuhfhrohhmpedf tehrnhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrf grthhtvghrnhepgeefjeehvdelvdffieejieejiedvvdfhleeivdelveehjeelteegudek tdfgjeevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh eprghrnhgusegrrhhnuggsrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 5554BB6008D; Mon, 10 Jun 2024 14:25:37 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-515-g87b2bad5a-fm-20240604.001-g87b2bad5 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <8d93cdd6-379b-48e7-8a10-9df190b12623@app.fastmail.com> In-Reply-To: References: <20240529094816.1859073-1-arnd@kernel.org> <54c19328-35e2-4506-aa3a-a0b08813d873@app.fastmail.com> Date: Mon, 10 Jun 2024 20:25:15 +0200 From: "Arnd Bergmann" To: =?UTF-8?Q?Jos=C3=A9_Exp=C3=B3sito?= Cc: "Arnd Bergmann" , "Jiri Kosina" , "Benjamin Tissoires" , "Rahul Rameshbabu" , "Fabio Baltieri" , "Ivan Gorinov" , "Johannes Roith" , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] HID: uclogic: avoid linking common code into multiple modules Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable On Mon, Jun 10, 2024, at 18:57, Jos=C3=A9 Exp=C3=B3sito wrote: > On Mon, Jun 10, 2024 at 08:24:51AM +0200, Arnd Bergmann wrote: >> On Sat, Jun 8, 2024, at 20:28, Jos=C3=A9 Exp=C3=B3sito wrote: > > Turns out that, since the last time I checked the KUnit docs, > we have "EXPORT_SYMBOL_IF_KUNIT" available now. > > I think we can use it and your final patch, without the MODULE_* > changes, could look like: Looks good to me, can you send that with Reported-by: Arnd Bergmann Acked-by: Arnd Bergmann ? Feel free to take my original changelog text if that helps Arnd > diff --git a/drivers/hid/Makefile b/drivers/hid/Makefile > index ce71b53ea6c5..e40f1ddebbb7 100644 > --- a/drivers/hid/Makefile > +++ b/drivers/hid/Makefile > @@ -154,10 +154,8 @@ obj-$(CONFIG_HID_WINWING) +=3D hid-winwing.o > obj-$(CONFIG_HID_SENSOR_HUB) +=3D hid-sensor-hub.o > obj-$(CONFIG_HID_SENSOR_CUSTOM_SENSOR) +=3D hid-sensor-custom.o >=20 > -hid-uclogic-test-objs :=3D hid-uclogic-rdesc.o \ > - hid-uclogic-params.o \ > - hid-uclogic-rdesc-test.o > -obj-$(CONFIG_HID_KUNIT_TEST) +=3D hid-uclogic-test.o > +hid-uclogic-test-objs :=3D hid-uclogic-rdesc-test.o > +obj-$(CONFIG_HID_KUNIT_TEST) +=3D hid-uclogic.o hid-uclogic-test.o >=20 > obj-$(CONFIG_USB_HID) +=3D usbhid/ > obj-$(CONFIG_USB_MOUSE) +=3D usbhid/ > diff --git a/drivers/hid/hid-uclogic-rdesc.c b/drivers/hid/hid-uclogic= -rdesc.c > index b6dfdf6356a6..6c7a90417569 100644 > --- a/drivers/hid/hid-uclogic-rdesc.c > +++ b/drivers/hid/hid-uclogic-rdesc.c > @@ -17,6 +17,7 @@ > #include "hid-uclogic-rdesc.h" > #include > #include > +#include >=20 > /* Fixed WP4030U report descriptor */ > __u8 uclogic_rdesc_wp4030u_fixed_arr[] =3D { > @@ -1242,3 +1243,4 @@ __u8 *uclogic_rdesc_template_apply(const __u8=20 > *template_ptr, >=20 > return rdesc_ptr; > } > +EXPORT_SYMBOL_IF_KUNIT(uclogic_rdesc_template_apply); > > I hope that helps, > Jose