Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp925147lqs; Fri, 14 Jun 2024 09:23:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVMLbk48QB2Nm/3SxDSZqa/ITn+EXp31Tf5jAaa1/V71XkEh+Lz8liDQhxTjZUbNElqDghUClOiz/39AoXYoDJGlEOX1fwAoy7qa+Rsbw== X-Google-Smtp-Source: AGHT+IExECXKz5VQ3LYznXE4F1WbVSOfPqZ91v4qjzcMJVvNjMxZFRfCP34AQXaFQkSZl6MoTua7 X-Received: by 2002:aa7:8a47:0:b0:6ed:d8d2:5040 with SMTP id d2e1a72fcca58-705d71bd78dmr3757618b3a.21.1718382181478; Fri, 14 Jun 2024 09:23:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718382181; cv=pass; d=google.com; s=arc-20160816; b=vwlTTo15FDOAXeeB+KK6lEQ1TKVzjJwK5EZ6VQqUM2QGVPjEOzllqHoQ6Lea2KnI0K 1SneDHmWiMNGSHJ9vinp/m+PgTX5vNoFvsxPdf+AMbQmrGMqqgbtIljRR2CfSIqFtOWD 0ug61IKbKImHhFA8WCAWhL8/YmM3AiGTTJPh70QEtE5ABdH7lPD9mtUUN7hkGZ8ON9yh laQayJlyIfaABQzVu9zuAP6uZM56GWEQmpgBQdW9fEgSUgR1bfZlubtLZfswa89QAti4 e2ndmw1dCIb517EMOzJAj2/bKRYW4HtxIJRPjSLmSd+rV6Lf5nHib+NiERKiMWi4989v mZqA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=mHoUDsPBAFKjfdKT2Wcw7fH+ZbNcrP0Oy7YLPMG/sbY=; fh=/paKmLdxuBREixPJS4pZiT4frQiiS8DaiQ62t/RmwC0=; b=LyE4l/heUQ6xKuEieWt0WhaZiZp2jELscA0pAC0EqZlYlCmpXWdXJQU6wV08MzOxWt TY7tSN5yK8PAkIcbXGlqsgksaFOOJfdvWhHXk2C81D2xShogKLr+0lvLs2C7KOtB+IrZ Stqiyke4XbrNQ0KuKIEjGcUlnfn+O/J6MOMRPWQMB0oEJZCDUpxY9UyYiRgpFeH27JhQ zP9BXfBWYjBh2xSQU8s6n8QvNs5fY7rV0nU0r3mHrfi2bv7rxo3f2Zt8dob/7NP++f/9 Q/8d68SBJ1n4+YfIsU27nvJS+f+sdgLXPjb/kT/W3XmvLRf4qSGTnXEkVH/rtYt+BeFX GeKw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=KcbTtm8a; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-215229-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215229-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-6fee53a1419si4046657a12.630.2024.06.14.09.23.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 09:23:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-215229-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=@gmail.com header.s=20230601 header.b=KcbTtm8a; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-215229-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215229-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 1C5CF284C66 for ; Fri, 14 Jun 2024 16:23:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3C44A16FF5E; Fri, 14 Jun 2024 16:22:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="KcbTtm8a" Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C502116B751; Fri, 14 Jun 2024 16:22:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718382173; cv=none; b=h1QU6T87EGIPY3DlSTtw7J38qb/xJLK15YAsN480dPYI1OUmvrMDck4N8M9f3iH2WWSUosOXZH9OmGSbmi7TkJsQTsLYFKv63i1A509qmx6ppgdZkmrP8h0Q18u/33Wj1D/uuP7mktMN602quDBpPjsBzfy1r51tLJs+hRkRNaA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718382173; c=relaxed/simple; bh=fnbAgLOTfMMiJeUuSE5XbkbSe0qtEODYCIGVydsfSfI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=qZUHZtnqfZ+FZ3GsfHwISnYzQGgvQeT7JSTZVGdnl3edy6UaDP0U4R1r1JXZyvXp+vKZgnQaIbzXxwC4+K0AdECv30WVB7q3XOkEG7BffjDev57y/9Q9tk+pK9Bn3lb5v3ZJEW24/PToVCHbQRs4VvPGBew55m/WEgAvO2yk8YE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=KcbTtm8a; arc=none smtp.client-ip=209.85.128.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-421757d217aso26020765e9.3; Fri, 14 Jun 2024 09:22:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718382170; x=1718986970; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=mHoUDsPBAFKjfdKT2Wcw7fH+ZbNcrP0Oy7YLPMG/sbY=; b=KcbTtm8aNLnqD2RRn/UprMEj2qky6ffWZHBptC1rtHNVAKrxSED57LKjuUYBtZtHR5 KBHOnLAPHaOT4vtxOPL0tMp/F3jBfIZZMAa+G0etzRlPqa+dY40amGlDmTSzqmlYEl4g bTHL9qepD6P2E087UZN2Lv5hRNhpoZLJH78u3h9/eHNLInJtaMGMfSfvlCAWLQVuhcr2 T3Ib3AAuNjS+MvsnY91ms0TBEU2UQg8GFKN7lBjknW03ITVRrY2INvpGJwaTjOk1Ab7H PpMszVgyiXWLdJ1tFfF2bAvAKd9JI6iL+sz5WqaH2TGmA5gQrRh/qw/2FwhkoAe2/GKo zZGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718382170; x=1718986970; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=mHoUDsPBAFKjfdKT2Wcw7fH+ZbNcrP0Oy7YLPMG/sbY=; b=XSxe/1nzCW8aY7ImkfMMAltbWwONtYcg0k9oi4tGN22b48hZolrhXNG2xs8I7yESyd Ia/Xpap0QiE8AeOHsg09CL7mTc2i6p14Gt7wawq83FkNqhNVlv+SwxHDnkVX6GiKx+XP W2GDvlJoeUR30/VpXAl5xjPPlnu2ajzeyHjvFm8Xw2/U00LEKuVGUkBWGuNP82QGjrpT iLXJMjBbzCxavIVoKgu44fgfxbiYMnZO+oeYp664Xe0tTxVx5jcb8fFDV8Yv0bn34qLC R4zR2zAfcTaJBIrxIsni1EiPk4GyRljSA7CMW38tVpkwX6LiIBDoomSrXyTxzMixoK6Q MaPw== X-Forwarded-Encrypted: i=1; AJvYcCX7/Qi9faH7SuUhG8PnndrIqS+n7SmyrfP1rL86PUpT/BilKs12ZcVW5VwF4hb7kcOrO1YawYfoY9m1MUnVkUGR9gb8OanFjeL621NfVIjQ0HPCvv6eLGRAVI2+9GHsUN/1RqtC6GbKwHE= X-Gm-Message-State: AOJu0YzE6TBjCF3bHaSILHgtCEl5mYUMx6+TkggwF0Pb+9wXO1DviZ+K UM/KLLwyOVgTDYQ3wvZ+Kla5eXjmx8XXgRFsUsmYvO+f/j+eBxmD X-Received: by 2002:a05:600c:32a7:b0:422:1a82:3ed2 with SMTP id 5b1f17b1804b1-423b506058amr4577075e9.27.1718382169973; Fri, 14 Jun 2024 09:22:49 -0700 (PDT) Received: from fedora ([213.94.26.172]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-422f602e0c2sm66620215e9.14.2024.06.14.09.22.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 09:22:49 -0700 (PDT) Date: Fri, 14 Jun 2024 18:22:48 +0200 From: =?iso-8859-1?Q?Jos=E9_Exp=F3sito?= To: Arnd Bergmann 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 Message-ID: References: <20240529094816.1859073-1-arnd@kernel.org> <54c19328-35e2-4506-aa3a-a0b08813d873@app.fastmail.com> <8d93cdd6-379b-48e7-8a10-9df190b12623@app.fastmail.com> 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=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <8d93cdd6-379b-48e7-8a10-9df190b12623@app.fastmail.com> On Mon, Jun 10, 2024 at 08:25:15PM +0200, Arnd Bergmann wrote: > On Mon, Jun 10, 2024, at 18:57, Jos? Exp?sito wrote: > > On Mon, Jun 10, 2024 at 08:24:51AM +0200, Arnd Bergmann wrote: > >> On Sat, Jun 8, 2024, at 20:28, Jos? Exp?sito 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 I couldn't add the "Reported-by" tag because check-patch throws a warning if it is used without a "Closes" tag. Other than that, I sent v2: https://lore.kernel.org/linux-input/20240614161935.230529-1-jose.exposito89@gmail.com/T/ Thanks a lot for looking into these warnings! Jose > ? > > 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) += hid-winwing.o > > obj-$(CONFIG_HID_SENSOR_HUB) += hid-sensor-hub.o > > obj-$(CONFIG_HID_SENSOR_CUSTOM_SENSOR) += hid-sensor-custom.o > > > > -hid-uclogic-test-objs := hid-uclogic-rdesc.o \ > > - hid-uclogic-params.o \ > > - hid-uclogic-rdesc-test.o > > -obj-$(CONFIG_HID_KUNIT_TEST) += hid-uclogic-test.o > > +hid-uclogic-test-objs := hid-uclogic-rdesc-test.o > > +obj-$(CONFIG_HID_KUNIT_TEST) += hid-uclogic.o hid-uclogic-test.o > > > > obj-$(CONFIG_USB_HID) += usbhid/ > > obj-$(CONFIG_USB_MOUSE) += 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 > > > > /* Fixed WP4030U report descriptor */ > > __u8 uclogic_rdesc_wp4030u_fixed_arr[] = { > > @@ -1242,3 +1243,4 @@ __u8 *uclogic_rdesc_template_apply(const __u8 > > *template_ptr, > > > > return rdesc_ptr; > > } > > +EXPORT_SYMBOL_IF_KUNIT(uclogic_rdesc_template_apply); > > > > I hope that helps, > > Jose