Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp112692rdb; Thu, 1 Feb 2024 03:54:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IFkjFr/9Qp6Dt64AxjxJr7ZbSLf8DrDHt7jIUAzs4PmggMZKnzpObbwG+0EtMIi0dpt+QKf X-Received: by 2002:a05:620a:22c:b0:784:b12:ba1c with SMTP id u12-20020a05620a022c00b007840b12ba1cmr2213688qkm.78.1706788454973; Thu, 01 Feb 2024 03:54:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706788454; cv=pass; d=google.com; s=arc-20160816; b=EiFG99jUzDdH6UGGJnuKRB+f+C11m9g24ZSer7bW/HZZAjz25mkQcVnVbZiaOPnspC hIcqp1rC+UBUo35cEbNvcijoQR1z+CTCT1ooieB7DT/i0NssEyor/qIAmcx9NYhXi6AG CS3v1SJagopyhf6y6XWY6XPFuyTuyc2jxl6ig+bo0LM1n3u9WWj1c9zsTZNYXq6uCJ51 Vt+2JBXhYf2O+4SuHkfMLODbuVgO99bhrEyHOthaf0j2dzx6aW7sluW3yfXZ0ZfnBgfx 98HsowSgBgOmUOjazGd+FT3byCL1NIVa5+NS+Ho5u1+aoarNqF48KGnlymGgsTTpvulF t/zA== 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=Jwlpf5WtRwjR2Uk5S0HxjXq4kDnYEFhLpWHcFD84jJU=; b=EAHr4C/FFtRdHK3Thk0Iv+RAe7yyLaxYRbdCbzdx7F6hBq3CXyqPBnEZNksZcfbp1T 77f1AEHamkIHfmYHTYZ3s4xucbumgcfvULz5Fmfwcuu2omhc9VmgjkGh0gA6qjLko+s8 u5eRKgR4l9KjPGJHJbJ7wP9JH13w1UuDrNqg3L+GcZhlqnOMrFO+jihIw4IGMKbqTOAJ GHeMC+fXCCxsLNUCwZyetVamLaTHzybCnFe6rMN68hzjj4uXED1zID0wJhFnKptjY/Yz b+gC4TPXw7dnM9jd2qVCui2/8Qo8PCGUOJy2qwOs6421aE3fwmurFnL0+N+4ue6bW5mh NxjQ==; 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-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48044-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCXjQaL70biiL7+Ao0kgSTKWjJ0PXVjW73HzqZg7GxtzqkzOODu4snKxZYcfHyp7lZmFohEgvORQUhsJ+6WZXGFz0kvuz+JGKIIoOFw3Yg== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id s20-20020a05620a0bd400b0078328d65c15si14564770qki.476.2024.02.01.03.54.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 03:54:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-48044-linux.lists.archive=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=VHZ5XMxG; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-48044-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48044-linux.lists.archive=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 B849B1C27AE9 for ; Thu, 1 Feb 2024 11:54:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 85D1E15F302; 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="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 Content-Transfer-Encoding: 8bit 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); -- 2.43.0