Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1350960 > unrolled thread
| Started by | Jonathan Cameron <jic23@kernel.org> |
|---|---|
| First post | 2016-03-05 19:50 +0100 |
| Last post | 2016-03-16 09:50 +0100 |
| Articles | 5 — 4 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH] iio: adc: imx25-gcq: fix do_div Jonathan Cameron <jic23@kernel.org> - 2016-03-05 19:50 +0100
Re: [PATCH] iio: adc: imx25-gcq: fix do_div Markus Pargmann <mpa@pengutronix.de> - 2016-03-07 10:10 +0100
Re: [PATCH] iio: adc: imx25-gcq: fix do_div Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2016-03-07 12:10 +0100
Re: [PATCH] iio: adc: imx25-gcq: fix do_div Jonathan Cameron <jic23@kernel.org> - 2016-03-12 12:10 +0100
Re: [PATCH] iio: adc: imx25-gcq: fix do_div Lee Jones <lee.jones@linaro.org> - 2016-03-16 09:50 +0100
| From | Jonathan Cameron <jic23@kernel.org> |
|---|---|
| Date | 2016-03-05 19:50 +0100 |
| Subject | Re: [PATCH] iio: adc: imx25-gcq: fix do_div |
| Message-ID | <r9pr4-1LI-5@gated-at.bofh.it> |
On 03/03/16 12:51, Sudip Mukherjee wrote:
> We are getting build failure with tilepro allmodconfig with the error:
>
> drivers/iio/adc/fsl-imx25-gcq.c:236:4: note: in expansion of macro 'do_div'
> do_div(priv->channel_vref_mv[reg], 1000);
> ^
>
> include/asm-generic/div64.h:198:17: note: expected 'uint64_t *
> {aka long long unsigned int *}' but argument is of type 'u32 *
> {aka unsigned int *}'
>
> Create a temporary variable of type u64 and use that in do_div.
>
> Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Markus, can you take a quick look at this.
> ---
>
> tilepro allmodconfig build log is at:
> https://travis-ci.org/sudipm-mukherjee/parport/jobs/113325889
>
> drivers/iio/adc/fsl-imx25-gcq.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/iio/adc/fsl-imx25-gcq.c b/drivers/iio/adc/fsl-imx25-gcq.c
> index 2fd1927..e0636d4 100644
> --- a/drivers/iio/adc/fsl-imx25-gcq.c
> +++ b/drivers/iio/adc/fsl-imx25-gcq.c
> @@ -174,6 +174,7 @@ static int mx25_gcq_setup_cfgs(struct platform_device *pdev,
> struct device *dev = &pdev->dev;
> unsigned int refp_used[4] = {};
> int ret, i;
> + u64 temp;
>
> /*
> * Setup all configurations registers with a default conversion
> @@ -233,7 +234,9 @@ static int mx25_gcq_setup_cfgs(struct platform_device *pdev,
> priv->channel_vref_mv[reg] =
> regulator_get_voltage(priv->vref[refp]);
> /* Conversion from uV to mV */
> - do_div(priv->channel_vref_mv[reg], 1000);
> + temp = priv->channel_vref_mv[reg];
> + do_div(temp, 1000);
> + priv->channel_vref_mv[reg] = temp;
> break;
> case MX25_ADC_REFP_INT:
> priv->channel_vref_mv[reg] = 2500;
>
[toc] | [next] | [standalone]
| From | Markus Pargmann <mpa@pengutronix.de> |
|---|---|
| Date | 2016-03-07 10:10 +0100 |
| Message-ID | <r9ZkR-QT-1@gated-at.bofh.it> |
| In reply to | #1350960 |
[Multipart message — attachments visible in raw view] — view raw
Hi,
On Saturday 05 March 2016 18:43:11 Jonathan Cameron wrote:
> On 03/03/16 12:51, Sudip Mukherjee wrote:
> > We are getting build failure with tilepro allmodconfig with the error:
> >
> > drivers/iio/adc/fsl-imx25-gcq.c:236:4: note: in expansion of macro 'do_div'
> > do_div(priv->channel_vref_mv[reg], 1000);
> > ^
> >
> > include/asm-generic/div64.h:198:17: note: expected 'uint64_t *
> > {aka long long unsigned int *}' but argument is of type 'u32 *
> > {aka unsigned int *}'
> >
> > Create a temporary variable of type u64 and use that in do_div.
> >
> > Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
> Markus, can you take a quick look at this.
Thanks. I think this was already fixed by Arnd.
"iio: adc/imx25-gcq: move incorrect do_div"
Best Regards,
Markus
>
> > ---
> >
> > tilepro allmodconfig build log is at:
> > https://travis-ci.org/sudipm-mukherjee/parport/jobs/113325889
> >
> > drivers/iio/adc/fsl-imx25-gcq.c | 5 ++++-
> > 1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/iio/adc/fsl-imx25-gcq.c b/drivers/iio/adc/fsl-imx25-gcq.c
> > index 2fd1927..e0636d4 100644
> > --- a/drivers/iio/adc/fsl-imx25-gcq.c
> > +++ b/drivers/iio/adc/fsl-imx25-gcq.c
> > @@ -174,6 +174,7 @@ static int mx25_gcq_setup_cfgs(struct platform_device *pdev,
> > struct device *dev = &pdev->dev;
> > unsigned int refp_used[4] = {};
> > int ret, i;
> > + u64 temp;
> >
> > /*
> > * Setup all configurations registers with a default conversion
> > @@ -233,7 +234,9 @@ static int mx25_gcq_setup_cfgs(struct platform_device *pdev,
> > priv->channel_vref_mv[reg] =
> > regulator_get_voltage(priv->vref[refp]);
> > /* Conversion from uV to mV */
> > - do_div(priv->channel_vref_mv[reg], 1000);
> > + temp = priv->channel_vref_mv[reg];
> > + do_div(temp, 1000);
> > + priv->channel_vref_mv[reg] = temp;
> > break;
> > case MX25_ADC_REFP_INT:
> > priv->channel_vref_mv[reg] = 2500;
> >
>
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
[toc] | [prev] | [next] | [standalone]
| From | Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
|---|---|
| Date | 2016-03-07 12:10 +0100 |
| Message-ID | <ra1d0-24s-13@gated-at.bofh.it> |
| In reply to | #1351412 |
On Mon, Mar 07, 2016 at 10:01:34AM +0100, Markus Pargmann wrote:
> Hi,
>
> On Saturday 05 March 2016 18:43:11 Jonathan Cameron wrote:
> > On 03/03/16 12:51, Sudip Mukherjee wrote:
> > > We are getting build failure with tilepro allmodconfig with the error:
> > >
> > > drivers/iio/adc/fsl-imx25-gcq.c:236:4: note: in expansion of macro 'do_div'
> > > do_div(priv->channel_vref_mv[reg], 1000);
> > > ^
> > >
> > > include/asm-generic/div64.h:198:17: note: expected 'uint64_t *
> > > {aka long long unsigned int *}' but argument is of type 'u32 *
> > > {aka unsigned int *}'
> > >
> > > Create a temporary variable of type u64 and use that in do_div.
> > >
> > > Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
> > Markus, can you take a quick look at this.
>
> Thanks. I think this was already fixed by Arnd.
> "iio: adc/imx25-gcq: move incorrect do_div"
It should. But I still have the same build failure with next-20160307
and not only tilepro, even m32r is also having the same build failure.
regards
sudip
[toc] | [prev] | [next] | [standalone]
| From | Jonathan Cameron <jic23@kernel.org> |
|---|---|
| Date | 2016-03-12 12:10 +0100 |
| Message-ID | <rbPAJ-51S-3@gated-at.bofh.it> |
| In reply to | #1351534 |
On 07/03/16 11:06, Sudip Mukherjee wrote:
> On Mon, Mar 07, 2016 at 10:01:34AM +0100, Markus Pargmann wrote:
>> Hi,
>>
>> On Saturday 05 March 2016 18:43:11 Jonathan Cameron wrote:
>>> On 03/03/16 12:51, Sudip Mukherjee wrote:
>>>> We are getting build failure with tilepro allmodconfig with the error:
>>>>
>>>> drivers/iio/adc/fsl-imx25-gcq.c:236:4: note: in expansion of macro 'do_div'
>>>> do_div(priv->channel_vref_mv[reg], 1000);
>>>> ^
>>>>
>>>> include/asm-generic/div64.h:198:17: note: expected 'uint64_t *
>>>> {aka long long unsigned int *}' but argument is of type 'u32 *
>>>> {aka unsigned int *}'
>>>>
>>>> Create a temporary variable of type u64 and use that in do_div.
>>>>
>>>> Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
>>> Markus, can you take a quick look at this.
>>
>> Thanks. I think this was already fixed by Arnd.
>> "iio: adc/imx25-gcq: move incorrect do_div"
>
> It should. But I still have the same build failure with next-20160307
> and not only tilepro, even m32r is also having the same build failure.
>
Lee, did you pick the original fix from Arnd up?
I can take this after the merge window if not.
Jonathan
> regards
> sudip
>
[toc] | [prev] | [next] | [standalone]
| From | Lee Jones <lee.jones@linaro.org> |
|---|---|
| Date | 2016-03-16 09:50 +0100 |
| Message-ID | <rdfjt-6uw-45@gated-at.bofh.it> |
| In reply to | #1356397 |
On Sat, 12 Mar 2016, Jonathan Cameron wrote:
> On 07/03/16 11:06, Sudip Mukherjee wrote:
> > On Mon, Mar 07, 2016 at 10:01:34AM +0100, Markus Pargmann wrote:
> >> Hi,
> >>
> >> On Saturday 05 March 2016 18:43:11 Jonathan Cameron wrote:
> >>> On 03/03/16 12:51, Sudip Mukherjee wrote:
> >>>> We are getting build failure with tilepro allmodconfig with the error:
> >>>>
> >>>> drivers/iio/adc/fsl-imx25-gcq.c:236:4: note: in expansion of macro 'do_div'
> >>>> do_div(priv->channel_vref_mv[reg], 1000);
> >>>> ^
> >>>>
> >>>> include/asm-generic/div64.h:198:17: note: expected 'uint64_t *
> >>>> {aka long long unsigned int *}' but argument is of type 'u32 *
> >>>> {aka unsigned int *}'
> >>>>
> >>>> Create a temporary variable of type u64 and use that in do_div.
> >>>>
> >>>> Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
> >>> Markus, can you take a quick look at this.
> >>
> >> Thanks. I think this was already fixed by Arnd.
> >> "iio: adc/imx25-gcq: move incorrect do_div"
> >
> > It should. But I still have the same build failure with next-20160307
> > and not only tilepro, even m32r is also having the same build failure.
> >
> Lee, did you pick the original fix from Arnd up?
>
> I can take this after the merge window if not.
Yes, it's in my tree.
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web