Message ID | 20240201115320.684-2-jirislaby@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-48042-ouuuleilei=gmail.com@vger.kernel.org> 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 <ouuuleilei@gmail.com> (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 <ouuuleilei@gmail.com>; 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)" <jirislaby@kernel.org> To: jikos@kernel.org Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" <jirislaby@kernel.org>, Paul Pawlowski <paul@mrarm.io>, Aun-Ali Zaidi <admin@kodeit.net>, Aditya Garg <gargaditya08@live.com>, Benjamin Tissoires <benjamin.tissoires@redhat.com> 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: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789697396239737620 X-GMAIL-MSGID: 1789697396239737620 |
Series |
HID: unused struct members cleanup
|
|
Commit Message
Jiri Slaby
Feb. 1, 2024, 11:53 a.m. UTC
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) <jirislaby@kernel.org>
Cc: Paul Pawlowski <paul@mrarm.io>
Cc: Aun-Ali Zaidi <admin@kodeit.net>
Cc: Aditya Garg <gargaditya08@live.com>
Cc: Jiri Kosina <jikos@kernel.org>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
---
drivers/hid/hid-apple.c | 1 -
1 file changed, 1 deletion(-)
Comments
Hi Jiri I got this patch tested by a user and no regression was reported. Thanks > On 01-Feb-2024, at 5:23 PM, Jiri Slaby (SUSE) <jirislaby@kernel.org> wrote: > > 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) <jirislaby@kernel.org> > Cc: Paul Pawlowski <paul@mrarm.io> > Cc: Aun-Ali Zaidi <admin@kodeit.net> > Cc: Aditya Garg <gargaditya08@live.com> > Cc: Jiri Kosina <jikos@kernel.org> > Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com> > --- > 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 { > -- > 2.43.0 >
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 {