[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z-EwPknex_gajz97@smile.fi.intel.com>
Date: Mon, 24 Mar 2025 12:13:18 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Pop Ioan Daniel <pop.ioan-daniel@...log.com>
Cc: Lars-Peter Clausen <lars@...afoo.de>,
Michael Hennerich <Michael.Hennerich@...log.com>,
Jonathan Cameron <jic23@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Nuno Sa <nuno.sa@...log.com>,
Olivier Moysan <olivier.moysan@...s.st.com>,
David Lechner <dlechner@...libre.com>,
Javier Carrasco <javier.carrasco.cruz@...il.com>,
Guillaume Stols <gstols@...libre.com>,
Trevor Gamblin <tgamblin@...libre.com>,
Dumitru Ceclan <mitrutzceclan@...il.com>,
Matteo Martelli <matteomartelli3@...il.com>,
João Paulo Gonçalves <joao.goncalves@...adex.com>,
Alisa-Dariana Roman <alisadariana@...il.com>,
Thomas Bonnefille <thomas.bonnefille@...tlin.com>,
Herve Codina <herve.codina@...tlin.com>,
Marcelo Schmitt <marcelo.schmitt@...log.com>,
Dragos Bogdan <dragos.bogdan@...log.com>, linux-iio@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/5] iio: backend: add support for decimation ratio set
On Mon, Mar 24, 2025 at 11:07:56AM +0200, Pop Ioan Daniel wrote:
> Add backend support for setting the decimation ratio used.
...
> +/**
> + * iio_backend_set_dec_rate - set decimation ratio
> + * @back: Backend device
> + * @rate: Rate in decimal
> +
Something is missing here...
> + * Return:
> + * 0 on success, negative error number on failure.
Please, double check that the style of Return section is the same as for the
rest of the functions in this file. If there are different styles choose one
which is simultaneously more recent and has more common sense in it (like
Returns: vs. Return, the preferred is the latter).
> + */
> +
Here is an uneeded blank line.
> +int iio_backend_set_dec_rate(struct iio_backend *back, unsigned int rate)
> +{
> + if (!rate)
> + return -EINVAL;
Yeah, besides missing style comment above, the function is undescribed. You
really need to add something meaningful in the kernel-doc and esp. explain
corner cases like this and choices made (why we fail it, what's wrong with 0?).
> + return iio_backend_op_call(back, set_dec_rate, rate);
> +}
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists