From patchwork Thu Feb 1 11:53:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 195251 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2719:b0:106:209c:c626 with SMTP id hl25csp92458dyb; Thu, 1 Feb 2024 03:54:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IHJPiGybidNM7sSDEr0AdBeOA3Fi6qQ7kRrV8zNVrP3zYjGTLXjjX2ytV6SXyAtRvSc4Xll X-Received: by 2002:a05:6214:27e1:b0:681:5bb8:e27c with SMTP id jt1-20020a05621427e100b006815bb8e27cmr4644830qvb.50.1706788440806; Thu, 01 Feb 2024 03:54:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706788440; cv=pass; d=google.com; s=arc-20160816; b=xebg++OPjrgbkenNEeSAMELEljhxAFPMiCFAbA2TwjqeN+etx/o65dHNRv9zCeXdh0 Y/rtLwzXh5b+RpBEt1yaiwGl71WtLhMXAq6rnX/qebXWk01KX2XZG6ZXyfQgA47ee/hB NbNiQkcEyd14g87bSlcSJiKslS7cLT47KDpYApiE8KOAYPeqRl/GauFEUxfKTg5ODIyL vyZZYwFaza1VH1tITkuKyXRN/l39MqBNLRLF45KSlPx1DygHo6LjX9WEGO0mdHNOAsLl 8q3vQx02ajKBu8PtoIdTtUOMFr/GwtJRzg8MpnTm29SxvJLPqTQH/PetKSLbcDUJ9xFB tIkA== 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=MQF4A0etILBt9MSEQIYM+z8Z7ILmEEj13axvo154NVA=; fh=5hTNCBBfEvt/D+uzkUWwKD5YR8vn3pspR1W2SoWyiao=; b=oTquHMSTe3gjimFUpQkxDIiZb8RVv2iY+izYS2JwDmQIiw1OqDVWymwkpuWvn4jjUQ PpRX+bo7NksTZuupg539mY5d+0fLPpmoeUXskwACg8Z9WjPA98udC6Sl2KHCYhvWdbP4 WL4QY88NJu2hHoXw0MkpVHBsY1ifDavcTeaotvt58UUYy/9Pvr3wjiK5FTytySNgT22V uIl2WYwN9WicCxPtTs7RWlHCweouvY4i//vmhEHF18QhfjFBsqry4tqQDuqRdhInBPAS 4LJjpQ9Yfvbj2EycbbzTnuR7YWsbXMLk6nBXgiLvaPsR2Wxxqv5mxY8RmrdJco7w9PLm L9EQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aY6gtS1i; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-48042-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48042-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCXUIaTTreH8R8w/zXFc9vnGxZY2NbZtC4MqWNXhjOUN6XnQx6cOLYWeFbxjO7NmNgFX6aQM6wXw1BS+vPOfdrqk1qDLsQ== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id kk15-20020a056214508f00b0068453fd0eadsi9143180qvb.5.2024.02.01.03.54.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 03:54:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-48042-ouuuleilei=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=@kernel.org header.s=k20201202 header.b=aY6gtS1i; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-48042-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48042-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 98C5E1C27AC8 for ; Thu, 1 Feb 2024 11:54:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ADA9B15DBC3; Thu, 1 Feb 2024 11:53:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="aY6gtS1i" 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 0B18615D5D3; Thu, 1 Feb 2024 11:53:26 +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=1706788407; cv=none; b=NPA58JAfAED8npPL3F74wJ5Ms5MVtaMdpBz4xwlbCSRvI95tgXUuRBedF3fZJ+50mQlDiZRBWAqCngZoGA5lfRQ7zqdsHu7XQjndz+QCT30g92lszC+3MYFjBIWr1DV1N1bTYoiAm443V7vIukvIRtxxQ93dwdlfxNyznbJ2W9c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706788407; c=relaxed/simple; bh=PDYxQCUZCAsEiRe/Tu00xGBkJEs17Kao85ABA/4E6Lk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=H6KfrL2sJdgtyahgP0r6tqiLFFQrTsqE7NnmHyh+tD9JBXBx0fu/SiJzY7fcLdpF7bX8wZGx44kQlOKNuhxc+5IoaiYnvoLnHZ9ROVTBVIqGXurOWEMQQCPVY6upod55HMfVWQYw/NychkNhSe7EY4a6V//S/DX9mJKtXW1rZpA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=aY6gtS1i; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B83DEC43394; Thu, 1 Feb 2024 11:53:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706788406; bh=PDYxQCUZCAsEiRe/Tu00xGBkJEs17Kao85ABA/4E6Lk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aY6gtS1iITIj11OBDRVD94Kzzg1MjAWqHY/VKBiof1s45yUxpxM+qv8lociQJ2ywy tEC/2K7eiesQsqFoyPVnAJv9NKEhLc/iPy6niD6pdwAHZvBLRiubp97DYpSLc1uhRs 5Fl8dLCj7SYRcagcaP8EJ6W20VpFs3ipoNhDnxLTO7XfispCGKfKOp5f197UJkhCr0 L//Y0LMrPmfBdijQSZoNt5uvCtLFc9VKn3DmLnLxuYjeBF8aSeDsh+2niLpfs/si9N cwR0W+PCgg3ZTMSnv6scrBLWjxNqLKrRHyncOn6zAvrnRvTTRHdZV4BRVYtngGSK+C cipiSuxNcOl2Q== From: "Jiri Slaby (SUSE)" To: jikos@kernel.org Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Paul Pawlowski , Aun-Ali Zaidi , Aditya Garg , Benjamin Tissoires Subject: [PATCH 1/7] HID: apple: remove unused members from struct apple_sc_backlight Date: Thu, 1 Feb 2024 12:53:14 +0100 Message-ID: <20240201115320.684-2-jirislaby@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240201115320.684-1-jirislaby@kernel.org> References: <20240201115320.684-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789697396239737620 X-GMAIL-MSGID: 1789697396239737620 The backlight members in struct apple_sc_backlight are unused. They were added in commit 9018eacbe623 (HID: apple: Add support for keyboard backlight on certain T2 Macs.), but never used. As this is not a struct to communicate with the HW, remove these. Found by https://github.com/jirislaby/clang-struct. Signed-off-by: Jiri Slaby (SUSE) Cc: Paul Pawlowski Cc: Aun-Ali Zaidi Cc: Aditya Garg Cc: Jiri Kosina Cc: Benjamin Tissoires --- drivers/hid/hid-apple.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c index b9c7c0ed7bcc..bd022e004356 100644 --- a/drivers/hid/hid-apple.c +++ b/drivers/hid/hid-apple.c @@ -79,7 +79,6 @@ struct apple_non_apple_keyboard { struct apple_sc_backlight { struct led_classdev cdev; struct hid_device *hdev; - unsigned short backlight_off, backlight_on_min, backlight_on_max; }; struct apple_sc { From patchwork Thu Feb 1 11:53:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 195252 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2719:b0:106:209c:c626 with SMTP id hl25csp92599dyb; Thu, 1 Feb 2024 03:54:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IHeSdb3Z8U96mXZFeiOfiPy2m+GaJbfkxuKNs2G9shmdEpM/ln3pZ7fy/bjUnvA5aKAsDs1 X-Received: by 2002:a05:622a:130c:b0:42b:ead0:8dae with SMTP id v12-20020a05622a130c00b0042bead08daemr4819395qtk.41.1706788456884; Thu, 01 Feb 2024 03:54:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706788456; cv=pass; d=google.com; s=arc-20160816; b=n2p13D9Sdhbna4MLFQC4tiVxlZutCZyfSWJC+rLpbMav62oWDB/kcJY+VG/CAizMyK jDd1NEyYss+MdAXSwXlZw3z9fWEppCLZ2WnJ4Qc6CEshWjJnHehBs4CR38YuOi4rxya3 7fRQpKK6vMSS8jgH3dDZcZRwdYjZ7Jmjubmg0UThFVqfLwl1NFN7JswJhZ0N3pvj/CQw D61JakNn/dbpSVyd/55XI2aDgEpB2RwD2k990ebEfFGlL/7cqBgym74audI/qBKrhw9X a6n+jV0Bw59FL4RxeFyqRtAoPGDrq9qTm1El5pXq6HpKpvSebeERfkhR/1sNUpxsFnyQ KgTw== 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=LYa8yIaLr023VLSTCIHKaJKEPgeNK6g//vp8Tebphcs=; fh=FYjoLOYlgsurGyWtUDWcBcpLc34bsHYDtfy2PdDZMAM=; b=lIIbtlytxtXa/nuD+LUQX/qUZ0O4LfIijF3Wp6+oQEvaHYKdDXaDdr5/4cEJF8A3Rg hf17zviKf3XlDoUhI0KWA+RmG/5eU+wYyUONmXpJuttYy4mivlGxjSXqhjPGlsI2Z8oG OWbbj1cVaode3difD9fApkBpxuxWpogSIs/7H5ArDwsXzYA8orn4N1np3ja2h6nOOyrS GDJfrcIPGpaSSiMj84B31ZbtL+/Us+lyfTAxRXlazHGXIug9mgT5Uqo+SY3eMCWO3R+L mAi1fsaWMm4jKp2lzr8Z/nhys9sRZdOP7j2LWhw9C29nqtHJtpWWafzeBAMk1u+JkzJN YDRQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HlFjP2OQ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-48043-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48043-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCX9EkRqqTdhBvC/36VaVHqqmnpv7zAl+6A8ys2yC35wWrY4ieTWREUdIt2ZyL2fZ3ho6s2+3ENfXmIzIdHhO2B4/UIvzQ== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id v8-20020ac85788000000b0042be30ac310si4029726qta.539.2024.02.01.03.54.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 03:54:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-48043-ouuuleilei=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=@kernel.org header.s=k20201202 header.b=HlFjP2OQ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-48043-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48043-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id AA6581C27B01 for ; Thu, 1 Feb 2024 11:54:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BDFA615F308; Thu, 1 Feb 2024 11:53:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HlFjP2OQ" 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 1046C15DBB5; Thu, 1 Feb 2024 11:53:28 +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=1706788409; cv=none; b=tHk3Pf41QR7hz0mFJ/p7SQ2W2Z9Fuw/wg+WPyDlSw7XJYIdMcQOTX/JXzZ6K8s/zaQcV8tgjn83vGVCdaBnv1vxd6BnwGqtn59um0WsdWEmKNS/NHSh+p9y+zFzoKe9ER4rPr8rMjMsa4QUqXxafx6kxB8Vj08FliDz3KD4gBN4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706788409; c=relaxed/simple; bh=xwCxROJx6BTu8Xiy2MItJhGUPUJPgxHfmZNp5V9yd+8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=IjkO7j4uQ7Z7lARoFPIBzMun2/OpmPcZZjbfZlpnVVI59NIrzGivm+/p/zCkBeYPMFpStzNFUFuceNTdK19nxUP1R5AqrwD52tFhzhjX/LKdsTm2/GOzTASfcDcSVP6GZWgQWf8X0HQLqCnyD4ncMDHDzLDl5tztV2UjiTT8Xxg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HlFjP2OQ; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id EBFD5C43390; Thu, 1 Feb 2024 11:53:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706788408; bh=xwCxROJx6BTu8Xiy2MItJhGUPUJPgxHfmZNp5V9yd+8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HlFjP2OQLDmLrfJsg0whXAVlV1xn0/yUniabZMEmxjXL4al4CquZM2uNcGrCz0dYx Xc54nBxg9+nhEv85g+B2mHcPJ6gFh6g78bkCgSBs3npFVJ7qruLuU2W3R9WjCDEkns dnmchPRH3i9z/E2degffIXzOzAEolhhQdvA+bNl7baVXTGkEGWa65AyhWZzPljBR6L nXDtHNMmJa3CcLVWjHf/BWXRizFmu+8sjC0qi6Zp0H1co7Rst+CF2GdsRiwZ8AA+Eu 1QSHG4Ez6frUDDR5Ql0Cz40iH6vGJXghYojyYl8ZRxvqMGv4NqReMXnCBPTnu1esCB EmvCIPuAOBAdg== From: "Jiri Slaby (SUSE)" To: jikos@kernel.org Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Ping Cheng , Jason Gerecke , Benjamin Tissoires Subject: [PATCH 2/7] HID: wacom: remove unused hid_data::pressure Date: Thu, 1 Feb 2024 12:53:15 +0100 Message-ID: <20240201115320.684-3-jirislaby@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240201115320.684-1-jirislaby@kernel.org> References: <20240201115320.684-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789697412545769610 X-GMAIL-MSGID: 1789697412545769610 The pressure member in struct hid_data is unused. It was added in commit 5ae6e89f7409 (HID: wacom: implement the finger part of the HID generic handling), but never used. As this is not a struct to communicate with the HW, remove that member. Found by https://github.com/jirislaby/clang-struct. Signed-off-by: Jiri Slaby (SUSE) Cc: Ping Cheng Cc: Jason Gerecke Cc: Jiri Kosina Cc: Benjamin Tissoires Acked-by: Ping Cheng --- drivers/hid/wacom_wac.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/hid/wacom_wac.h b/drivers/hid/wacom_wac.h index e63b1e806e34..6ec499841f70 100644 --- a/drivers/hid/wacom_wac.h +++ b/drivers/hid/wacom_wac.h @@ -309,7 +309,6 @@ struct hid_data { bool confidence; int x; int y; - int pressure; int width; int height; int id; From patchwork Thu Feb 1 11:53:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 195253 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2719:b0:106:209c:c626 with SMTP id hl25csp92675dyb; Thu, 1 Feb 2024 03:54:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IGaerihfLJFYeA2fdPCnwKZbvqGj4zEPCKF8zLwoWdDq7rh+mUKODkO+VYiWhU1uomdmv8g X-Received: by 2002:a05:6402:510f:b0:55f:8ddc:6c8b with SMTP id m15-20020a056402510f00b0055f8ddc6c8bmr4115837edd.10.1706788471764; Thu, 01 Feb 2024 03:54:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706788471; cv=pass; d=google.com; s=arc-20160816; b=CKaxdZaiy5p0Nn0+EQ+NjF2u6AGddYJ9LnrtZbvOC0e39kKdR3X7RZRMT/M/hqTGnN sNJKHY8KfgTXYRtgITG+4H8lk0/KmguOfG3C+ObNraMVw5ZDF9G7vBUyBtqM9fAWAG3M 9ObXBVZUjYDgWXw2trsmSWarl/0ZKq39TEGn1DtGjiVfinX7O0bwwv07XXNr2xwLCol8 /qoaFhfjfibpv5KOdCQyeP4ONpQcWhEmJ9XphbxH16Y5RgYToaw8/8B9R7U+Fq9OYJaN bVeFjgqOiREsO0b4XgD7lvUvvaEQbmoqvyCMG1sSqpDW/NuIoWX0lMzMAElsjq5TSlZI Z4sg== 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=tHi/SfzzAUz17ar2tXN0qifh22Z1CtRrJIM0Rqy2lNA=; fh=Ti6r1eAiWBFWYNiRQwUsIt5S348huyuSz5lbzCS3/Wg=; b=LZKea9uzxy4SYQNmKYU27ifukOmwgSmHm2hR/AhpUY581qu0q16aaz9w/xRxEiIkGh 96Td458K/SI3vGqkFsFlxECWVzs6LXm0m4AttN+W6QI0S507OCHcArx/cNYxJStvD0bA RzrTQkKtLR004RNCc1m+GRPLAW9t3ngHPrl06pWRfCzOFeWi0BHQndJOvPyPsMDnYC7i J6I1tyW7e0HPy8kuiUhamBGYlzJFc6J5GU0IrrhWioCp0frdaFXeGn8Pxogd/m+gXFyA 5razQXf2x/QcT1SYpUmSt5snEXymVZRn9+Nn8wAmocUJE+DHt6xDXEUKGRHqZqGzutHo BNhw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VHZ5XMxG; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-48044-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48044-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCW7W4rGe+s8XpA5J56LdyAC5MoFvC/9oaHaYQagP7zlUdfKb9nNLQazhBJO7NtCMLYUT/ov6uw+q/g6wfhlIjDap/Fqjg== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id y2-20020a50e602000000b0055f3d8ffef7si2817449edm.392.2024.02.01.03.54.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 03:54:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-48044-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VHZ5XMxG; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-48044-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48044-ouuuleilei=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 am.mirrors.kernel.org (Postfix) with ESMTPS id 603D41F287EC for ; Thu, 1 Feb 2024 11:54:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5945315F32B; Thu, 1 Feb 2024 11:53:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="VHZ5XMxG" 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 A195415DBD1; Thu, 1 Feb 2024 11:53:30 +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=1706788410; cv=none; b=gY14VRitLsFObEl31yYs9WZE/UIHrqJcikGn9xtXKI+XHjCLkxIhFZN2JBZCZ5WDQ+6rz1MFVG1GXTrj/oMoWeY+2aEAs1yxnQjOoXBUry3JShm91dDp6ODuLk/sopXlh8BVJ/EwqoMVfHJGGgy1qz4ZF7nlau6v9QtI+t2tjb0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706788410; c=relaxed/simple; bh=R9mqcGZb3HMeav7eRqumn5/IPLY4C5cuLq+LnSwMoPg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=X8Bg0TgOM3OUyQYvlNIn7CFKuFXZ0EnzyWG13I7KJslPPldGFMdsfTLzlJmcqpBzXzrTk04s/8AB2DtWegQIRkMW860zVCjV2XBt4vy7zciYFyi8r0tYBZZpmbwYh+0cYEJC3MhECdkZjTKLiyPLHo3C3eBuyja1GBhp7sZjyMk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=VHZ5XMxG; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id F40E2C43394; Thu, 1 Feb 2024 11:53:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706788410; bh=R9mqcGZb3HMeav7eRqumn5/IPLY4C5cuLq+LnSwMoPg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VHZ5XMxGtA8VGFAHELiWxWp1TYfwdLGudPaHlCjFVRz6z97iIb4EHBwiChbXjoVSf Yinshu6Xpsu/owG2i4xIYTn6T1QCdBMvZuYMkzyjcOANW8e4+KQ1ZwTjca5FvISyeZ LbjDcYRfKDsdQ7gOlbOhsS7xKM70i8gbo2Vj31sBDrYwyDbZqa1R5j3bdolgM5VPzV nHSY4YKkowuGhVDG8zhxS5gcGeMiemlARIOvSqTkMf9ezirZZdSjQdur5LK5o/cZDN YWaJkky8uL0KhusM24069OvlmlwPJPOYEXplCQyxmEGU3tdriWjORLtaJ71NKpPZ1X FKdHqN65Qzocw== From: "Jiri Slaby (SUSE)" To: jikos@kernel.org Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Benjamin Tissoires Subject: [PATCH 3/7] HID: protect hid_device::bpf by CONFIG_HID_BPF Date: Thu, 1 Feb 2024 12:53:16 +0100 Message-ID: <20240201115320.684-4-jirislaby@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240201115320.684-1-jirislaby@kernel.org> References: <20240201115320.684-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789697428390317236 X-GMAIL-MSGID: 1789697428390317236 And not by CONFIG_BPF. BPF can be selected while HID_BPF does not have to. It actually cannot be on some platforms due to Kconfig dependences. This saves quite some bytes on those setups. Found by https://github.com/jirislaby/clang-struct. Signed-off-by: Jiri Slaby (SUSE) Cc: Jiri Kosina Cc: Benjamin Tissoires --- include/linux/hid.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/hid.h b/include/linux/hid.h index 7c26db874ff0..b12cb1c8e682 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h @@ -683,9 +683,9 @@ struct hid_device { /* device report descriptor */ unsigned int id; /* system unique id */ -#ifdef CONFIG_BPF +#ifdef CONFIG_HID_BPF struct hid_bpf bpf; /* hid-bpf data */ -#endif /* CONFIG_BPF */ +#endif /* CONFIG_HID_BPF */ }; void hiddev_free(struct kref *ref); From patchwork Thu Feb 1 11:53:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 195254 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2719:b0:106:209c:c626 with SMTP id hl25csp92795dyb; Thu, 1 Feb 2024 03:54:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IGLWbDQS6Nxnh31ZJHTJ8iH9sHo6Nt0+FIQsH66i7DCun+3T5UnBp+r8FS+dH9wibLgeEN7 X-Received: by 2002:a17:906:68a:b0:a27:7de8:9cd9 with SMTP id u10-20020a170906068a00b00a277de89cd9mr1558508ejb.23.1706788488135; Thu, 01 Feb 2024 03:54:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706788488; cv=pass; d=google.com; s=arc-20160816; b=ugw8vdJR//eLjE7k/KoV8CS9PpDs96tb+Y9NaIJWM1iu7nD8snOH6J0llvK7NraVnr yE/YX9oLolnC4c0dFFMI8h8GnRRAjdJjfKEWj65MHrpvRBCwiXxwVh4+4FMCNnRXyQxp GM41c89SDZ9mYr8ovLwEQvVQuIcUC4ai4lqxoGuJhCODhsOp8HVpGz2S/C6BYwhMe7/Z SHbaGBAccVXbqRFdZLaDuhfUKmtp4dqDozOZnhI0AGnYsflXhdJ8uEIhrrcL/iH7yjbt UXPVyQ6vaJ1VWMwbvb7ox2MkgGkfEsFH1plHg57B3JCgeS2GC2VY1PHErJAZBMNu37Vv oGOA== 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=/OUFhvxLDy9CVfChJBDs5z6+oxdgHXKA/xcKnPYcL/8=; fh=6FH8qK/ait2Gr4sNege8qeYKCkLdmbk9q3QPmE2Aijo=; b=g55U6INML7SFQP3HKMc6mcveBVtj241sfrsOebJKS8e+r+xXCMFuCF70O0/0SGfvGK eZB3kW6aBMDBOi6po52F5md0pOjx+2rYqjCd0Q/+qs5WNSwnniw0Y5sCt0khqqeHw9tT C+dO1E1ZCqI4353+uiDHIO4E4WOH80tJ9lkudXpGWFndev+lE9lKzRTA3khoBALLzWJy lut5MkGYBMtarTUF7c6/KLD3yfR9pBqcJloCIzeOk/13CT5aXNmI6qyMUjpt8KlCcTFB Meli71ukfCGk8LgFmLGvZphytcwbY68QGS/SWlQpegGMiVskxr1pXda92E+TLm1IJwaa qBew==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Hyig5QNm; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-48045-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48045-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCVLEKGZLsin3oVbs1OgY+cp6vECpbBebzYHZEbgjcAUN41HcONxsvBbaeotc6uF1pW9dI/6Ln5NgVCzu1N7gSVdexJBtw== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id dc14-20020a170906c7ce00b00a359cffc28csi4661936ejb.888.2024.02.01.03.54.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 03:54:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-48045-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Hyig5QNm; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-48045-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48045-ouuuleilei=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 am.mirrors.kernel.org (Postfix) with ESMTPS id B97571F2885D for ; Thu, 1 Feb 2024 11:54:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 54D81160870; Thu, 1 Feb 2024 11:53:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Hyig5QNm" 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 978D115F313; Thu, 1 Feb 2024 11:53:32 +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=1706788412; cv=none; b=Lm5Pivo5Dc4Y5mY8ZfEQvcRPRUSbWkcTyentAWnr/YHmL8it8D3/P7u5QXoNYdweh2nbW5Y+bm2KmXdZR2KBVreWGxfJ+ZDvL1JPRLC/m3qErO2/X5Cgc0kgaB/05F1MlQAtwFrVQUKSKIYcFq1mVqRPQbrVzZ4yVlgxwopYTwc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706788412; c=relaxed/simple; bh=+uVdvJGsc8lGb6YyNtoRve9i5Z0FqJFy9u1zLI/NIAg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tvO1xjtSomZHHi3CHiCzG+mvpPFx43d1xohbFWSRkwy1WaeL3tVqzWSCM5xzPf0PfCKUjy1mtuuZOhM9N/sdxE+ut+DGpcTtuckXQtkQN8tlhvb98T6L/tjHqoywGv+evimDbgddidZ1I6Fn0uRzz5LxqZ9LjS+MCcD7eyN2As8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Hyig5QNm; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A441CC43399; Thu, 1 Feb 2024 11:53:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706788412; bh=+uVdvJGsc8lGb6YyNtoRve9i5Z0FqJFy9u1zLI/NIAg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Hyig5QNmLrPTECu94ugQSjEwP01vifZIkEi9RiqpwxC+MlWfnD6EqvT00Qr5Gnw1G ReR+GN9u3Kr0tZj+OQ8t8cY+92ctBglpPzJRxqMBOJzwrxAjvcSkfTTH6vUv6P5c21 E3cspd+wUUQy70nTvdCwQVykgBJFHkb7oW5dcE7aCjdnp481BwYGuAfUewvNNqdH9M dGMuy/IhWsgJwRMuGkk6zwF8XF45b2Rnf8+jm9ZYAgYpsE8wNCM95vMTDNobKjC6Hv UZcOhYzw+fjA9UvwvPFmNBKdhwuofXPrcc3KhXCG7CiuoE6zX6b+qGMxMsvTQ2+Reu d2VtJ59ZJx9ow== From: "Jiri Slaby (SUSE)" To: jikos@kernel.org Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Gary Stein , Benjamin Tissoires Subject: [PATCH 4/7] HID: hid-lg3ff: remove unused struct lg3ff_device Date: Thu, 1 Feb 2024 12:53:17 +0100 Message-ID: <20240201115320.684-5-jirislaby@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240201115320.684-1-jirislaby@kernel.org> References: <20240201115320.684-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789697445769508610 X-GMAIL-MSGID: 1789697445769508610 struct lg3ff_device is present in the driver since its addition by commit 74f292ca8c7a (HID: add driver for the Logitech Flight System G940). But it was never used, remove it. Found by https://github.com/jirislaby/clang-struct. Signed-off-by: Jiri Slaby (SUSE) Cc: Gary Stein Cc: Jiri Kosina Cc: Benjamin Tissoires --- drivers/hid/hid-lg3ff.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/hid/hid-lg3ff.c b/drivers/hid/hid-lg3ff.c index b7e1949f3cf7..109735b89b7a 100644 --- a/drivers/hid/hid-lg3ff.c +++ b/drivers/hid/hid-lg3ff.c @@ -41,10 +41,6 @@ * I'm sure these are effects that I don't know enough about them */ -struct lg3ff_device { - struct hid_report *report; -}; - static int hid_lg3ff_play(struct input_dev *dev, void *data, struct ff_effect *effect) { From patchwork Thu Feb 1 11:53:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 195255 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2719:b0:106:209c:c626 with SMTP id hl25csp92885dyb; Thu, 1 Feb 2024 03:55:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IF5ueOlnW/qnAKZgWHktINRma9P4dCQDUz6DQhugwlaqSYT6EJoQW1GAPOQfDh+sW71wLhX X-Received: by 2002:a17:906:3654:b0:a36:1ac:e1ed with SMTP id r20-20020a170906365400b00a3601ace1edmr3607023ejb.1.1706788502593; Thu, 01 Feb 2024 03:55:02 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706788502; cv=pass; d=google.com; s=arc-20160816; b=Z05AaDuqCyZDtmKqGYDu32+GkYvY1aO7BmFtYfhEUsXwupBNOhLJWzxAtGt4S5U4k7 683DdJLSK1SiwhmSKbxIDxUzkbur4/idwkQzCIuHGvf/3nybj4ZfxhnPdPzU5fL6gXGU CRKVC6vJ5/WVDd0WeIxBfhBQ880iL7IzLFf4hBMZ38Vz7ADBJcZ7qaU4MUA/CIpXOwyK 1Q87bNRmzve1GAXniQ05FiEgGC/5LD4B9RDLl8z7du7PQ0rqdm5YWjPonus5SHa1KDqx D4qh/CTSK9QUHI21WqvLI01Ncxdup8d6n6sINEGaC3jQhOs8K8apodwNBhVpI9VnUZhR kflQ== 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=BYJ6C+mnYXgkQwPf0kjWKMnOHRMvZsWd8b/fWDGWbgI=; fh=PEmAns7MEty/8tv3CHehwzeGpOLPLIgCK+8pgFC1s5Y=; b=IoOR8ocyW0rRR6c5ivhAWbTNJOHAybLq2iMgbf15j6HIqlHwKtuNiEjbgrRJLom3M5 UoO04XF35NTf+AQ2LJstfXsy4su3aRfV3h/EudIoRfxFxaO7ii/2yQxfiih/dasROLSy HTPTkyP98Gfe4Z2m16nBEQyX/nu2crpFaSQSJR8V6a/CeLLqjRLIbCkj1fwNIV2ZRi6b sHiCRRe7vXS84qjtAgvlKfTyOlJLfTEOZMXAbKwAKn86dHTGnK4Z1zqtzxAmhsL7FfUe QCYrFdBGz82hdI/I8M88Vjf5cBuya6zT+nlTajfAZXIAqx/j/e3MXIoXopmL0kA+XzPL GNJw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Wiwtn9q+; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-48046-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48046-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCXPpIGDBfrjcKGJxR8JQrZgJBFFYtgUabYpIsU34ph64p/CSvwCv1T0GWkS2dKC+WHmBY/yTQBGs7LCbMFk0ylqrt377A== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id z12-20020a1709060acc00b00a35ae8b457bsi4218290ejf.249.2024.02.01.03.55.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 03:55:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-48046-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Wiwtn9q+; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-48046-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48046-ouuuleilei=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 am.mirrors.kernel.org (Postfix) with ESMTPS id 35C6F1F223A3 for ; Thu, 1 Feb 2024 11:55:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E492F16088E; Thu, 1 Feb 2024 11:53:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Wiwtn9q+" 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 3A74215F339; Thu, 1 Feb 2024 11:53:33 +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=1706788414; cv=none; b=B6C8xo57lPbfoD8OEOpp7B2dptyiUg/BYvA05hDrjaqP8tjlDke/4h5ryFhPBOAbftAhIOBhrDPRj98nOUrTfhfLdr3fNTo4K+iTLJ7Vxi6GFHH9q374qTFc+FRWErPrED3l56DLVb3hy4AR/x2BM3v9mIsDmpygQwtWF/1BbrU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706788414; c=relaxed/simple; bh=xj3qUE/KEdqABtcoeVjEuTxwjoHowTvkvWDSQecj28k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FYfl3IxO8pe7yE6kFEJHUzZ4VLOsWypsu1geMzTdcwkk4lb1AwhoLJRekorAE224Jx1tmXxCIILc9Sl4i6xbL9ImVisccwe4Z9FvkJdQykZ3hoxmpj2QNR70tY8rYCGCJKd3Al33I5VXp8keHOt3G6df9PcyM4YoyMyQu7FhnEI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Wiwtn9q+; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 80F03C433C7; Thu, 1 Feb 2024 11:53:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706788413; bh=xj3qUE/KEdqABtcoeVjEuTxwjoHowTvkvWDSQecj28k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Wiwtn9q+tmDnGWBNvHwI9GkzNorSTByoJV/kLjOL+BVe/8qxuwfPSbJ1cNUiPZScK IBmSCSwBnCf/sUQ3KY78stSi3ZUuBfMnnePmWSlTg4GwjJbjIGLC6l9w0pmP3hc+we p7s4Zyvw77Z9xUQGf3EATRP951drJF5tXDleYWFjS9JA6rkB+hlq+ny4kVQ0Bj8ByE 4VPhGfvubGzQ7F1WQw9luY9u49QaY9IW7b4SIpVrph0kj5J7BOo8Exrz4h4lVztrk0 SXKbR2w27vOBccoaEXBoEo91nrF3qTsv2C+YOfBXKSPZ+J+Z55z1zhCPyPj1VbN5X8 UEBEkVWnwoIXg== From: "Jiri Slaby (SUSE)" To: jikos@kernel.org Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Benjamin Tissoires Subject: [PATCH 5/7] HID: hid-multitouch: remove unused mt_application::dev_time Date: Thu, 1 Feb 2024 12:53:18 +0100 Message-ID: <20240201115320.684-6-jirislaby@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240201115320.684-1-jirislaby@kernel.org> References: <20240201115320.684-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789697461334537017 X-GMAIL-MSGID: 1789697461334537017 dev_time was moved to struct mt_application in commit f146d1c4d7ea (HID: multitouch: Store per collection multitouch data), but is not used since then. Remove it. Found by https://github.com/jirislaby/clang-struct. Signed-off-by: Jiri Slaby (SUSE) Cc: Jiri Kosina Cc: Benjamin Tissoires --- drivers/hid/hid-multitouch.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c index fd5b0637dad6..40475c42b9f6 100644 --- a/drivers/hid/hid-multitouch.c +++ b/drivers/hid/hid-multitouch.c @@ -130,7 +130,6 @@ struct mt_application { * > 1 means hybrid (multitouch) protocol */ - __s32 dev_time; /* the scan time provided by the device */ unsigned long jiffies; /* the frame's jiffies */ int timestamp; /* the timestamp to be sent */ int prev_scantime; /* scantime reported previously */ From patchwork Thu Feb 1 11:53:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 195257 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2719:b0:106:209c:c626 with SMTP id hl25csp93072dyb; Thu, 1 Feb 2024 03:55:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IGE6MpySny9wtfgawx7qxccodSs1yVHx74WeQ//Z3fff9IkvEpcmjCugIt220qeuHncUWv6 X-Received: by 2002:a05:6214:27e1:b0:681:5bb8:e27c with SMTP id jt1-20020a05621427e100b006815bb8e27cmr4647637qvb.50.1706788527765; Thu, 01 Feb 2024 03:55:27 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706788527; cv=pass; d=google.com; s=arc-20160816; b=wjlTqJ9EtVYtydF3F4TiMzWbpLEIz5Q2GURCgjmcZOI6V3fjGmii0LCoPAEK64g/Ko MsRwLy2Qynl2EhtWVWkguAjnIX1BNOjTR0wF3Frtk3XE479cdMX7JRmEH6IZ0dLTNH2s 3dN/WIDnwrieijFx3GPORWoCmecXq/NWxOrfwMmYE5Mpv/BM1lPgSDBQBlzAkszMgFpU Xgspwoz67jc8SyqEELSHiGd4cMu3Oi6Dv5hPOMYxfVviSt+rNxde+H9JA3XbVju7DwDR wVVaibF7US7YM4c80EZLfsDmeklBdAzfFX8fAaqtEbUG8mVTW9j2BZ5H2SgRsfa//E1U i9qg== 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=eDlXo5FDqWjfdTLFjuDT9tLZmUezJ32grxr1yseFnIA=; fh=xl2pxwwZhHDXNyB6G/8YBJ1Molmn6kryR0I5RxyvzAA=; b=w5bjJyT+SdU/5m0MD8GjneC9miY7flUlapYnN4cCyww4RhMlDsLsDitVJeSdxuiSwF Rw/Bi2zJIe3sKNoSs85XvaCD6CN8GYQGE79l09b7gikv+1F1ZA2VZq8ViH3utodDD8h9 Er7BULcNImJ6Fy7yj+ODFFhDbLHNAlt8H1PqMa7MOR/3cJYTHSmidmsySHx9lvrfoBnl HSm1vZdPcyrfAi21UFxjftCKV9Fqp9JXL4Ns+KLTrk9/EsU2PX/hPneEVbpj4yEzAeOS r/F54USTCPuqpJRs1kEqeyvJvi9066JRpV8LL7Z79VjgWAc3kscKY/LeUs/qXW0eRL06 5uKg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RYzKW59E; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-48047-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48047-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCVEs41Z7V/FiyTv6dzsp4fv/u8ukWLISrY30exAt4OriBLtzYhMFndrkmo3M3HNNDwlcahQ3YVU8xAOg9oHE9iXCnGlaQ== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id s11-20020a05620a0bcb00b0078333a213cdsi15075240qki.368.2024.02.01.03.55.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 03:55:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-48047-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RYzKW59E; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-48047-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48047-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 767A11C280D2 for ; Thu, 1 Feb 2024 11:55:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8B570161B51; Thu, 1 Feb 2024 11:53:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="RYzKW59E" 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 E78B316087C; Thu, 1 Feb 2024 11:53:35 +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=1706788416; cv=none; b=pooCKNWg5F9e2PAaqqZ+/Tcta+OP5aCsJBUW6hYn585KovafUsYbfSy+o3IzYiWH0ZI5BWPANuaj9kEMHcil+SUVtoWIiBJc89zVXXGFCMzuYUZhiVyuv6LDtn5Evgj/7uZWbaa7O8vRmLaxRh8d/rQTPdSEufKDGI8RhJO1bkU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706788416; c=relaxed/simple; bh=KC8IA2sZ4Q6/pjsCkvWOZBM/6wtRJa6iv38OQYpmdNo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PaXTkGC1lthaYK2mOaJJF1gOpNDqcbFZJ9TUTymniMmD4PjYU0siPak95ZbrdQTWhvgxCXgZB23VTmhnnLq0DHQADvo8ndpTNaQ5OzcRAQVs2PV5Gdn5Dc+tyxVS5UtJUxjF8wahbntki99OrpJHUc8lmHJq9CO1yvURmQiYV24= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=RYzKW59E; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 301B6C43390; Thu, 1 Feb 2024 11:53:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706788415; bh=KC8IA2sZ4Q6/pjsCkvWOZBM/6wtRJa6iv38OQYpmdNo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RYzKW59Ev2DvITPm48/8Wp5sZkRd6+6PW6VCkoM7Sa6PnY/ZZobqgjdAEVhzCVQEI RNxV9LhRc2A2CQe5uN7cFi2+JXIc4JbbjIdkaKHd7Xo8XvEjWMmTSCuJ+XTWjJYJ3c WQVPlwe9IhMCxR7zqcGQ8QXpqRtXHmIym0G1KiuvoFmtvmuNXgCX79LIcdoiA4IZfI olN8dy/MpA6COL3FS/7XzR9K+IM/bCoMrfJgdVo7BoU/zdPQGDZ4K36DETn8NCs/tN mNiGx5DdxwBqWMVi3Pcf5rLfhS64bEKJhSobWhJzHge+lK9Lp7ix+m7mQc+l57Pr62 bVIH4IlGV2ZYQ== From: "Jiri Slaby (SUSE)" To: jikos@kernel.org Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Benjamin Tissoires Subject: [PATCH 6/7] HID: hid-prodikeys: remove unused struct pcmidi_snd members Date: Thu, 1 Feb 2024 12:53:19 +0100 Message-ID: <20240201115320.684-7-jirislaby@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240201115320.684-1-jirislaby@kernel.org> References: <20240201115320.684-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789697487518134997 X-GMAIL-MSGID: 1789697487518134997 struct pcmidi_snd contains two unused members: out_substream and out_active. They were added along the driver in commit 3a370ca1dcf8 (HID: Prodikeys PC-MIDI HID Driver), but not used. Drop them. Found by https://github.com/jirislaby/clang-struct. Signed-off-by: Jiri Slaby (SUSE) Cc: Jiri Kosina Cc: Benjamin Tissoires --- drivers/hid/hid-prodikeys.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/hid/hid-prodikeys.c b/drivers/hid/hid-prodikeys.c index c16d2ba6ea16..439f4320f1d2 100644 --- a/drivers/hid/hid-prodikeys.c +++ b/drivers/hid/hid-prodikeys.c @@ -66,9 +66,7 @@ struct pcmidi_snd { struct snd_card *card; struct snd_rawmidi *rwmidi; struct snd_rawmidi_substream *in_substream; - struct snd_rawmidi_substream *out_substream; unsigned long in_triggered; - unsigned long out_active; }; #define PK_QUIRK_NOGET 0x00010000 From patchwork Thu Feb 1 11:53:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 195256 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2719:b0:106:209c:c626 with SMTP id hl25csp93063dyb; Thu, 1 Feb 2024 03:55:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IFzkGx2lishzIPehstbEQU/EJcNmD6RSm2Cgq+21X6QIdQtR38YFfpIeOpUG18RIX9o291/ X-Received: by 2002:a05:6a21:998c:b0:19c:6cee:fc33 with SMTP id ve12-20020a056a21998c00b0019c6ceefc33mr5537402pzb.18.1706788527099; Thu, 01 Feb 2024 03:55:27 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706788527; cv=pass; d=google.com; s=arc-20160816; b=UR0201yQFpNRvMyERANTnp2axJQUrMyTBTsELG28U3NaZsQldVD21g+S995yizyg1N 5YVCDyhoWXQA91yJEbz/uzKxZhQs6cpU5ulp/0BVvgEWeBOS+OT9o1JLre2L+hEtBiTu JrsSvEpQTWq1E3kyreGiMRjspj2ZpSmfpzhSXw77aH2Op4/IhRqY78/O9yRmrX2O2b/E AeFD02jtyBCuruGkKSVfFXrCmi2U/CnMEA/3HBMiUEX09Gom2evRnmXPmaPL3dOwhn6Y Hrt3aUvB6oKMIwE3cEzyDt2T1HgQoqee4jOaPoUGdnSm5Cipto/BX8EYG8Q2/8vV4S1j mkyA== 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=NHuxKq/Uavb7Orc/5SThrG8HJ0xfox5KbJeY5jIML3s=; fh=gjANy4h25FicQf9doy6sxEUarZjZj78I5vJGcUB7MCI=; b=DG7tmvdvoGjUR203Ghtx1VD+TPkPRDhrbdooxxjr6TRIXiJIgfUjB/2GEGa4A7nHTF dTONz2TxumcNyF0/1XZmKsTF/JP7pa2Yk19s9qbC6mA18oL6w7Q0yasgfuTMDNmTl0jN ZgrTPKyILP4vFIOiIXAmD5Y7GhL34JvgNDkdHa+ltoa0M+PLlsaxP2MvGur+vgb5Jw7E km6bP2+5hxSpg3YmoxN4xl5vF06rKdE/+5NwpocohuytMr067zY/OEfQNXdl9IUR/JVD 5VqkX6PKYhHXJ4Ld/PSZf+rxwNPLZIg9cNwzbXy244t2j3D7HIWsFgazCQJ2xib1+98q 1mOw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NNGHT2ex; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-48048-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48048-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCWv8d2yazPrvbvhbV/uvBFqLpO3Srah4/CCEt/aKwh/p3W/MieY3JKGquU6QM/teeZNOxMIgyArHlsoyMwPXGXxjHD46g== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id t9-20020a170902d28900b001d957283cb4si678146plc.318.2024.02.01.03.55.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 03:55:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-48048-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NNGHT2ex; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-48048-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48048-ouuuleilei=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 D26AC284B4B for ; Thu, 1 Feb 2024 11:55:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A42BE161B69; Thu, 1 Feb 2024 11:53:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="NNGHT2ex" 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 8C24516089D; Thu, 1 Feb 2024 11:53:37 +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=1706788417; cv=none; b=ZuUGS2/eBi9wHaX8YCB3+yAjocoV14eoEJ6JSkVXALpQFfHcajmpRIeSWI/pMr1Ir3HPUvfRJeO6Sf8A3SqQ7fGxR5Q/F0BjBmAAGhwFgFRp+akCh7e+B0bW94Rh0uyVTRe6Ro67UjhYVxg1E9/JjLP02JgGrRZNoXnXuZD74j8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706788417; c=relaxed/simple; bh=NF/WyNz8fSJXXP6Kn7H5YvVfKOqkIoj0xrHRvaRo2mw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gJ4IUcxe0ytbNcaY8o8h4YpixqXEPtGKu7qm/96Vmtkx/AgLPNGUjckPBfSkx/cYvpGDYqUCrAiV2dNFS/W/xPVA0GuSZSVLj1MtVzvvLXGJc6UF9CkhfgonCPinwB1Wd8wBNpERzddHIJIj998noml7qJtU5Am/Jixo3H/G14k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=NNGHT2ex; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D3B98C433C7; Thu, 1 Feb 2024 11:53:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706788417; bh=NF/WyNz8fSJXXP6Kn7H5YvVfKOqkIoj0xrHRvaRo2mw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NNGHT2exEp4W0nJRU3r+k4NHUJ4UbMrAnlMHIWY7IedIvpUjmfMfxlFNlOm1i6w5W tfV61ZlxLQeDsjEBqgyFeKy4PmZ3pwLcjZ59lhnFAAyO9tAR9pKuIUBwCe6TSo4sZA rQJbhUmLUTTRDcvu17Vitnsf6PcEJmkwLK8KDynl6C326JvkX6nBRSCV621eHc6D4O JLad5znyo94r+VxbMSlbZJ466YdSYmVYV1mK81NxOqXPC7VVSxC473LTF1FyG/MUq3 69v7Iwy43en8QVn+ncbyLHSyWhmZG3RR3HcrVKqPSC+48ogC9AaO6y+9qcZ0YrtznP j7TPvlr5DVqqQ== From: "Jiri Slaby (SUSE)" To: jikos@kernel.org Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Benjamin Tissoires Subject: [PATCH 7/7] HID: hid-prodikeys: remove struct pk_device Date: Thu, 1 Feb 2024 12:53:20 +0100 Message-ID: <20240201115320.684-8-jirislaby@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240201115320.684-1-jirislaby@kernel.org> References: <20240201115320.684-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789697486387341490 X-GMAIL-MSGID: 1789697486387341490 First, quirks was unused in struct pk_device. And I see no reason for this additional level of indirection. struct pcmidi_snd is far enough for the driver. Unless I am missing something? So drop struct pk_device and convert all the users to use struct pcmidi_snd directly. No need for doubled kmalloc+kfrees now. Found by https://github.com/jirislaby/clang-struct. Signed-off-by: Jiri Slaby (SUSE) Cc: Jiri Kosina Cc: Benjamin Tissoires --- drivers/hid/hid-prodikeys.c | 113 +++++++++++++----------------------- 1 file changed, 40 insertions(+), 73 deletions(-) diff --git a/drivers/hid/hid-prodikeys.c b/drivers/hid/hid-prodikeys.c index 439f4320f1d2..a593ed62c969 100644 --- a/drivers/hid/hid-prodikeys.c +++ b/drivers/hid/hid-prodikeys.c @@ -32,13 +32,6 @@ struct pcmidi_snd; -struct pk_device { - unsigned long quirks; - - struct hid_device *hdev; - struct pcmidi_snd *pm; /* pcmidi device context */ -}; - struct pcmidi_sustain { unsigned long in_use; struct pcmidi_snd *pm; @@ -50,7 +43,7 @@ struct pcmidi_sustain { #define PCMIDI_SUSTAINED_MAX 32 struct pcmidi_snd { - struct pk_device *pk; + struct hid_device *hdev; unsigned short ifnum; struct hid_report *pcmidi_report6; struct input_dev *input_ep82; @@ -98,11 +91,11 @@ static ssize_t show_channel(struct device *dev, struct device_attribute *attr, char *buf) { struct hid_device *hdev = to_hid_device(dev); - struct pk_device *pk = hid_get_drvdata(hdev); + struct pcmidi_snd *pm = hid_get_drvdata(hdev); - dbg_hid("pcmidi sysfs read channel=%u\n", pk->pm->midi_channel); + dbg_hid("pcmidi sysfs read channel=%u\n", pm->midi_channel); - return sprintf(buf, "%u (min:%u, max:%u)\n", pk->pm->midi_channel, + return sprintf(buf, "%u (min:%u, max:%u)\n", pm->midi_channel, PCMIDI_CHANNEL_MIN, PCMIDI_CHANNEL_MAX); } @@ -111,13 +104,13 @@ static ssize_t store_channel(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct hid_device *hdev = to_hid_device(dev); - struct pk_device *pk = hid_get_drvdata(hdev); + struct pcmidi_snd *pm = hid_get_drvdata(hdev); unsigned channel = 0; if (sscanf(buf, "%u", &channel) > 0 && channel <= PCMIDI_CHANNEL_MAX) { dbg_hid("pcmidi sysfs write channel=%u\n", channel); - pk->pm->midi_channel = channel; + pm->midi_channel = channel; return strlen(buf); } return -EINVAL; @@ -135,11 +128,11 @@ static ssize_t show_sustain(struct device *dev, struct device_attribute *attr, char *buf) { struct hid_device *hdev = to_hid_device(dev); - struct pk_device *pk = hid_get_drvdata(hdev); + struct pcmidi_snd *pm = hid_get_drvdata(hdev); - dbg_hid("pcmidi sysfs read sustain=%u\n", pk->pm->midi_sustain); + dbg_hid("pcmidi sysfs read sustain=%u\n", pm->midi_sustain); - return sprintf(buf, "%u (off:%u, max:%u (ms))\n", pk->pm->midi_sustain, + return sprintf(buf, "%u (off:%u, max:%u (ms))\n", pm->midi_sustain, PCMIDI_SUSTAIN_MIN, PCMIDI_SUSTAIN_MAX); } @@ -148,15 +141,14 @@ static ssize_t store_sustain(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct hid_device *hdev = to_hid_device(dev); - struct pk_device *pk = hid_get_drvdata(hdev); + struct pcmidi_snd *pm = hid_get_drvdata(hdev); unsigned sustain = 0; if (sscanf(buf, "%u", &sustain) > 0 && sustain <= PCMIDI_SUSTAIN_MAX) { dbg_hid("pcmidi sysfs write sustain=%u\n", sustain); - pk->pm->midi_sustain = sustain; - pk->pm->midi_sustain_mode = - (0 == sustain || !pk->pm->midi_mode) ? 0 : 1; + pm->midi_sustain = sustain; + pm->midi_sustain_mode = (0 == sustain || !pm->midi_mode) ? 0 : 1; return strlen(buf); } return -EINVAL; @@ -174,11 +166,11 @@ static ssize_t show_octave(struct device *dev, struct device_attribute *attr, char *buf) { struct hid_device *hdev = to_hid_device(dev); - struct pk_device *pk = hid_get_drvdata(hdev); + struct pcmidi_snd *pm = hid_get_drvdata(hdev); - dbg_hid("pcmidi sysfs read octave=%d\n", pk->pm->midi_octave); + dbg_hid("pcmidi sysfs read octave=%d\n", pm->midi_octave); - return sprintf(buf, "%d (min:%d, max:%d)\n", pk->pm->midi_octave, + return sprintf(buf, "%d (min:%d, max:%d)\n", pm->midi_octave, PCMIDI_OCTAVE_MIN, PCMIDI_OCTAVE_MAX); } @@ -187,14 +179,14 @@ static ssize_t store_octave(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct hid_device *hdev = to_hid_device(dev); - struct pk_device *pk = hid_get_drvdata(hdev); + struct pcmidi_snd *pm = hid_get_drvdata(hdev); int octave = 0; if (sscanf(buf, "%d", &octave) > 0 && octave >= PCMIDI_OCTAVE_MIN && octave <= PCMIDI_OCTAVE_MAX) { dbg_hid("pcmidi sysfs write octave=%d\n", octave); - pk->pm->midi_octave = octave; + pm->midi_octave = octave; return strlen(buf); } return -EINVAL; @@ -268,7 +260,7 @@ static void stop_sustain_timers(struct pcmidi_snd *pm) static int pcmidi_get_output_report(struct pcmidi_snd *pm) { - struct hid_device *hdev = pm->pk->hdev; + struct hid_device *hdev = pm->hdev; struct hid_report *report; list_for_each_entry(report, @@ -293,7 +285,7 @@ static int pcmidi_get_output_report(struct pcmidi_snd *pm) static void pcmidi_submit_output_report(struct pcmidi_snd *pm, int state) { - struct hid_device *hdev = pm->pk->hdev; + struct hid_device *hdev = pm->hdev; struct hid_report *report = pm->pcmidi_report6; report->field[0]->value[0] = 0x01; report->field[0]->value[1] = state; @@ -620,7 +612,7 @@ static int pcmidi_snd_initialise(struct pcmidi_snd *pm) /* Setup sound card */ - err = snd_card_new(&pm->pk->hdev->dev, index[dev], id[dev], + err = snd_card_new(&pm->hdev->dev, index[dev], id[dev], THIS_MODULE, 0, &card); if (err < 0) { pk_error("failed to create pc-midi sound card\n"); @@ -658,7 +650,7 @@ static int pcmidi_snd_initialise(struct pcmidi_snd *pm) &pcmidi_in_ops); /* create sysfs variables */ - err = device_create_file(&pm->pk->hdev->dev, + err = device_create_file(&pm->hdev->dev, sysfs_device_attr_channel); if (err < 0) { pk_error("failed to create sysfs attribute channel: error %d\n", @@ -666,7 +658,7 @@ static int pcmidi_snd_initialise(struct pcmidi_snd *pm) goto fail; } - err = device_create_file(&pm->pk->hdev->dev, + err = device_create_file(&pm->hdev->dev, sysfs_device_attr_sustain); if (err < 0) { pk_error("failed to create sysfs attribute sustain: error %d\n", @@ -674,7 +666,7 @@ static int pcmidi_snd_initialise(struct pcmidi_snd *pm) goto fail_attr_sustain; } - err = device_create_file(&pm->pk->hdev->dev, + err = device_create_file(&pm->hdev->dev, sysfs_device_attr_octave); if (err < 0) { pk_error("failed to create sysfs attribute octave: error %d\n", @@ -704,11 +696,11 @@ static int pcmidi_snd_initialise(struct pcmidi_snd *pm) fail_register: stop_sustain_timers(pm); - device_remove_file(&pm->pk->hdev->dev, sysfs_device_attr_octave); + device_remove_file(&pm->hdev->dev, sysfs_device_attr_octave); fail_attr_octave: - device_remove_file(&pm->pk->hdev->dev, sysfs_device_attr_sustain); + device_remove_file(&pm->hdev->dev, sysfs_device_attr_sustain); fail_attr_sustain: - device_remove_file(&pm->pk->hdev->dev, sysfs_device_attr_channel); + device_remove_file(&pm->hdev->dev, sysfs_device_attr_channel); fail: if (pm->card) { snd_card_free(pm->card); @@ -722,12 +714,9 @@ static int pcmidi_snd_terminate(struct pcmidi_snd *pm) if (pm->card) { stop_sustain_timers(pm); - device_remove_file(&pm->pk->hdev->dev, - sysfs_device_attr_channel); - device_remove_file(&pm->pk->hdev->dev, - sysfs_device_attr_sustain); - device_remove_file(&pm->pk->hdev->dev, - sysfs_device_attr_octave); + device_remove_file(&pm->hdev->dev, sysfs_device_attr_channel); + device_remove_file(&pm->hdev->dev, sysfs_device_attr_sustain); + device_remove_file(&pm->hdev->dev, sysfs_device_attr_octave); snd_card_disconnect(pm->card); snd_card_free_when_closed(pm->card); @@ -757,10 +746,7 @@ static int pk_input_mapping(struct hid_device *hdev, struct hid_input *hi, struct hid_field *field, struct hid_usage *usage, unsigned long **bit, int *max) { - struct pk_device *pk = hid_get_drvdata(hdev); - struct pcmidi_snd *pm; - - pm = pk->pm; + struct pcmidi_snd *pm = hid_get_drvdata(hdev); if (HID_UP_MSVENDOR == (usage->hid & HID_USAGE_PAGE) && 1 == pm->ifnum) { @@ -775,16 +761,16 @@ static int pk_input_mapping(struct hid_device *hdev, struct hid_input *hi, static int pk_raw_event(struct hid_device *hdev, struct hid_report *report, u8 *data, int size) { - struct pk_device *pk = hid_get_drvdata(hdev); + struct pcmidi_snd *pm = hid_get_drvdata(hdev); int ret = 0; - if (1 == pk->pm->ifnum) { + if (1 == pm->ifnum) { if (report->id == data[0]) switch (report->id) { case 0x01: /* midi keys (qwerty)*/ case 0x03: /* midi keyboard (musical)*/ case 0x04: /* extra/midi keys (qwerty)*/ - ret = pcmidi_handle_report(pk->pm, + ret = pcmidi_handle_report(pm, report->id, data, size); break; } @@ -799,8 +785,7 @@ static int pk_probe(struct hid_device *hdev, const struct hid_device_id *id) struct usb_interface *intf; unsigned short ifnum; unsigned long quirks = id->driver_data; - struct pk_device *pk; - struct pcmidi_snd *pm = NULL; + struct pcmidi_snd *pm; if (!hid_is_usb(hdev)) return -EINVAL; @@ -808,26 +793,16 @@ static int pk_probe(struct hid_device *hdev, const struct hid_device_id *id) intf = to_usb_interface(hdev->dev.parent); ifnum = intf->cur_altsetting->desc.bInterfaceNumber; - pk = kzalloc(sizeof(*pk), GFP_KERNEL); - if (pk == NULL) { - hid_err(hdev, "can't alloc descriptor\n"); - return -ENOMEM; - } - - pk->hdev = hdev; - pm = kzalloc(sizeof(*pm), GFP_KERNEL); if (pm == NULL) { hid_err(hdev, "can't alloc descriptor\n"); - ret = -ENOMEM; - goto err_free_pk; + return -ENOMEM; } - pm->pk = pk; - pk->pm = pm; + pm->hdev = hdev; pm->ifnum = ifnum; - hid_set_drvdata(hdev, pk); + hid_set_drvdata(hdev, pm); ret = hid_parse(hdev); if (ret) { @@ -854,26 +829,18 @@ static int pk_probe(struct hid_device *hdev, const struct hid_device_id *id) hid_hw_stop(hdev); err_free: kfree(pm); -err_free_pk: - kfree(pk); return ret; } static void pk_remove(struct hid_device *hdev) { - struct pk_device *pk = hid_get_drvdata(hdev); - struct pcmidi_snd *pm; - - pm = pk->pm; - if (pm) { - pcmidi_snd_terminate(pm); - kfree(pm); - } + struct pcmidi_snd *pm = hid_get_drvdata(hdev); + pcmidi_snd_terminate(pm); hid_hw_stop(hdev); - kfree(pk); + kfree(pm); } static const struct hid_device_id pk_devices[] = {