Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp1428494lqp; Fri, 22 Mar 2024 14:53:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV9lPCsjp3YQxM9YK973iGkiE8pzKJuVnAnJERUf/7b5WP9yFXEN1wt1FDT2FNh+dwuAzCxR/BRp+KnCeNokjtM0EK07SIR5BQK3+MHEQ== X-Google-Smtp-Source: AGHT+IHXK5U6xTJ6jhGbjIpNyCX96u1QyAGj2NLlNcRbJAY39GihAaU3mOwA7u1Eo7+VXd8uDl9i X-Received: by 2002:a92:c891:0:b0:366:abec:b3e8 with SMTP id w17-20020a92c891000000b00366abecb3e8mr769824ilo.2.1711144397928; Fri, 22 Mar 2024 14:53:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711144397; cv=pass; d=google.com; s=arc-20160816; b=g7x93vZn8ziORzokwc3WKLQN0qoh9xM/TrMvwSd9/9+eunA1fbtRz6138euA9bX/hN 6Pajf/0oqF2shuZl3AnT8hOsmCDLOh2h72vpG1dl/VWd+lngmhiD2Vh9KM1fn1uRNXHr 00qcfTU6W31gPIPn8OKvjbXx5xyp328KJ5xyEefnK4CEXO+6ZSFep8n653dO8qJ8/WM6 77V9KntIM9iBUvZ1IbAx3lJnftNpP1XbItpNAKo4r5s+MEXUkz/5RIcWyZtbnYuAJ7ni /C5RmKKVvxT+E44Zv82gzm/s+QYbnnlkUeOK3Toju1wm4GMqvpqLoC/BuPEv+JpArP3I xffw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=qTYypDyCpf7WWdaBFqdyDpLRaW+o0sjezjr9PtcZ8PU=; fh=HJeeGgIYfkxdAjtzy4O9B0l9apvc+w001jFOa9RspTI=; b=VOoPII9KQaSm41NiWKxaFupZXRTp4zpJxq8X1nKzT4kN1QtE8/p9/lN+iuA07FFU4A 2rwQWhwSSGLkxFtIe4RnKOTDQOaaAIEdOIQZEJV5AFRxOBSNq7UhtBYLsPPEyFFLLEZ4 sYwJZK1/6n2WummGasFgT7cnvkoKEQCeWe0Xpy0VfYcI9tzmPAd2h1NX2NP7HpohOFAT GoYgNjzD6uZMQTX7xfDkItbaqdOltkmDzgHzq/xHKhrqMzWk2t+yj4shOcUzl2TrnMLc JvHHNjpYMW3DlppEqU5SN4FPPzNix1voaWOclKuZ4aeKsNOnWBsO/81vszfeYbKTAWwr t8BA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ucw.cz header.s=gen1 header.b=bF9zTDAy; arc=pass (i=1 spf=pass spfdomain=ucw.cz dkim=pass dkdomain=ucw.cz dmarc=pass fromdomain=ucw.cz); spf=pass (google.com: domain of linux-kernel+bounces-112053-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-112053-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ucw.cz Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id q22-20020a638c56000000b005dc41faf522si2815885pgn.790.2024.03.22.14.53.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Mar 2024 14:53:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-112053-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@ucw.cz header.s=gen1 header.b=bF9zTDAy; arc=pass (i=1 spf=pass spfdomain=ucw.cz dkim=pass dkdomain=ucw.cz dmarc=pass fromdomain=ucw.cz); spf=pass (google.com: domain of linux-kernel+bounces-112053-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-112053-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ucw.cz 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 5CEB428294D for ; Fri, 22 Mar 2024 21:53:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 244EF8061F; Fri, 22 Mar 2024 21:52:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ucw.cz header.i=@ucw.cz header.b="bF9zTDAy" Received: from jabberwock.ucw.cz (jabberwock.ucw.cz [46.255.230.98]) (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 4310580632; Fri, 22 Mar 2024 21:52:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.255.230.98 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711144357; cv=none; b=QGQpIsWkQzg0OIj0zasWG2edbHNB6iL6d7hpdiMf9o9XdxBT9fnWUCVt5eo97F5aC5xJkEN+vgah6vl9NGDekU8MddrkfkkXEC3xNSSUoXQYfKDzookBFy41+WM3yypU/O5JKdx4g67RO2VqVnA/vn7ECGB5sczMDyo6GKGBMio= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711144357; c=relaxed/simple; bh=9AVEqpvegcwayQLsYLiqrLsqGvbY35k/BMs7cZ5TrFo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=uAGIuq1UXoQdj1X1KItgFl/umVpzDMmn1zdc7SLkWwxxrGq91Kj9/3MrhcjXlWdJga9fqZc6xqe8NDxIIzU71Jjs8fl8SGxHUbXqaXZ82E1z+75OHnUdC1zEGLgJHFYytdzeYuSLn4g1oJ3rf00e5YKE/GvBLpZzEtRaNFJtHYE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ucw.cz; spf=pass smtp.mailfrom=ucw.cz; dkim=pass (1024-bit key) header.d=ucw.cz header.i=@ucw.cz header.b=bF9zTDAy; arc=none smtp.client-ip=46.255.230.98 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ucw.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ucw.cz Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id DE4701C0071; Fri, 22 Mar 2024 22:52:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ucw.cz; s=gen1; t=1711144349; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=qTYypDyCpf7WWdaBFqdyDpLRaW+o0sjezjr9PtcZ8PU=; b=bF9zTDAy8OH5OZCMJs9NAvRnSONbY5mJB74n8Dl0YNGE05PCpu/FshPiTkTu6X7K9N+9my gdfVC0G2Y532MDuFTAKm7SHwoAZoUxLQ0tAlnrxZTtc3cArcUIWDqzNCzWAGR0nNcqgvYV UnsF6K95sfvUB8CBeb/yAfFbNjPH9Tk= Date: Fri, 22 Mar 2024 22:52:29 +0100 From: Pavel Machek To: Daniel Hodges Cc: ast@kernel.org, lee@kernel.org, linux-leds@vger.kernel.org, daniel@iogearbox.net, bpf@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] leds: trigger: legtrig-bpf: Add ledtrig-bpf module Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="N4DJvJWOynbcHMAs" Content-Disposition: inline In-Reply-To: --N4DJvJWOynbcHMAs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > This patch adds a led trigger that interfaces with the bpf subsystem. It > allows for BPF programs to control LED activity through calling bpf > kfuncs. This functionality is useful in giving users a physical > indication that a BPF program has performed an operation such as > handling a packet or probe point. >=20 > Signed-off-by: Daniel Hodges > +static int init_bpf(void) > +{ > + int ret; > + > + ret =3D register_btf_kfunc_id_set(BPF_PROG_TYPE_UNSPEC, > + &ledtrig_bpf_kfunc_set); > + ret =3D register_btf_kfunc_id_set(BPF_PROG_TYPE_TRACING, > + &ledtrig_bpf_kfunc_set); Should have ret ?: here, too? > +static int ledtrig_bpf_init(void) > +{ > + led_trigger_register_simple("bpf", &ledtrig_bpf); > + > + return init_bpf(); > +} Is it somehow possible to have multiple LEDs hooked to bpf functionality? I guess someone will want that... Best regards, Pavel --=20 People of Russia, stop Putin before his war on Ukraine escalates. --N4DJvJWOynbcHMAs Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRPfPO7r0eAhk010v0w5/Bqldv68gUCZf39nQAKCRAw5/Bqldv6 8s0/AJ4ggTuHhsWQVEaesd844GKZQZ9mwgCgvsVcXdfViLuzhTNkVoM55R3JpwE= =JQmB -----END PGP SIGNATURE----- --N4DJvJWOynbcHMAs--