* [PATCH] iio: adc: imx25-gcq: fix do_div @ 2016-03-03 12:51 Sudip Mukherjee [not found] ` <1457009513-7069-1-git-send-email-sudipm.mukherjee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Sudip Mukherjee @ 2016-03-03 12:51 UTC (permalink / raw) To: Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, kernel-testers-u79uwXL29TY76Z2rM5mHXA, linux-iio-u79uwXL29TY76Z2rM5mHXA, Sudip Mukherjee 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-4yDnlxn2s6sWdaTGBSpHTA@public.gmane.org> --- 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; -- 1.9.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
[parent not found: <1457009513-7069-1-git-send-email-sudipm.mukherjee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH] iio: adc: imx25-gcq: fix do_div [not found] ` <1457009513-7069-1-git-send-email-sudipm.mukherjee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2016-03-05 18:43 ` Jonathan Cameron [not found] ` <56DB28BF.9070508-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Jonathan Cameron @ 2016-03-05 18:43 UTC (permalink / raw) To: Sudip Mukherjee, Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, kernel-testers-u79uwXL29TY76Z2rM5mHXA, linux-iio-u79uwXL29TY76Z2rM5mHXA, Markus Pargmann 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-4yDnlxn2s6sWdaTGBSpHTA@public.gmane.org> 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; > ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <56DB28BF.9070508-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>]
* Re: [PATCH] iio: adc: imx25-gcq: fix do_div [not found] ` <56DB28BF.9070508-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> @ 2016-03-07 9:01 ` Markus Pargmann 2016-03-07 11:06 ` Sudip Mukherjee 0 siblings, 1 reply; 6+ messages in thread From: Markus Pargmann @ 2016-03-07 9:01 UTC (permalink / raw) To: Jonathan Cameron Cc: Sudip Mukherjee, Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald, linux-kernel-u79uwXL29TY76Z2rM5mHXA, kernel-testers-u79uwXL29TY76Z2rM5mHXA, linux-iio-u79uwXL29TY76Z2rM5mHXA [-- Attachment #1: Type: text/plain, Size: 2388 bytes --] 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-4yDnlxn2s6sWdaTGBSpHTA@public.gmane.org> > 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 | [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] iio: adc: imx25-gcq: fix do_div 2016-03-07 9:01 ` Markus Pargmann @ 2016-03-07 11:06 ` Sudip Mukherjee 2016-03-12 11:09 ` Jonathan Cameron 0 siblings, 1 reply; 6+ messages in thread From: Sudip Mukherjee @ 2016-03-07 11:06 UTC (permalink / raw) To: Markus Pargmann Cc: Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald, linux-kernel-u79uwXL29TY76Z2rM5mHXA, kernel-testers-u79uwXL29TY76Z2rM5mHXA, linux-iio-u79uwXL29TY76Z2rM5mHXA 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-4yDnlxn2s6sWdaTGBSpHTA@public.gmane.org> > > 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] iio: adc: imx25-gcq: fix do_div 2016-03-07 11:06 ` Sudip Mukherjee @ 2016-03-12 11:09 ` Jonathan Cameron 2016-03-16 8:39 ` Lee Jones 0 siblings, 1 reply; 6+ messages in thread From: Jonathan Cameron @ 2016-03-12 11:09 UTC (permalink / raw) To: Sudip Mukherjee, Markus Pargmann Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald, linux-kernel-u79uwXL29TY76Z2rM5mHXA, kernel-testers-u79uwXL29TY76Z2rM5mHXA, linux-iio-u79uwXL29TY76Z2rM5mHXA, Lee Jones 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-4yDnlxn2s6sWdaTGBSpHTA@public.gmane.org> >>> 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 > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] iio: adc: imx25-gcq: fix do_div 2016-03-12 11:09 ` Jonathan Cameron @ 2016-03-16 8:39 ` Lee Jones 0 siblings, 0 replies; 6+ messages in thread From: Lee Jones @ 2016-03-16 8:39 UTC (permalink / raw) To: Jonathan Cameron Cc: Sudip Mukherjee, Markus Pargmann, Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald, linux-kernel, kernel-testers, linux-iio 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-03-16 8:39 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-03-03 12:51 [PATCH] iio: adc: imx25-gcq: fix do_div Sudip Mukherjee [not found] ` <1457009513-7069-1-git-send-email-sudipm.mukherjee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2016-03-05 18:43 ` Jonathan Cameron [not found] ` <56DB28BF.9070508-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> 2016-03-07 9:01 ` Markus Pargmann 2016-03-07 11:06 ` Sudip Mukherjee 2016-03-12 11:09 ` Jonathan Cameron 2016-03-16 8:39 ` Lee Jones
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).