Received: by 2002:ab2:784b:0:b0:1fd:adc2:8405 with SMTP id m11csp173530lqp; Sun, 9 Jun 2024 23:25:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW/4A43N3ioJ9MiArpcc5FwP8RfMyFSSkxilNOGve7BeG+iGQ4qsrxudsY2RYtm+UoK1HxC2y39UhBdzHMZgwGE93tOC4R3XyHAo82MGQ== X-Google-Smtp-Source: AGHT+IEFiCoHrS0Uvkv/plJaVN9P69ISgnmB4tEKdduC7Qgp2u6lED1/XFRwgEeu5sRUvUwMKpHl X-Received: by 2002:a05:622a:178f:b0:440:6501:80bd with SMTP id d75a77b69052e-44065018452mr32813761cf.1.1718000724059; Sun, 09 Jun 2024 23:25:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718000724; cv=pass; d=google.com; s=arc-20160816; b=0VVAdZwOEDcx11swrQkmyKhNC8mna4BHhot2gMko4CeJqOzFGa1h5Q7QVa/dvwiuGb gcuhldyRbfzmTkN3EjmVQ8qu2jJYztN7G3r5x8wetXImO7e+uuJFdtF1KfnbD7jm7BGm lAa2kd+wllz807CBJaLtc9uccZa7cc+Kz4/wdEIDmzfkVxIO/+Dv5eoT+eSd7oE4zIGs /1JuHwebDRNiCy0DtibHDZxUHgc9eYDKImryUB5qPNi8AlIlrCcGWc3Uk6V8rsiVRpQD Tct7EBtxZVOT6Or4W5CM/exSj40S3XnIhsjjgXeHfKueaE45AS64g1h9cU4wNpvooC3v DXXw== 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=/B4vf4pTZ3/nCdt+BXZpUnO2EJXjzGYMcK7+73LIL3E=; fh=5aWzWODJn1SEec78/RwglaoBVksxaVpybG50VNrO3BY=; b=wGWiSD8zZOT6Styx6fXNQH8/bjTRPf0cZsUKFU/xqoxVuvV1arW3DG+JDckU06PvPq 225CbBkDQHd9S+fqvDTsjRqbUKhk3Yr3gnCB6i+ojm65QM1jHwy3ETJ6gi/3hlLOTDZd tGXXNTzHI+0YaC9fcxGfkOycSLz1oKwfx2nu24WxmoQBGcZZm0mtwdb61tJucdLPHUhM qIFFqD7jz6hewaK+Xh7O1OTmlkQak9Vp9pE5wm2E5rMVPur+38XarOisWtOV9oR73Agz IoGClG9BVK7KoJ+Gk/fdBX866nvAgBZpReUdz+QfFtTjraTFp1rhJHOY3aU82l5r5skQ COXw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm1 header.b="dDnq/ec1"; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=R6woaBMi; 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-207734-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207734-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-44038b15f1fsi101088381cf.256.2024.06.09.23.25.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jun 2024 23:25:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-207734-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm1 header.b="dDnq/ec1"; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=R6woaBMi; 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-207734-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207734-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id A64451C212C2 for ; Mon, 10 Jun 2024 06:25:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9F2D51802E; Mon, 10 Jun 2024 06:25:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b="dDnq/ec1"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="R6woaBMi" Received: from fhigh4-smtp.messagingengine.com (fhigh4-smtp.messagingengine.com [103.168.172.155]) (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 AE541168C7; Mon, 10 Jun 2024 06:25:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.155 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718000715; cv=none; b=NmMWA94jyITijWd+lNOIWOTuCyqlUyPuftuL6XBA8CZm37OUNZEE8wTDz2wV3G17Xrfow5agzmT6D67FBm8UTGWJpvPnODLSIsSsL2Jlt96lyr2KwaJibmeZG5yjDPPyk+LpMzcuDmi2XQuRNsxlNF3oqcKTuIKXsvr/hTElQlo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718000715; c=relaxed/simple; bh=yC+84WD7XLjLTlzTp+zMGOHHC/5b24EuLBM5a2n8PXg=; h=MIME-Version:Message-Id:In-Reply-To:References:Date:From:To:Cc: Subject:Content-Type; b=lKkwe1IRVa7aJQOOKt046nArshKbsMB1TUHzLiCsS5BaOEks2L8km/2/Izq4CAM5MfENFCB702OazzMVm0zYWHbtfff86/FB8winLqh8YZpTCXudOFmXuBQr/kC3/63lFv31sBNKB6VIhikEXfbZRgm+IMkjBdqhaoRUq6Zr/7k= 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=dDnq/ec1; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=R6woaBMi; arc=none smtp.client-ip=103.168.172.155 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.nyi.internal (Postfix) with ESMTP id C1677114017D; Mon, 10 Jun 2024 02:25:12 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Mon, 10 Jun 2024 02:25:12 -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=1718000712; x=1718087112; bh=/B4vf4pTZ3/nCdt+BXZpUnO2EJXjzGYMcK7+73LIL3E=; b= dDnq/ec17Yx2+l6h/w+3T9+CKHR4t8WKb6ed3Mt2rS1ZWcAVsMZOjEtuVi+WlJ8a jHFIohfpMUruTRV18XVqn2chGmWxCq13oarTuBKRC8p29eZM5x7OGaU7qsI2Qmqn xaIJFu+TG4McVh2SFkwh0avqBi1e/JR8e5UHSUYaEooAJOkCAnthVtMir5iwNDCL ZDGXSvpy58GvWl66r1jOK3WxBKbzX/P6fK4ixzNRwywrt6gt3k6vHL9xp8fo0mAq +8CO645jp8SYkd8agRkxcbHZ/wNRVeNWPi9oN4x4SVbMN1ildCAzw33SaqE8/Ojb 1YPOx5NYlyCudBkuZ/SeQQ== 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=1718000712; x= 1718087112; bh=/B4vf4pTZ3/nCdt+BXZpUnO2EJXjzGYMcK7+73LIL3E=; b=R 6woaBMiD7Zyufu8Wl2EVvhPMpyx+mkAqRsSxe0KwJF6Dm6H5P8uAGeJhDj8+nwGU Y6aHs65XDwn3XG9kJbrUCqHJysxhXeRXJk/2qv0h3tRuRkIrtLNjfF8rFK01FNSQ gjKoNlcpZRakuEt5bC5tFdIcdy69px4knufG6Cn0Chri3CQdypSUE+x0ZpktV69B ik1bUXC9YXq5PqH7RABvJwvDxV2th3ExUOj/L7kV9miebqmDD9Zhqy+VIU1+PzFs GJKBbe6tzd7N554Sf1ueucx1Oy7ooNzkUmPhOzOr1q65/cB4RLViQZXY72AiXYP2 CEeuQG/jNzE+nNyb0Ng0A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfedtledgheduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtgfesthhqredtreerjeenucfhrhhomhepfdet rhhnugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdruggvqeenucggtffrrg htthgvrhhnpeegfeejhedvledvffeijeeijeeivddvhfeliedvleevheejleetgedukedt gfejveenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grrhhnugesrghrnhgusgdruggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 6FE1AB6008F; Mon, 10 Jun 2024 02:25:12 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-497-g97f96844c-fm-20240526.001-g97f96844 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <54c19328-35e2-4506-aa3a-a0b08813d873@app.fastmail.com> In-Reply-To: References: <20240529094816.1859073-1-arnd@kernel.org> Date: Mon, 10 Jun 2024 08:24:51 +0200 From: "Arnd Bergmann" To: =?UTF-8?Q?Jos=C3=A9_Exp=C3=B3sito?= , "Arnd Bergmann" Cc: "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 Sat, Jun 8, 2024, at 20:28, Jos=C3=A9 Exp=C3=B3sito wrote: > On Wed, May 29, 2024 at 11:48:05AM +0200, Arnd Bergmann wrote: >> @@ -154,10 +152,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-test.o hid-uclogic-par= ams.o hid-uclogic-params.o >> =20 >> obj-$(CONFIG_USB_HID) +=3D usbhid/ >> obj-$(CONFIG_USB_MOUSE) +=3D usbhid/ > > I tested your patch with: > > hid-uclogic-objs :=3D hid-uclogic-core.o \ > hid-uclogic-rdesc.o \ > hid-uclogic-params.o > obj-$(CONFIG_HID_UCLOGIC) +=3D hid-uclogic.o > [...] > hid-uclogic-test-objs :=3D hid-uclogic-rdesc-test.o > obj-$(CONFIG_HID_KUNIT_TEST) +=3D hid-uclogic.o hid-uclogic-test.o > > And I think it is a bit more clear and it looks like it does the trick > removing the warning. Right, that seems fine. > Also, with that change only "EXPORT_SYMBOL_GPL(uclogic_rdesc_template_= apply);" > is required. The other EXPORT_SYMBOL_GPL can be removed. > > However, I'm not sure about what are the best practices using EXPORT_S= YMBOL_GPL > and if it should be used for each function/data in the .h file. Maybe = that's > why you added them. No, having only the single export is better here, you should have as few of them as possible. I did picked the more complicated approach as I wasn't sure if loading the entire driver from the test module caused any problems. Let's use your simpler patch then. Arnd