Message ID | 20240201115320.684-4-jirislaby@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-48044-ouuuleilei=gmail.com@vger.kernel.org> 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 <ouuuleilei@gmail.com> (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 <ouuuleilei@gmail.com>; 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)" <jirislaby@kernel.org> To: jikos@kernel.org Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" <jirislaby@kernel.org>, Benjamin Tissoires <benjamin.tissoires@redhat.com> 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: <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: 1789697428390317236 X-GMAIL-MSGID: 1789697428390317236 |
Series |
HID: unused struct members cleanup
|
|
Commit Message
Jiri Slaby
Feb. 1, 2024, 11:53 a.m. UTC
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) <jirislaby@kernel.org>
Cc: Jiri Kosina <jikos@kernel.org>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
---
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);