Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp342690lqp; Wed, 12 Jun 2024 03:19:04 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX6K2yk1x+KbyZ+OpmKK4718Ugfo+ZasNBlj4IsSAUyngVgmNsbadYS5EYksPnW0ANzXZWb9zUXhesL0oRSkRFtkaL6/azSIcBjXkv9bg== X-Google-Smtp-Source: AGHT+IH+4KF+mmg+XtLo8k2e5Ut3acQBevEMhf8oU2umeMconEfE0xjHfJeMsMroKBlJkMlyhhNx X-Received: by 2002:a05:6a20:12c6:b0:1b5:3f0:87ac with SMTP id adf61e73a8af0-1b8a9c5c782mr2166908637.28.1718187544321; Wed, 12 Jun 2024 03:19:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718187544; cv=pass; d=google.com; s=arc-20160816; b=pJdVC01lshCUIqvrxDsy3Df61ymo/mSTjgfb2zGwLCzu1OOonEus6aFM/+O+5oHAvv gr2GZgm5I0deA8q1SVQhX+tQzVDskxVMrP6JB8Fs1bZuITw0fOS+44FgHrkErHc7bs8U EvJHxWY08KIRZC0eicGMv8EQpK1PeWjA1OtFC7rh5rxFVXQ3/LNw/giobj2uqznaXiU3 0hn/tVbnwbKKvN213zrchxr7aH/zTP0qap7yItJfNLj7F2bd3acamC3+9PbYO6K3UafR 2TK1k43sag603dQqKAwWtODSL3D9MW0jrmyElc4icesJzEpTEH1BSFCkzC77WFo1t8Mx IRHw== 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:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=ux2sacGbdN9mSTkUplQzXMjSYbFp3+/ou8CtQwUKLbE=; fh=mHy+Q6yAVUz5IHLQ/Kue1t1q4/UsBYgnAIMaU9EPJn8=; b=yz7zbkLdzFtx7C5P5vzZDY0yQB3r0fL2jU8O6UjvYCI5oTugNiPhLs21WDKKk5qPVu RUjh+NHptCh3xiG2yCCG5NcLJViUX8hOdk1cbN/7MtOfSrpJoLg7//ePZpGJMkFXClV/ 6HuOWjQo9OjhYEh05llaivfSjxpiNUaxdVzAmwcbPKGZ5h2+6myT/DTqdODW+P9eq8cF kSX3rEGrYWyDujQosjMVDBalyp9jwJwelR58v5BU9o8cmjzKvouQVct8cPRxAZreWwNl IfkEFUsetvLG5xGlPoQkq3IBqdgHRXERUK1fbE6DPaw1/oqz7dLQSIeqxRGSIrdqBSmL DUAA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sang-engineering.com header.s=k1 header.b=Lx2HAkYr; arc=pass (i=1 spf=pass spfdomain=sang-engineering.com dkim=pass dkdomain=sang-engineering.com); spf=pass (google.com: domain of linux-kernel+bounces-211320-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211320-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6ee3c116ce9si5751360a12.795.2024.06.12.03.19.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 03:19:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-211320-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@sang-engineering.com header.s=k1 header.b=Lx2HAkYr; arc=pass (i=1 spf=pass spfdomain=sang-engineering.com dkim=pass dkdomain=sang-engineering.com); spf=pass (google.com: domain of linux-kernel+bounces-211320-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211320-linux.lists.archive=gmail.com@vger.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id C5D5BB21136 for ; Wed, 12 Jun 2024 10:03:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2043A16E871; Wed, 12 Jun 2024 10:03:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b="Lx2HAkYr" Received: from mail.zeus03.de (zeus03.de [194.117.254.33]) (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 B5D6016D9D0 for ; Wed, 12 Jun 2024 10:03:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.117.254.33 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718186625; cv=none; b=Q7HfKfHUhg4t3kwHLkopUzWS+NnpOYkVZJA0PBLpgy9Dm5hejHvzv2Urh4wTO+fTAUW/rs3rtTfSD0TGvcFwZRKVPta7qyWFb7pq4xupM15JtJv/yQHPIhUzFnJUnaagT1vW+mt5X3dmY0Nqay5L7Xv5nue43wsAt0b1bYRN3sM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718186625; c=relaxed/simple; bh=+55Nvekl/FD1qqRLwZ3qbL7Jw6AMS+/quMVjAN//7LI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=LVKw9IpAY70WG9N1ur8kQr45uWqzPQvznXOl2YWpEFtAm4KMnSeV+QPu4xKTZ+JoGfvhbP3tDMd+2UuJkm8w3Yp54LrqUnP5J5Do680tlVO66NTd8nPEbfI7fGxb9yqysffKTjKwF7GfGiSZC92ZXjzKdb5aecUqW47rsDldTQQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com; spf=pass smtp.mailfrom=sang-engineering.com; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b=Lx2HAkYr; arc=none smtp.client-ip=194.117.254.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sang-engineering.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=date:from:to:cc:subject:message-id :references:mime-version:content-type:in-reply-to; s=k1; bh=ux2s acGbdN9mSTkUplQzXMjSYbFp3+/ou8CtQwUKLbE=; b=Lx2HAkYrSnEfCoMjoCjQ zQxmIuwqCwpMOZaX+ieXSmIgC+2XmUdSwWMLp2XTS+uBcxjKPE5xYtgsyXq8xTst eSGGJhZ+5qSoPptJLhGUlrW0MUopqGP83hTDdOpEha+Qs11PGeOTHuGDrXOouuRt 3YtTe2RHcPXPysDAGcqpjLdvgKEc+De9j7VdWfWpZoCDRo2qmpN/aX7Va4iVNZoa Fndvmsdtb15GHINoCmIPLkAuNkzn8nOPSPDwi8aNJF1EUfOdP1nPp4ja247Q7OVn 90ATZM+ji77oZETfPhkAbInCvPu+j7Og5cqLLoLBvBHI2eHfqJ5st37pQLCIAEpj wA== Received: (qmail 757851 invoked from network); 12 Jun 2024 12:03:32 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 12 Jun 2024 12:03:32 +0200 X-UD-Smtp-Session: l3s3148p1@oUuyfq4aUDltKPDc Date: Wed, 12 Jun 2024 12:03:31 +0200 From: Wolfram Sang To: Andy Shevchenko Cc: linux-renesas-soc@vger.kernel.org, Jonathan Corbet , Linus Walleij , Bartosz Golaszewski , Kent Gibson , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org Subject: Re: [PATCH v9 1/1] gpio: add sloppy logic analyzer using polling Message-ID: Mail-Followup-To: Wolfram Sang , Andy Shevchenko , linux-renesas-soc@vger.kernel.org, Jonathan Corbet , Linus Walleij , Bartosz Golaszewski , Kent Gibson , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org References: <20240610112700.80819-1-wsa+renesas@sang-engineering.com> <20240610112700.80819-2-wsa+renesas@sang-engineering.com> 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-sha512; protocol="application/pgp-signature"; boundary="wj5fobjlv4oflgqg" Content-Disposition: inline In-Reply-To: --wj5fobjlv4oflgqg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Andi, > > +#include >=20 > + device.h > + err.h OK about the includes. > > + mutex_lock(&priv->blob_lock); >=20 > guard() (from cleanup.h)? If you insist. I doesn't save an exit path, so I don't think this will improve readability of the code. But I don't mind... > > +static const struct file_operations fops_trigger =3D { > > + .owner =3D THIS_MODULE, > > + .open =3D trigger_open, > > + .write =3D trigger_write, > > + .llseek =3D no_llseek, > > + .release =3D single_release, > > +}; >=20 > Wondering if you can use DEFINE_SHOW_STORE_ATTRIBUTE(), or if it makes se= nse. > It might be that it requires to use DEFINE_SHOW_ATTRIBUTE() for the sake = of > consistency, but I don't remember if there is a difference WRT debugfs us= age. Well, then we can just leave it for now and change it later, if desired. > > + mutex_init(&priv->blob_lock); >=20 > devm_mutex_init() OK. > > + new_meta =3D devm_krealloc(dev, meta, meta_len + add_len, GFP_KERNEL= ); >=20 > Can it be rewritten to use devm_krealloc_array()? 'meta' is not an array? > > + dev_info(dev, "initialized"); >=20 > Do we need this? Existence of folder in debugfs is enough indication of > success, no? Since the script can now list instances easily, this can be argued. Still, I don't think this matters much for a debug-only device. > > +static const struct of_device_id gpio_la_poll_of_match[] =3D { > > + { .compatible =3D GPIO_LA_NAME, }, >=20 > Redundant inner comma. Yes. > > +late_initcall(gpio_la_poll_init); >=20 > Why? Can we add a comment? Sure. > Btw, have you tried `shellcheck` against your script? We did this in one of the 8 previous iterations. All the best, Wolfram --wj5fobjlv4oflgqg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmZpcm8ACgkQFA3kzBSg KbZG+Q/8DO5hqL7b1XR0sD1SMJviOoyciDYILbF19jHtnENPh96Sexa7fj5HdsfE k8oyoeTUPX4LPLgFOTmr5SRHmiWjEb5s6oTgtNxJZqNFeFtglEK1QWUM5tANwQoy L4S7bTO8J91J3WwdNChdvDQkfSLbAVGUTBvbm4iZcDihOCtGdScZCm+hGF1LqTxK LE/2/8mwKfFymnGSbH/siPsb+CmtXMHuJNOhJlaI0KvNLIfHINkYJpBSPwMP3flV v/VIqwt39AIm+5TbTPazDcrOY4NciJ9nRIjLfqHxTSnIbCZaMUfqPK/CYgLWTmD4 oFVvFZFP77yaVpPWjdkECDJJtfI9kkCMH+DgH7p6+6YoRhb2xDFWetS1JS25xJYR vFodZggVj0wEsjqPb2GiaZRM+A+D6GEtjNszeDj3zlCInV6luHTcRuJ4NoNDLVNZ XsFdHefQWoRv0/Kv5FY79tijNUNbGcwemt5d4wi4VFqfGZti5IFCbcb+/G+h18Hw +EDb3KWhybHNENl3QPn0hYVCqDOAQrKInUcqVR0Ph0uYTzxMmfTLdk2wIX9I3+Li fF7tI/JGxDHXZaT8KiQtFv9PEXgYheqLt7EdzSkTBrbydR9rcLg5l1cSy5Np8F7u d+zalrnyfGKSxIxMGX16RQkMIya4Xd2R620+e64o6eTV7gV36O8= =EuJ1 -----END PGP SIGNATURE----- --wj5fobjlv4oflgqg--