From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 DB447338F36; Tue, 26 Aug 2025 13:54:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756216499; cv=none; b=aSonk+REH7bf6Y2IHELwzFhRkaQndDAcfHvv9R3xMjbXf24KOV9Brv+InIv4hYG5yEz/M1sTb6ytxaJlLxmrk6uOXTTHlc4GPqA7zIUVZy3NA98/lM7VZT+ysXZcA1ZTGn1XxQrMLf2PpfVVuLUyJ3OT4z1oa8fFzyjpmFUe/8Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756216499; c=relaxed/simple; bh=zBnUXDl95ubkpdy6bY1y2KZUlixjr2b9CceOIoKiySU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=S6XLXaa16VzFwnIt6aizL8Hr/u3bYUB77x4PAaO1Mg55VQTjKIYBC08lkujkqXD5UIG+oA/ekcxgmxB5h6NL3hRJCiGvvTMJ5ei38B+6Fha00c5iMiMkWHlKCVJ6qnCXjNknFtxqOJfv26dnT7pDCpbh10RPuRhRJTpOA/jlN2c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=JMDGwjfd; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="JMDGwjfd" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6B02AC4CEF1; Tue, 26 Aug 2025 13:54:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1756216499; bh=zBnUXDl95ubkpdy6bY1y2KZUlixjr2b9CceOIoKiySU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JMDGwjfdYp0VRSRpuFrOGTRyKf4R/hYcT58uByNZRv4sa2Er+/81c8ZBhu9DS2OIa c8rR+1EJmmD4G7FsuA8cY6nRkO8m/SK5BsWBPydJAGtYP0Z6IwmMzcfPWMcaKUVZPm 3Twn/dMWm3pfBUE6b6GPfsJmVln9KUFF5l7owCbg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, =?UTF-8?q?Niklas=20S=C3=B6derlund?= , Sakari Ailus , Hans Verkuil , Sasha Levin Subject: [PATCH 5.15 397/644] media: v4l2-common: Reduce warnings about missing V4L2_CID_LINK_FREQ control Date: Tue, 26 Aug 2025 13:08:08 +0200 Message-ID: <20250826110956.287686351@linuxfoundation.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250826110946.507083938@linuxfoundation.org> References: <20250826110946.507083938@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Niklas Söderlund [ Upstream commit 5a0abb8909b9dcf347fce1d201ac6686ac33fd64 ] When operating a pipeline with a missing V4L2_CID_LINK_FREQ control this two line warning is printed each time the pipeline is started. Reduce this excessive logging by only warning once for the missing control. Signed-off-by: Niklas Söderlund Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Sasha Levin --- drivers/media/v4l2-core/v4l2-common.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-common.c b/drivers/media/v4l2-core/v4l2-common.c index 04af03285a20..90f76a7ff447 100644 --- a/drivers/media/v4l2-core/v4l2-common.c +++ b/drivers/media/v4l2-core/v4l2-common.c @@ -470,10 +470,10 @@ s64 v4l2_get_link_freq(struct v4l2_ctrl_handler *handler, unsigned int mul, freq = div_u64(v4l2_ctrl_g_ctrl_int64(ctrl) * mul, div); - pr_warn("%s: Link frequency estimated using pixel rate: result might be inaccurate\n", - __func__); - pr_warn("%s: Consider implementing support for V4L2_CID_LINK_FREQ in the transmitter driver\n", - __func__); + pr_warn_once("%s: Link frequency estimated using pixel rate: result might be inaccurate\n", + __func__); + pr_warn_once("%s: Consider implementing support for V4L2_CID_LINK_FREQ in the transmitter driver\n", + __func__); } return freq > 0 ? freq : -EINVAL; -- 2.39.5