Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1571413
| From | Peter Meerwald-Stadler <pmeerw@pmeerw.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/2] iio: pressure: mpl3115: do not rely on structure field ordering |
| Date | 2017-02-01 11:00 +0100 |
| Message-ID | <t5ZRN-4h5-49@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <t5Zf4-41c-19@gated-at.bofh.it> <t5Zf4-41c-17@gated-at.bofh.it> <t5Zyq-4a5-19@gated-at.bofh.it> <t5Zyq-4a5-17@gated-at.bofh.it> <t5ZRN-4h5-51@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
> > - .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
> > BIT(IIO_CHAN_INFO_SCALE),
> > + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) |
> > BIT(IIO_CHAN_INFO_SCALE),
> > as originally intended
>
> I considered that option, but the code in mpl3115_read_raw (and
> mpl115_read_raw for that matter) return constants fro these values which
> to me indicated that they were not "separate" and as that would also be
> the change which replicated the exact behavior from before the regression
> I went with that. But I don't care either way, so I can re-spin if you
> want me to? (But don't blame me if that regresses in some other
> interesting way).
no, all good; shared_by_type is the way to go
I'd rather respin for the not ORed comment in the patch
> >> Cheers,
> >> peda
> >>
> >>> thanks, p.
> >>>
> >>>> diff --git a/drivers/iio/pressure/mpl3115.c b/drivers/iio/pressure/mpl3115.c
> >>>> index cc3f84139157..525644a7442d 100644
> >>>> --- a/drivers/iio/pressure/mpl3115.c
> >>>> +++ b/drivers/iio/pressure/mpl3115.c
> >>>> @@ -190,7 +190,7 @@ static const struct iio_chan_spec mpl3115_channels[] = {
> >>>> {
> >>>> .type = IIO_PRESSURE,
> >>>> .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
> >>>> - BIT(IIO_CHAN_INFO_SCALE),
> >>>> + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE),
> >>>> .scan_index = 0,
> >>>> .scan_type = {
> >>>> .sign = 'u',
> >>>> @@ -203,7 +203,7 @@ static const struct iio_chan_spec mpl3115_channels[] = {
> >>>> {
> >>>> .type = IIO_TEMP,
> >>>> .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
> >>>> - BIT(IIO_CHAN_INFO_SCALE),
> >>>> + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE),
> >>>> .scan_index = 1,
> >>>> .scan_type = {
> >>>> .sign = 's',
> >>>>
> >>>
> >>
> >
>
--
Peter Meerwald-Stadler
+43-664-2444418 (mobile)
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH 1/2] iio: pressure: mpl3115: do not rely on structure field ordering Peter Meerwald-Stadler <pmeerw@pmeerw.net> - 2017-02-01 10:20 +0100
Re: [PATCH 1/2] iio: pressure: mpl3115: do not rely on structure field ordering Peter Meerwald-Stadler <pmeerw@pmeerw.net> - 2017-02-01 10:40 +0100
Re: [PATCH 1/2] iio: pressure: mpl3115: do not rely on structure field ordering Peter Meerwald-Stadler <pmeerw@pmeerw.net> - 2017-02-01 11:00 +0100
RE: [PATCH 1/2] iio: pressure: mpl3115: do not rely on structure field ordering "Ken.Lin" <ken.lin@advantech.com> - 2017-02-01 19:30 +0100
csiph-web