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=1796255579; b=Xma4yLEJBzgbV2H+XFp4Ln2Viz3ouxqn4vg2VVSfUTvIoeTIn7kh8icXpT6gWnRofTvW 5Jbo+fUIGvzTM5gmUGWNaDICeMkJ0Z3x6zGOjC3wc40QZJrtSVUShQ+2Xp1UPAEjfjmxV vSEo/sW2H5J+agYWK90fpIrTkIjzdDjWJbKkzJn1YSci9RBQcXWdCLFEoXSiyh9yasBF3 uQA0uScCUfxNE9XgAv1oRrSnsER7li0P5/IBHNdSdtBw1yU24yCDdJPo7hqzLmKofEuAY FPlas9hIU0Qhe6tCkzkOdkLE9DB0FEkMUfipfFyjvwacIkvhYp1TJW00ClH7xZJHyZQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796255579; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=Ij5rYY0l+7TmRT3it1DWyjEVWg1qJcAwr83fTueoc1k=; b=ck6vqP0KFGHvPdUQLZALmarr9HIK4EjaYx15F4/Srtjq7xuyQlzS+Y9kw0m430Apnb6E fpFTmktfXO2vUoKiCa8wHtQeRjzzcz12uvWjzteFWU9Tpfn/LO+FZvBGWLoQcef1uBcIA A/HrLN+JBFq+dpeRwXZ/1hSfDvp5h7/NCT0gcyg64f0nn/SSUhTFQCRKKP5yG0qMegBYj jvAjZ27nb6xS7h8acvxNHx+pJO659kGwSlgCv51Umop4tg2L4ViQ1WJhQo8Ueqwd46ARP avFQWLCyneY+cBrWvCm8XITIxU2JZmIj4Mcsz17NuEJOJA7pUL80fj+2a9sOK6UTllA== 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=hbGPmPnp; 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 A3A5F606A330 for ; Wed, 2 Dec 2026 23:52:59 +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=hbGPmPnp Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51CE31F00897; Wed, 2 Dec 2026 23:52:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796255579; bh=Ij5rYY0l+7TmRT3it1DWyjEVWg1qJcAwr83fTueoc1k=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=hbGPmPnpOlhihG72XN+XO9VIqiuKh++zIQ+h4EdfS++5B2NmXM5eHDwimVCdIvbgr t2hJIP6KgFYAKzZeZFDhavDHmVblVydSUfAmiLbo6dPAUsisb7pRIsqutHpDrk1hNM JBh1fi9JdIQj1aFIrl72T7xe5u0TtjnGrEsZPIzENBDbQEvkwHwz1+At1zEKMKpByo jBtIjx/x3WsVtORqfYV0JR4EXZ8Q6ho5k7xrA+rROBTnu/yVDwyXgatcn9yM7t8b+D YiraUQuoSTsp0zqJrzR4bdTFWULDT6aoHV6812hAY9aa1TYo6eVkbgiJJvVeugIjHU 3P92sA9ZTt+nw== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH net-next v17 08/13] dpll: sit9531x: add support to get and set priority on input pins Reply-To: sashiko-reviews@lists.linux.dev To: "Ali Rouhi" Cc: =?utf-8?b?ZGV2aWNldHJlZUB2Z2VyLmtlcm5lbC5vcmc=?= , robh@kernel.org, conor+dt@kernel.org In-Reply-To: <20261201235202.97645-9-arouhi@sitime.com> References: <20261201235202.97645-1-arouhi@sitime.com> <20261201235202.97645-9-arouhi@sitime.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Wed, 02 Dec 2026 23:52:59 +0000 X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] dpll: sit9531x: stale operstate baseline in sit9531x_dpll_input_pin_prio_set() -- commit 8dd5b67982e2e09fb4ad387969a6060c80776b17 Author: Oleg Zadorozhnyi dpll: sit9531x: add support to get and set priority on input pins This commit adds DPLL pin priority get and set support for input pins on SiT9531x PLLs and tracks pin priority and operational state changes for periodic poll notifications. > diff --git a/drivers/dpll/sit9531x/dpll.c b/drivers/dpll/sit9531x/dpll.c > index 5d16183aa1aeb..3a31d0707127a 100644 > --- a/drivers/dpll/sit9531x/dpll.c > +++ b/drivers/dpll/sit9531x/dpll.c [ ... ] > @@ -403,6 +411,10 @@ sit9531x_dpll_input_pin_state_on_dpll_set(const stru= ct dpll_pin *pin, > break; > } > =20 > + /* The core notifies this request; the poll compares to this record */ > + if (!rc) > + sit9531x_dpll_pin_baseline(dpin); > + > mutex_unlock(&sitdev->multiop_lock); > =20 > if (rc =3D=3D -ENOSPC) > @@ -414,11 +426,82 @@ sit9531x_dpll_input_pin_state_on_dpll_set(const str= uct dpll_pin *pin, > return rc; > } [ ... ] > +static int > +sit9531x_dpll_input_pin_prio_set(const struct dpll_pin *pin, void *pin_p= riv, > + const struct dpll_device *dpll, > + void *dpll_priv, u32 prio, > + struct netlink_ext_ack *extack) > +{ > + struct sit9531x_dpll_pin *dpin =3D pin_priv; > + struct sit9531x_dpll *sitdpll =3D dpll_priv; > + struct sit9531x_dev *sitdev =3D sitdpll->dev; > + int rc; > + > + if (dpin->dir !=3D DPLL_PIN_DIRECTION_INPUT) { > + NL_SET_ERR_MSG(extack, "Priority applies only to input pins"); > + return -EINVAL; > + } > + > + if (prio > U8_MAX) { > + NL_SET_ERR_MSG(extack, "Priority out of range (0-255)"); > + return -EINVAL; > + } > + > + mutex_lock(&sitdev->multiop_lock); > + if (sit9531x_chan_state_get(sitdev, sitdpll->id)->manual_input) { > + mutex_unlock(&sitdev->multiop_lock); > + return sit9531x_dpll_manual_select_refuse(extack); > + } > + rc =3D sit9531x_input_prio_set(sitdev, sitdpll->id, > + sit9531x_input_hw_src(dpin->id), > + (u8)prio); > + if (!rc) > + dpin->prio =3D prio; > + mutex_unlock(&sitdev->multiop_lock); [Severity: Medium] Should sit9531x_dpll_input_pin_prio_set() call sit9531x_dpll_pin_baseline() instead of only updating dpin->prio? When changing the priority of a listed input pin rewrites the priority table, sit9531x_prio_table_commit() forces holdover, latches the new table, and refreshes the channel state via sit9531x_chan_state_fetch() before returning, and dpll_pin_prio_set() immediately emits __dpll_pin_change_ntf(pin) with the post-commit operstate. Because dpin->operstate is left at its pre-commit value, if dpin was DPLL_PIN_OPERSTATE_ACTIVE before the table rewrite and is temporarily reported as DPLL_PIN_OPERSTATE_STANDBY in the immediate notification while the PLL exits holdover and re-acquires lock, sit9531x_dpll_changes_check() will later compare the restored DPLL_PIN_OPERSTATE_ACTIVE against the stale dpin->operstate (still DPLL_PIN_OPERSTATE_ACTIVE) and miss sending the notification that the pin became active again. Conversely, if the priority change switches the PLL away from dpin so it becomes STANDBY, the next poll tick will emit a duplicate notification. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261201235202.9764= 5-1-arouhi@sitime.com?part=3D8