From patchwork Fri Jun 14 16:16:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Sm9zw6kgRXhww7NzaXRv?= X-Patchwork-Id: 13698932 X-Patchwork-Delegate: jikos@jikos.cz Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (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 F129D192B7B; Fri, 14 Jun 2024 16:19:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718381984; cv=none; b=MnuTRR7pxf6dIBY0Ou5qBF8B1m6zgWP1t4ToqvpxnuF0beAWWlb9fH58CjxNK60/vkwdWU7eM+AZp3AkcCrJeyZ1VlByoKeWwj4PjuHfL2ibl2BnMDg0jMP8nQQ+rpFmQfN9oIMr992ILlFjNPEvuZ7w7cUrLoGq/rPl4gNdki8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718381984; c=relaxed/simple; bh=A8ti7FkIhPnz4QDYyrWnAxpZlEHI2kD6idXCq/AEJOw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=IbigzEAmaKAD7U+jSiZqNDqYJ5xG7aIKjVp84ddOp7/QfpmRxDxUoW4kMGt7FzEpBI5Bw7w4kwkQVeCvc39YWc+98VSSTdlBcmasWkjWCPGnTYNtOe4Aoz+lVC52/1UdKnuVM9s9nWgCUCGbAzTbsLbqCUBZTPJg5UlsXI8u6Qk= 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=VjZM7oQe; arc=none smtp.client-ip=209.85.128.53 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="VjZM7oQe" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-4218314a6c7so21623665e9.0; Fri, 14 Jun 2024 09:19:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718381981; x=1718986781; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hx92rTQEBfMt/TWKPgxcRiRauNazbCbxwV3wI4CW7v8=; b=VjZM7oQePWox5Ft/HX09S8oMegCcR0LLxNzMCSrV4g8pKMpO5QoL7hoN/UTPxEiuZq 8k3jmlUUePhXTtZ4dhwZcFAjORmZLjsEdoozFLcuLEJtMPYj/jkwo+bysnVl444lUwSY WrjPbkNDVvMjem/Y/+2ISOo8hYPXcS1AmCGxpx3pjEoEKmCxUrFR4Lg/wj7GjaxdyJaW mYQ1951kl9K1LLVL8BcRaHjF8K5da6sawxKptIHXTXwnBk7zGs/Vtp+8TzPPGl0uV5iE 5G/LPGKrQOn1dSmrQxJFars4NpMNzkdiOxvNBLfHWCurnSMIg2BxbGYcbpYZDxNSHIoL XR8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718381981; x=1718986781; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hx92rTQEBfMt/TWKPgxcRiRauNazbCbxwV3wI4CW7v8=; b=Md8jyvBOfpOC/BrlaSbUI5Rhv2f2g/VTlw/R1c8z4fgLiPmTLcaDcG9lTYVN5EQ+yB yr0unY3WC8qjd24Uoe+vv/caIr+DVbIkyY/Kn+vXEKWhhjswu7fGCSqw7dBKQkPlG37Z WD744Do/ImfyaOFpzucqCthE8izAc9MHbwstgwSNPm4ofkKgZFoM9OO9HbtRDwtOIVf0 Ir0Smw/na+24h7YiTOBZBVEz2V9C1RF4wd1pqBbsYySjpGdOEwGIAnmKuQC81e9IFJSb VlmQzq+p5S+ILbzRLEM0HxjOtqcHlX226yKepR8KVEQBkHU1OJSLsaP+FYSRMzTrqb7k JBpQ== X-Forwarded-Encrypted: i=1; AJvYcCVFlWArnWzVc0MJoAV+3qPhjcztuxzvap98kfavfBjzqY+HJPOPdcBURxsHHKohpoKUxiuO3LFVgzToG7yu0jYGnsCRhJH0pPeeSUVtEK0WNpPswDl4rdIUjwyoPbuPyEYqvwxpu4UWYIs= X-Gm-Message-State: AOJu0YwDsCq4cJeZK4pwpWn6sD024FHiQQUIwA0QtZmQuLAzf3/PGRCZ F65bVe0l+LKGmyxknjOLEoKhsKUP3tcCNIQJ4DGZ86ulTpVsg2ju X-Google-Smtp-Source: AGHT+IGQC227lpe6RF1fg6+a56ixyE3sDU3b3R4G828UvCIRli7H9wPpBrFY7HoX6QHyJz1ozSm+Hg== X-Received: by 2002:a05:600c:4588:b0:421:6b83:2a65 with SMTP id 5b1f17b1804b1-4230482fcb4mr29779925e9.17.1718381980994; Fri, 14 Jun 2024 09:19:40 -0700 (PDT) Received: from fedora.. ([213.94.26.172]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42286eefa63sm104638905e9.1.2024.06.14.09.19.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 09:19:40 -0700 (PDT) From: =?utf-8?b?Sm9zw6kgRXhww7NzaXRv?= To: jikos@kernel.org Cc: benjamin.tissoires@redhat.com, arnd@arndb.de, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?b?Sm9zw6kgRXhww7NzaXRv?= Subject: [PATCH v2 1/2] HID: uclogic: Avoid linking common code into multiple modules Date: Fri, 14 Jun 2024 18:16:05 +0200 Message-ID: <20240614161935.230529-2-jose.exposito89@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240614161935.230529-1-jose.exposito89@gmail.com> References: <20240614161935.230529-1-jose.exposito89@gmail.com> Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The hid-uclogic-params.o and hid-uclogic-rdesc.o files are linked into both the driver module and the unit test, which triggers a W=1 warning: scripts/Makefile.build:236: drivers/hid/Makefile: hid-uclogic-rdesc.o is added to multiple modules: hid-uclogic hid-uclogic-test scripts/Makefile.build:236: drivers/hid/Makefile: hid-uclogic-params.o is added to multiple modules: hid-uclogic hid-uclogic-test Avoids this by moving these two files into a separate module that is used by the driver and the unit test. Acked-by: Arnd Bergmann Signed-off-by: José Expósito --- drivers/hid/Makefile | 6 ++---- drivers/hid/hid-uclogic-rdesc-test.c | 2 ++ drivers/hid/hid-uclogic-rdesc.c | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) 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-test.c b/drivers/hid/hid-uclogic-rdesc-test.c index 90bf4e586e01..d6b18213f45f 100644 --- a/drivers/hid/hid-uclogic-rdesc-test.c +++ b/drivers/hid/hid-uclogic-rdesc-test.c @@ -9,6 +9,8 @@ #include #include "./hid-uclogic-rdesc.h" +MODULE_IMPORT_NS(EXPORTED_FOR_KUNIT_TESTING); + struct uclogic_template_case { const char *name; const __u8 *template; 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); From patchwork Fri Jun 14 16:16:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Sm9zw6kgRXhww7NzaXRv?= X-Patchwork-Id: 13698933 X-Patchwork-Delegate: jikos@jikos.cz Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (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 3A28D16F0EA; Fri, 14 Jun 2024 16:19:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718381985; cv=none; b=gUuPirLCvb2m8F2dHVmcV8so5C/0ycpcF79w+uYGjh4dGvgk4tEcjMbwrSMxrIm/WkzA/FX8Uacxs51Xwgpl+Nqx87PyO+XEuKq7IBqQaRnOZhmvQVjiBUcsqoAKKQ0SoEyCgY8emHJhhPHfjZZ6yo0MEA2aLjM6f+yzuclThX8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718381985; c=relaxed/simple; bh=pzm3S6HMOVeyFWqYZPhrsR55wYxhjLxv/jUioaadojA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=RyhlmIQWTvXYBtpXbxbIyT3ohX+GTEOMpuzBMD05KYJ47vwCIA05pEbeTjk8BAuhJ0wVBHeGiXyHnXzMUXfYcHLbCxADCrYz3/q4vQHaFfmJ8q8Eb6lkX4vdpxvB8xBUT5WVgnO03XoXx4GEeyILs2WDJbgw/V1nJAfSId6oPUY= 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=R4PqSPx+; arc=none smtp.client-ip=209.85.128.46 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="R4PqSPx+" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-42172ab4b60so22812295e9.0; Fri, 14 Jun 2024 09:19:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718381982; x=1718986782; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KOug+sGnOedNaeHuAUNT9DOu+x/5Y4V1q2YZhTmFj8s=; b=R4PqSPx+Gu6CYt1tKKiNMmc1IonugGa7oIMIbHZuW6s4y3tx5p8DVxVYYtBVo9c3T9 Q4TZYPXamLTNEsNGdhdufUGzZKDjGDSlLTZOGFJfZMRb7e9u96Ks2BV6M5884spt+kdK GNkJhWWrXWquMhE/lDBgFFHXQ5vbjEzyjRim81M+3l3u4q8rf9TBEJ4qpsyNIk1wbFNO lcasnxknX0dYmDrcLxQuEtmo1yGeJ15dTqmknWPqo2+P2Pg67IzaXTXujrtNLBWf+Ck4 DrJHbvlEuoC9scrsuhwJCqbRZq7C7Wl0PdbvIw81Qa/zHcJ/cXT75lddIf8c2bQRYqaC /IsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718381982; x=1718986782; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KOug+sGnOedNaeHuAUNT9DOu+x/5Y4V1q2YZhTmFj8s=; b=KiAga5+QWpgQhFZFYfVupAG9pzfJ2e5xh3z5WhUTnPaYZ9yDyo0sW1F5OvaK7ZZzFH NI+H8QKmpyEORzy9d3vpAE6Kfi9UhyXFx4tHYLFwsaQSoqZjhVuooVj6KWX1h2/xEqtk irsCaRdXevLooICyNXfGUWEN3d8FtrzIzgz6xMMVWaxqP/Z5Ocbed0BJHAXa8rEJsUaA AOpIuwoOOWzErAqrxaR7RTBSe7W25YrgAFK2QanJzj9fL4LXfqSn5meJBDmfT7REez+z IYHQz5hwcCput8aozUM+5ONnOis7Z3mlm9Lb4bs0ra6CXj4/XQMSt6paQbihU0a5WeNH LKCA== X-Forwarded-Encrypted: i=1; AJvYcCX9MzSnYbTu41QSItDfagpHaB8u0rw5kK1cYn0q+dGGoxDyYrDnSzngFAwAQezBuTSHOdrGMAg9g3QEx1LGQtX5DDWb5+f8e1pH8G+Fm5lv37vYpHUTZItWJh/wNKM9j3EhwfMwqSRZirM= X-Gm-Message-State: AOJu0Yyvyx/LhVj2jahFoosjXP8/NK+uIrQHl/m35FqzH99b+in6JgJt cyRFGe405Q/XFI8+smTfr1Tu+pGjbK2zTHmsmELGBaVlt/IsiBZF X-Google-Smtp-Source: AGHT+IEw6suXvwf12rmqg2ESZNMniFYRrteAqrsvIP85h/UggupVsP2FPrPXQf5SW3yHlrcuqyYCpA== X-Received: by 2002:a05:600c:314d:b0:423:2a9:19ce with SMTP id 5b1f17b1804b1-4230484e4bdmr27438125e9.25.1718381982418; Fri, 14 Jun 2024 09:19:42 -0700 (PDT) Received: from fedora.. ([213.94.26.172]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42286eefa63sm104638905e9.1.2024.06.14.09.19.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 09:19:41 -0700 (PDT) From: =?utf-8?b?Sm9zw6kgRXhww7NzaXRv?= To: jikos@kernel.org Cc: benjamin.tissoires@redhat.com, arnd@arndb.de, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?b?Sm9zw6kgRXhww7NzaXRv?= Subject: [PATCH v2 2/2] HID: uclogic: Add module description Date: Fri, 14 Jun 2024 18:16:06 +0200 Message-ID: <20240614161935.230529-3-jose.exposito89@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240614161935.230529-1-jose.exposito89@gmail.com> References: <20240614161935.230529-1-jose.exposito89@gmail.com> Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Not having it triggers a warning: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-uclogic.o Signed-off-by: José Expósito --- drivers/hid/hid-uclogic-core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/hid/hid-uclogic-core.c b/drivers/hid/hid-uclogic-core.c index ad74cbc9a0aa..26bacbf1474e 100644 --- a/drivers/hid/hid-uclogic-core.c +++ b/drivers/hid/hid-uclogic-core.c @@ -568,6 +568,7 @@ module_hid_driver(uclogic_driver); MODULE_AUTHOR("Martin Rusko"); MODULE_AUTHOR("Nikolai Kondrashov"); MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("HID driver for UC-Logic devices not fully compliant with HID standard"); #ifdef CONFIG_HID_KUNIT_TEST #include "hid-uclogic-core-test.c"