public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
From: Sergey Shtylyov <sergei.shtylyov@gmail.com>
To: Andy Shevchenko <andriy.shevchenko@intel.com>,
	Felipe Ribeiro de Souza <felipers@ime.usp.br>
Cc: andy@kernel.org, dlechner@baylibre.com, jic23@kernel.org,
	nuno.sa@analog.com, paul@crapouillou.net,
	Lucas Ivars Cadima Ciziks <lucas@ciziks.com>,
	linux-iio@vger.kernel.org, linux-mips@vger.kernel.org
Subject: Re: [PATCH v3 1/2] iio: adc: ingenic-adc: refactor ingenic_adc_read_chan_info_raw()
Date: Wed, 22 Apr 2026 16:28:24 +0300	[thread overview]
Message-ID: <e62e3f14-c1fe-45bc-ae9e-760058dfca1d@gmail.com> (raw)
In-Reply-To: <aeiJo3RCKFLEGLEt@ashevche-desk.local>

On 4/22/26 11:41 AM, Andy Shevchenko wrote:
[...]

>> Extract the sample logic from ingenic_adc_read_chan_info_raw() into
>> a new helper function ingenic_adc_read_chan_locked() to improve code
>> readability and modularity.
>>
>> The helper handles the mutex-protected section for sampling channels,
>> while the main function manages clock enabling/disabling.
> 
> ...
> 
>> +static int ingenic_adc_read_chan_info_raw(struct iio_dev *iio_dev,
>> +					  struct iio_chan_spec const *chan,
>> +					  int *val)
>> +{
>> +	int ret;
>> +	struct ingenic_adc *adc = iio_priv(iio_dev);
> 
> Please, keep it as in reversed xmas tree order.
> 
>> +	ret = clk_enable(adc->clk);
> 
>> +
> 
> Redundant blank line.

   Yep.

> 
>> +	if (ret) {
>> +		dev_err(iio_dev->dev.parent, "Failed to enable clock: %d\n",
>> +			ret);
> 
> Make it a single line. It's fine to go a bit over 80 for readability purposes.

   And BTW the new checkpatch limit is 100 columns. :-)

[...]

MBR, Sergey


  reply	other threads:[~2026-04-22 13:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-21 22:14 [PATCH v3 0/2] use guard()() to handle synchronisation Felipe Ribeiro de Souza
2026-04-21 22:14 ` [PATCH v3 1/2] iio: adc: ingenic-adc: refactor ingenic_adc_read_chan_info_raw() Felipe Ribeiro de Souza
2026-04-22  8:41   ` Andy Shevchenko
2026-04-22 13:28     ` Sergey Shtylyov [this message]
2026-04-21 22:14 ` [PATCH v3 2/2] iio: adc: ingenic-adc: use guard()() to handle synchronisation Felipe Ribeiro de Souza
2026-04-22  8:48   ` Andy Shevchenko

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=e62e3f14-c1fe-45bc-ae9e-760058dfca1d@gmail.com \
    --to=sergei.shtylyov@gmail.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=felipers@ime.usp.br \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=lucas@ciziks.com \
    --cc=nuno.sa@analog.com \
    --cc=paul@crapouillou.net \
    /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