lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <be974670-508c-4b07-8a4a-e3fc6156c131@ideasonboard.com>
Date: Wed, 19 Feb 2025 16:50:16 +0200
From: Tomi Valkeinen <tomi.valkeinen+renesas@...asonboard.com>
To: Niklas Söderlund <niklas.soderlund@...natech.se>
Cc: Mauro Carvalho Chehab <mchehab@...nel.org>,
 Sakari Ailus <sakari.ailus@...ux.intel.com>, linux-media@...r.kernel.org,
 linux-renesas-soc@...r.kernel.org, linux-kernel@...r.kernel.org,
 Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
 Laurent Pinchart <laurent.pinchart@...asonboard.com>,
 Jacopo Mondi <jacopo.mondi@...asonboard.com>
Subject: Re: [PATCH 07/18] media: rcar-csi2: Fix typo

Hi,

On 19/02/2025 16:46, Niklas Söderlund wrote:
> On 2025-02-19 16:36:27 +0200, Tomi Valkeinen wrote:
>> Hi,
>>
>> On 19/02/2025 16:24, Niklas Söderlund wrote:
>>> Hi Tomi,
>>>
>>> On 2025-02-19 15:49:01 +0200, Tomi Valkeinen wrote:
>>>> Fix typo with variable name 'msps'.
>>>
>>> FWIW, this is not a typo, C-PHY uses symbols per seconds, not bits per
>>> second.
>>
>> Hmm, but the code calls rcsi2_calc_mbps() and uses the returned value as
>> msps. How can that be right, if it's symbols?
> 
> I don't recall all the details off hand, but IIRC it's just a naming
> thing in the specification. I'm fine with using either, just wanted to
> point out it was not a typo but intentional name.

Ok. I don't mind either way that much, it was just very confusing. I'm 
not familiar with C-PHY, but I thought usually "symbol" is something 
else than a single bit. As msps is used in some other places in the 
file, adding a comment to the place where we switch from mbps to msps 
should be enough.

  Tomi

> 
>>
>>   Tomi
>>
>>>>
>>>> Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@...asonboard.com>
>>>> ---
>>>>    drivers/media/platform/renesas/rcar-csi2.c | 10 +++++-----
>>>>    1 file changed, 5 insertions(+), 5 deletions(-)
>>>>
>>>> diff --git a/drivers/media/platform/renesas/rcar-csi2.c b/drivers/media/platform/renesas/rcar-csi2.c
>>>> index 845fb3e155f1..92697ea3df01 100644
>>>> --- a/drivers/media/platform/renesas/rcar-csi2.c
>>>> +++ b/drivers/media/platform/renesas/rcar-csi2.c
>>>> @@ -1301,7 +1301,7 @@ static int rcsi2_start_receiver_v4h(struct rcar_csi2 *priv,
>>>>    	const struct rcar_csi2_format *format;
>>>>    	const struct v4l2_mbus_framefmt *fmt;
>>>>    	unsigned int lanes;
>>>> -	int msps;
>>>> +	int mbps;
>>>>    	int ret;
>>>>    	/* Use the format on the sink pad to compute the receiver config. */
>>>> @@ -1314,9 +1314,9 @@ static int rcsi2_start_receiver_v4h(struct rcar_csi2 *priv,
>>>>    	if (ret)
>>>>    		return ret;
>>>> -	msps = rcsi2_calc_mbps(priv, format->bpp, lanes);
>>>> -	if (msps < 0)
>>>> -		return msps;
>>>> +	mbps = rcsi2_calc_mbps(priv, format->bpp, lanes);
>>>> +	if (mbps < 0)
>>>> +		return mbps;
>>>>    	/* Reset LINK and PHY*/
>>>>    	rcsi2_write(priv, V4H_CSI2_RESETN_REG, 0);
>>>> @@ -1352,7 +1352,7 @@ static int rcsi2_start_receiver_v4h(struct rcar_csi2 *priv,
>>>>    	rcsi2_write16(priv, V4H_PPI_RW_COMMON_CFG_REG, 0x0003);
>>>>    	/* C-PHY settings */
>>>> -	ret = rcsi2_c_phy_setting_v4h(priv, msps);
>>>> +	ret = rcsi2_c_phy_setting_v4h(priv, mbps);
>>>>    	if (ret)
>>>>    		return ret;
>>>>
>>>> -- 
>>>> 2.43.0
>>>>
>>>
>>
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ