All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandru Ardelean <ardeleanalex@gmail.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Alexandru Ardelean <alexandru.ardelean@analog.com>,
	linux-iio <linux-iio@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Jonathan Cameron <jic23@kernel.org>,
	Eugen Hristev <eugen.hristev@microchip.com>,
	Nicolas Ferre <nicolas.ferre@microchip.com>,
	Ludovic Desroches <ludovic.desroches@microchip.com>,
	Benson Leung <bleung@chromium.org>,
	Enric Balletbo i Serra <enric.balletbo@collabora.com>,
	groeck@chromium.org,
	Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
	Gwendal Grignou <gwendal@chromium.org>
Subject: Re: [PATCH v3 7/9] iio: cros_ec: use devm_iio_triggered_buffer_setup_ext()
Date: Tue, 29 Sep 2020 17:31:55 +0300	[thread overview]
Message-ID: <CA+U=DsoKM6S+1vrhE6txB-zQLhpJE1St19D_tmHa0=bbqj-g8w@mail.gmail.com> (raw)
In-Reply-To: <CAHp75VerL3x7L=AeLfnT6D01a=FyY3JE4vbwNFMaJz-v=f2k9w@mail.gmail.com>

On Tue, Sep 29, 2020 at 4:09 PM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
>
> On Tue, Sep 29, 2020 at 3:55 PM Alexandru Ardelean
> <alexandru.ardelean@analog.com> wrote:
>
> > This change switches to the new devm_iio_triggered_buffer_setup_ext()
> > function and removes the iio_buffer_set_attrs() call, for assigning the
> > HW FIFO attributes to the buffer.
>
> Sorry, you were too fast with the version, below one nit.
>
> > Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
> > ---
> >  .../common/cros_ec_sensors/cros_ec_sensors_core.c | 15 +++++++++------
> >  1 file changed, 9 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c b/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c
> > index c62cacc04672..1eafcf04ad69 100644
> > --- a/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c
> > +++ b/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c
> > @@ -353,19 +353,22 @@ int cros_ec_sensors_core_init(struct platform_device *pdev,
> >                         if (ret)
> >                                 return ret;
> >                 } else {
> > +                       const struct attribute **fifo_attrs;
> > +
> > +                       if (has_hw_fifo)
> > +                               fifo_attrs = cros_ec_sensor_fifo_attributes;
> > +                       else
> > +                               fifo_attrs = NULL;
> > +
> >                         /*
> >                          * The only way to get samples in buffer is to set a
> >                          * software trigger (systrig, hrtimer).
> >                          */
> > -                       ret = devm_iio_triggered_buffer_setup(
>
> > +                       ret = devm_iio_triggered_buffer_setup_ext(
> >                                         dev, indio_dev, NULL, trigger_capture,
> > -                                       NULL);
> > +                                       NULL, fifo_attrs);
>
> Perhaps it's time to reformat a bit, i.e. move dev to the first line
> and do the rest accordingly?

this feels like a mix of preferences here;
for once, the patch here [as-is], is the minimal form for this change
[in terms of patch-noise];
so, some people would choose the least noisiest patch;

also, this indentation was chosen [as-is here] from the start [for
this code block];
not sure if it was preferred; i'd suspect it was due to the old 80-col limit;

i'd leave it as-is [for now], or defer the decision to a maintainer to
decide [either IIO or chromium];

>
> >                         if (ret)
> >                                 return ret;
> > -
> > -                       if (has_hw_fifo)
> > -                               iio_buffer_set_attrs(indio_dev->buffer,
> > -                                                    cros_ec_sensor_fifo_attributes);
> >                 }
> >         }
> >
> > --
> > 2.17.1
> >
>
>
> --
> With Best Regards,
> Andy Shevchenko

  reply	other threads:[~2020-09-29 14:32 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-29 12:59 [PATCH v3 0/9] iio: remove iio_buffer_set_attrs() and assign buffer attrs during alloc Alexandru Ardelean
2020-09-29 12:59 ` [PATCH v3 1/9] iio: buffer: dmaengine: unwrap the use of iio_buffer_set_attrs() Alexandru Ardelean
2020-09-29 12:59 ` [PATCH v3 2/9] iio: adc: at91-sama5d2_adc: merge buffer & trigger init into a function Alexandru Ardelean
2020-09-29 12:59 ` [PATCH v3 3/9] iio: triggered-buffer: add {devm_}iio_triggered_buffer_setup_ext variants Alexandru Ardelean
2020-09-29 12:59 ` [PATCH v3 4/9] iio: accel: adxl372: use devm_iio_triggered_buffer_setup_ext() Alexandru Ardelean
2020-09-29 12:59 ` [PATCH v3 5/9] iio: accel: bmc150: use iio_triggered_buffer_setup_ext() Alexandru Ardelean
2020-09-29 12:59 ` [PATCH v3 6/9] iio: adc: at91-sama5d2_adc: use devm_iio_triggered_buffer_setup_ext() Alexandru Ardelean
2020-09-29 12:59 ` [PATCH v3 7/9] iio: cros_ec: " Alexandru Ardelean
2020-09-29 13:08   ` Andy Shevchenko
2020-09-29 14:31     ` Alexandru Ardelean [this message]
2020-09-29 15:40       ` Jonathan Cameron
2020-11-18 10:35         ` Alexandru Ardelean
2020-11-21 14:47           ` Jonathan Cameron
2020-11-21 14:55             ` Jonathan Cameron
2020-11-21 14:56               ` Jonathan Cameron
2020-09-29 12:59 ` [PATCH v3 8/9] iio: hid-sensors: use iio_triggered_buffer_setup_ext() Alexandru Ardelean
2020-09-29 12:59 ` [PATCH v3 9/9] iio: buffer: remove iio_buffer_set_attrs() helper Alexandru Ardelean
2020-09-29 13:09 ` [PATCH v3 0/9] iio: remove iio_buffer_set_attrs() and assign buffer attrs during alloc Andy Shevchenko
2020-09-29 13:09   ` 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='CA+U=DsoKM6S+1vrhE6txB-zQLhpJE1St19D_tmHa0=bbqj-g8w@mail.gmail.com' \
    --to=ardeleanalex@gmail.com \
    --cc=alexandru.ardelean@analog.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=bleung@chromium.org \
    --cc=enric.balletbo@collabora.com \
    --cc=eugen.hristev@microchip.com \
    --cc=groeck@chromium.org \
    --cc=gwendal@chromium.org \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ludovic.desroches@microchip.com \
    --cc=nicolas.ferre@microchip.com \
    --cc=srinivas.pandruvada@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.