From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795948729; b=iAkeFHjOqe2v7TuiLWyQo/EclU+8iHhAGdaUQBZHrdIEv0PYqT2MPE8sO0/pwLZzJgtI xFvhet8viP4usfTdlLZI9YQnFdcEZRoKQDng+yBOBublV6GYbYLIFPBZwAuqo1foMKDrN mAmyciWyOBJCylkQ49r9T5HEahul4pF+RrzEDDN2zyjdM5Ycc+HPxcw8vK2ekpo/4z5Wl vzVGzp8lYgZ72gD1k2i24g5dM0bKgkoN3EWFq1fe+3Ifn3dWThBH/aohWfplplfoZarZy 7K4ha8Lp5LSoW9GG2BN5wGIcYNsZ+XWaCZ9aK4onZyNaCz4MmgL8ZCaS/zHlXsESrGA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795948729; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=aTxOklFIJVEQBRseL0gZeG5evVtlG/mjXus1NMTvpoU=; b=cJenBDeM9fJPetPbsCmzVKvXIkVgf5R4rMnOm9Ab6OaSYPWnvQD4TZvECxIrrKlI52oH tO3lqwuUVenj8iPALlgpek7xhUFJ12Y4xE1ZqlxgCkwE6n7sQi8PVQaClaPQ2SoLUPkAg ruwfpOMlBmoq+3DV68urjMVPat5vk/6A2lVElei3tRld49c0uqXksyVK/S8Z1gXhmREiv IkNiBW9Jq0fsn26x4YPTX/iyJZmjmwoH/r39oTXPOYaI6tN68QdttR9AlRTR4t406P8yB j7yEbtPAUtPW0pegL4Vs7WZMu14+hbJx/H+FtHxi9FmnNNRGj1gwjwex6U6OBKlnCZg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Pez4Azvs; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E4D3D606A32A; Sun, 29 Nov 2026 10:38:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Pez4Azvs Received: by smtp.kernel.org (Postfix) with ESMTPSA id B8C581F000C1; Sun, 29 Nov 2026 10:38:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795948728; bh=aTxOklFIJVEQBRseL0gZeG5evVtlG/mjXus1NMTvpoU=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=Pez4AzvsxX6wXwiOF75yHodd4KZNG6O5WuWhP0KpYbyF/dgyD+k/Gaw5M9oeUgFWF oc/JXCEUCS05kKNw3J2O1zPpIvC/Y6Rghi5NrzNndLtq8nLfQ21amz9JlxkCV4e9uQ qbq/O3kkyXgTpOj2QVOLb2UEa9pdlojMO7q6zMIoWfdzmBBHfk/PtsYe77VORzkITU qDuKh6pCxVxHXaQ0jiLdiCxB1jZwvsQ5B8+l6WkC5d6Hw+79gGPLziV58rE2Ufjo7L SmwP/qO4yQkgDCjtX2s5gkXIkjuFKC6x5bmwBnv1zfvCY/VKbdeoRp7tNUJWNOgYsx a4mzTUTBBmQ0w== Subject: Re: [PATCH net-next v5 03/14] dpll: dpllsim: Add configurable pins From: netdev-bot+sashiko@kernel.org To: poros@redhat.com Cc: netdev@vger.kernel.org, ivecera@redhat.com, jiri@nvidia.com, corbet@lwn.net, skhan@linuxfoundation.org, shuah@kernel.org, rdunlap@infradead.org, jani.nikula@intel.com, vadim.fedorenko@linux.dev, arkadiusz.kubalewski@intel.com, jiri@resnulli.us, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org Date: Sun, 29 Nov 2026 10:38:47 +0000 Message-ID: <179594872729.3146.11707362355260083730@kernel.org> In-Reply-To: <20261125090522.3777494-4-poros@redhat.com> References: <20261125090522.3777494-4-poros@redhat.com> X-sashiko-severity: Low Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Thank you for your contribution! Sashiko AI review found more severe issue(s) in other patches of this series. This mail is only an FYI, in case you want to address the nit picks below when you respin. Low priority / nit picks for your consideration: - [Low] In drivers/dpll/dpllsim/dpllsim.h, the comment on struct dpllsim_dev::pins and ::num_pins says "Pins in registration order,… -- dpll: dpllsim: Add configurable pins This adds configurable pins to the dpllsim driver. Each directory created under the pins/ configfs group of an instance is a pin with type, frequency and direction attributes. At live=1 the pins are validated, ordered, obtained and registered with the DPLL subsystem after the device. > diff --git a/drivers/dpll/dpllsim/dpllsim.h b/drivers/dpll/dpllsim/dpllsim.h > index 0b81bb2f769be..af33afc70cb2e 100644 > --- a/drivers/dpll/dpllsim/dpllsim.h > +++ b/drivers/dpll/dpllsim/dpllsim.h [ ... ] > @@ -27,6 +56,9 @@ struct dpllsim_dev { > * the live attribute reports, see dpllsim_dev_live(). > */ > bool registered; > + /* Pins in registration order, valid while @dpll is set */ > + struct dpllsim_pin **pins; > + int num_pins; [Severity: Low] This isn't a bug, but does this comment match how deploy and undeploy handle sim->pins? dpllsim_dev_deploy() in drivers/dpll/dpllsim/dpll.c sets sim->dpll first. Only after that does dpllsim_order_pins() allocate sim->pins: mutex_lock(&sim->lock); sim->dpll = dpll; mutex_unlock(&sim->lock); err = dpllsim_order_pins(sim); if (err) goto err_put_dpll; dpllsim_order_pins() can return -EINVAL before the allocation, for a pin with an unsupported frequency or a mux pin set as output. It can also return -ENOMEM when kzalloc_objs() fails. In both cases sim->dpll is set and sim->pins is NULL until the err_put_dpll unwind clears sim->dpll. dpllsim_dev_undeploy() has the opposite window. It clears sim->dpll before it frees sim->pins: scoped_guard(mutex, &sim->lock) sim->dpll = NULL; kfree(sim->pins); sim->pins = NULL; sim->num_pins = 0; All current users of sim->pins run inside the deploy/undeploy sequence under the configfs subsystem mutex. None of them checks dpllsim_dev_frozen() before walking sim->pins, so nothing breaks at runtime today. Should the comment say the array is valid while the device is registered? Another option is to build sim->pins before sim->dpll is published. -- Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261125090522.3777494-1-poros%40redhat.com