From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [78.32.30.218]) (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 58067289378 for ; Tue, 16 Sep 2025 21:36:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=78.32.30.218 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758058567; cv=none; b=OKuvMcHp+xYU0vpQKtjxoVgY6/L89IHWNT9qGTRc7gso6q5OBm9a/OXqTrre5Jnj5xqn0Vh/yI5Co9OSI/VY56IX9c2Xnowptg31gycnIxgLe+bGQ47Kw//+3nn1WVM7ec05jjS4YCgecsTPX08c2AbIhNstLfjz4LArC4rtPO0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758058567; c=relaxed/simple; bh=R4IvnZP2BURM3byBfHmk2G06US6ImqiQPBrwjfp+Gq8=; h=In-Reply-To:References:From:To:Cc:Subject:MIME-Version: Content-Disposition:Content-Type:Message-Id:Date; b=NwxvgCxxsG5/0T1ncdIvC/AjBlAH/IbAA4zMoJ/TcWTaVohW8IspW+HrVZsBWFydQp5uxDKktn1s+imS/4bkaBG32fFX1GDUIT0w6KhtjkFMAXBFUW5xfSrx9U0QWNkPgdj8+1S3ZFti3dD4ESY60WFo2ZD/XOC/67cr3tDlL/g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk; spf=none smtp.mailfrom=armlinux.org.uk; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b=i750OeBt; arc=none smtp.client-ip=78.32.30.218 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="i750OeBt" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Date:Sender:Message-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=IG3KIjpS95Gc1iwbQ1wqN6dm9jeRa7ZM8TVQTaMIbFE=; b=i750OeBtu0cttNNbqqkqE6VLrW XkmXkF6xAJKJdUng4rBLBPQSyOCch+siXxAEjrn2xPCiMBYwHfYe8/mbGJ8qmlx1/olehbM2LgZTk WiyznEQGHOHu9AS1s82mJlUMffZ4++pyEFoQSvg7Sm4oGGhQgHLNqguvwFeat0cVfAcEBbaCMEafB wqarakGmvb3+vf7aReoPD7iknk/CcBcFv9bNSBMeXKbFnbDGfitZh3aNKrjSEuApFkwLZQNM0yGNS IoJv/MSD28+Qc4SAHrrUE3V0VCEkCS1DOEMQ23uPn2VozBQVHClR9GExQhs94sj3nM11WxFAAAy6+ Tr2CN2Yg==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:47228 helo=rmk-PC.armlinux.org.uk) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1uydLD-000000006LX-1JJa; Tue, 16 Sep 2025 22:35:59 +0100 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.98.2) (envelope-from ) id 1uydLC-000000061DG-2BRt; Tue, 16 Sep 2025 22:35:58 +0100 In-Reply-To: References: From: "Russell King (Oracle)" To: Richard Cochran Cc: Ajay Kaher , Alexey Makhalov , Andrew Lunn , Broadcom internal kernel review list , Clark Wang , "David S. Miller" , David Woodhouse , Eric Dumazet , imx@lists.linux.dev, Jakub Kicinski , Jonathan Lemon , netdev@vger.kernel.org, Nick Shi , Paolo Abeni , Sven Schnelle , Vadim Fedorenko , Vladimir Oltean , Wei Fang , Yangbo Lu Subject: [PATCH net-next v2 1/2] ptp: describe the two disables in ptp_set_pinfunc() Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" Message-Id: Sender: Russell King Date: Tue, 16 Sep 2025 22:35:58 +0100 Accurately describe what each call to ptp_disable_pinfunc() is doing, rather than the misleading comment above the first disable. This helps to make the code more readable. Reviewed-by: Vladimir Oltean Reviewed-by: Vadim Fedorenko Signed-off-by: Russell King (Oracle) --- drivers/ptp/ptp_chardev.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/ptp/ptp_chardev.c b/drivers/ptp/ptp_chardev.c index e9719f365aab..eb4f6d1b1460 100644 --- a/drivers/ptp/ptp_chardev.c +++ b/drivers/ptp/ptp_chardev.c @@ -91,12 +91,18 @@ int ptp_set_pinfunc(struct ptp_clock *ptp, unsigned int pin, return -EOPNOTSUPP; } - /* Disable whatever function was previously assigned. */ + /* Disable whichever pin was previously assigned to this function and + * channel. + */ if (pin1) { ptp_disable_pinfunc(info, func, chan); pin1->func = PTP_PF_NONE; pin1->chan = 0; } + + /* Disable whatever function was previously assigned to the requested + * pin. + */ ptp_disable_pinfunc(info, pin2->func, pin2->chan); pin2->func = func; pin2->chan = chan; -- 2.47.3