public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Hans Verkuil <hverkuil-cisco@xs4all.nl>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jai Luthra <jai.luthra@ideasonboard.com>
Subject: Re: [PATCH 04/13] media: i2c: ds90ub960: Fix logging SP & EQ status only for UB9702
Date: Thu, 10 Oct 2024 16:58:01 +0300	[thread overview]
Message-ID: <ZwfdaeRkAc3PzKsX@smile.fi.intel.com> (raw)
In-Reply-To: <20241004-ub9xx-fixes-v1-4-e30a4633c786@ideasonboard.com>

On Fri, Oct 04, 2024 at 05:46:35PM +0300, Tomi Valkeinen wrote:
> UB9702 does not have SP and EQ registers, but the driver uses them in
> log_status(). Fix this by separating the SP and EQ related log_status()
> work into a separate function (for clarity) and calling that function
> only for UB960.

...

> +		dev_info(dev, "\tStrobe range [%d, %d]\n",
> +			 ((v >> UB960_XR_SFILTER_CFG_SFILTER_MIN_SHIFT) & 0xf) -
> +				 7,
> +			 ((v >> UB960_XR_SFILTER_CFG_SFILTER_MAX_SHIFT) & 0xf) -
> +				 7);

I believe the code is much more readable if those 7:s moved to the previous
lines. Btw, does driver use bitfield.h? And why not?


...

> -			dev_info(dev, "\tStrobe range [%d, %d]\n",
> -				 ((v >> UB960_XR_SFILTER_CFG_SFILTER_MIN_SHIFT) & 0xf) - 7,
> -				 ((v >> UB960_XR_SFILTER_CFG_SFILTER_MAX_SHIFT) & 0xf) - 7);

It will be even shorter in the new code!

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2024-10-10 13:58 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-04 14:46 [PATCH 00/13] media: i2c: ds90ub9xx: Misc fixes and improvements Tomi Valkeinen
2024-10-04 14:46 ` [PATCH 01/13] media: i2c: ds90ub9x3: Fix extra fwnode_handle_put() Tomi Valkeinen
2024-10-10 14:02   ` Andy Shevchenko
2024-10-04 14:46 ` [PATCH 02/13] media: i2c: ds90ub960: Fix UB9702 refclk register access Tomi Valkeinen
2024-10-04 14:46 ` [PATCH 03/13] media: i2c: ds90ub960: Fix use of non-existing registers on UB9702 Tomi Valkeinen
2024-10-10 13:55   ` Andy Shevchenko
2024-10-04 14:46 ` [PATCH 04/13] media: i2c: ds90ub960: Fix logging SP & EQ status only for UB9702 Tomi Valkeinen
2024-10-10 13:58   ` Andy Shevchenko [this message]
2024-10-04 14:46 ` [PATCH 05/13] media: i2c: ds90ub960: Fix UB9702 VC map Tomi Valkeinen
2024-10-04 14:46 ` [PATCH 06/13] media: i2c: ds90ub960: Add support for I2C_RX_ID Tomi Valkeinen
2024-10-10 13:59   ` Andy Shevchenko
2024-10-04 14:46 ` [PATCH 07/13] media: i2c: ds90ub960: Add RGB24, RAW8 and RAW10 formats Tomi Valkeinen
2024-10-04 14:46 ` [PATCH 08/13] media: i2c: ds90ub953: Clear CRC errors in ub953_log_status() Tomi Valkeinen
2024-10-04 14:46 ` [PATCH 09/13] media: i2c: ds90ub960: Drop unused indirect block define Tomi Valkeinen
2024-10-04 14:46 ` [PATCH 10/13] media: i2c: ds90ub960: Reduce sleep in ub960_rxport_wait_locks() Tomi Valkeinen
2024-10-10 14:00   ` Andy Shevchenko
2024-10-04 14:46 ` [PATCH 11/13] media: i2c: ds90ub960: Handle errors in ub960_log_status_ub960_sp_eq() Tomi Valkeinen
2024-10-10 14:02   ` Andy Shevchenko
2024-10-04 14:46 ` [PATCH 12/13] media: i2c: ds90ub913: Add error handling to ub913_hw_init() Tomi Valkeinen
2024-10-10 14:04   ` Andy Shevchenko
2024-11-08  9:34     ` Tomi Valkeinen
2024-11-08 11:27       ` Andy Shevchenko
2024-10-04 14:46 ` [PATCH 13/13] media: i2c: ds90ub953: Add error handling for i2c reads/writes Tomi Valkeinen
2024-10-10 14:06   ` Andy Shevchenko
2024-11-08  9:34     ` Tomi Valkeinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZwfdaeRkAc3PzKsX@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=jai.luthra@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=tomi.valkeinen@ideasonboard.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox