* Re: [iio:testing 10/10] ERROR: "__divdi3" [drivers/iio/accel/bmc150-accel.ko] undefined! [not found] <201503282121.NkeMOw9e%fengguang.wu@intel.com> @ 2015-03-28 14:18 ` Jonathan Cameron 2015-03-29 0:15 ` Octavian Purdila 0 siblings, 1 reply; 3+ messages in thread From: Jonathan Cameron @ 2015-03-28 14:18 UTC (permalink / raw) To: kbuild test robot, Octavian Purdila Cc: kbuild-all, Jonathan Cameron, linux-iio@vger.kernel.org On 28/03/15 13:02, kbuild test robot wrote: > tree: git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git testing > head: 5e02849a682600c1663a333f95f0388d1c536108 > commit: 5e02849a682600c1663a333f95f0388d1c536108 [10/10] iio: bmc150_accel: add support for hardware fifo > config: m68k-allmodconfig (attached as .config) > reproduce: > wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > git checkout 5e02849a682600c1663a333f95f0388d1c536108 > # save the attached .config to linux build tree > make.cross ARCH=m68k > > All error/warnings: > >>> ERROR: "__divdi3" [drivers/iio/accel/bmc150-accel.ko] undefined! Oops, missed that. I think we can use a simple do_div for computing the sample_period (which included 64bit / 8 bit). Will push out a patch to the testing branch to see if they autobuilders are happy with it then fix up the driver properly if they are. diff --git a/drivers/iio/accel/bmc150-accel.c b/drivers/iio/accel/bmc150-accel.c index c639489671bb..d5e103b208ba 100644 --- a/drivers/iio/accel/bmc150-accel.c +++ b/drivers/iio/accel/bmc150-accel.c @@ -1002,7 +1002,8 @@ static int __bmc150_accel_fifo_flush(struct iio_dev *indio_dev, * To avoid this issue we compute the actual sample period ourselves * based on the timestamp delta between the last two flush operations. */ - sample_period = (data->timestamp - data->old_timestamp) / count; + sample_period = (data->timestamp - data->old_timestamp); + do_div(sample_period, count); tstamp = data->timestamp - (count - 1) * sample_period; if (samples && count > samples) > > --- > 0-DAY kernel test infrastructure Open Source Technology Center > http://lists.01.org/mailman/listinfo/kbuild Intel Corporation > ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [iio:testing 10/10] ERROR: "__divdi3" [drivers/iio/accel/bmc150-accel.ko] undefined! 2015-03-28 14:18 ` [iio:testing 10/10] ERROR: "__divdi3" [drivers/iio/accel/bmc150-accel.ko] undefined! Jonathan Cameron @ 2015-03-29 0:15 ` Octavian Purdila 2015-03-29 10:59 ` Jonathan Cameron 0 siblings, 1 reply; 3+ messages in thread From: Octavian Purdila @ 2015-03-29 0:15 UTC (permalink / raw) To: Jonathan Cameron Cc: Fengguang Wu, linux-iio@vger.kernel.org, Jonathan Cameron, kbuild-all On 28 Mar 2015 16:18, "Jonathan Cameron" <jic23@jic23.retrosnub.co.uk> wrote: > > On 28/03/15 13:02, kbuild test robot wrote: > > tree: git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git testing > > head: 5e02849a682600c1663a333f95f0388d1c536108 > > commit: 5e02849a682600c1663a333f95f0388d1c536108 [10/10] iio: bmc150_accel: add support for hardware fifo > > config: m68k-allmodconfig (attached as .config) > > reproduce: > > wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross > > chmod +x ~/bin/make.cross > > git checkout 5e02849a682600c1663a333f95f0388d1c536108 > > # save the attached .config to linux build tree > > make.cross ARCH=m68k > > > > All error/warnings: > > > >>> ERROR: "__divdi3" [drivers/iio/accel/bmc150-accel.ko] undefined! > Oops, missed that. I think we can use a simple do_div for computing the sample_period > (which included 64bit / 8 bit). > > Will push out a patch to the testing branch to see if they autobuilders are > happy with it then fix up the driver properly if they are. > > diff --git a/drivers/iio/accel/bmc150-accel.c b/drivers/iio/accel/bmc150-accel.c > index c639489671bb..d5e103b208ba 100644 > --- a/drivers/iio/accel/bmc150-accel.c > +++ b/drivers/iio/accel/bmc150-accel.c > @@ -1002,7 +1002,8 @@ static int __bmc150_accel_fifo_flush(struct iio_dev *indio_dev, > * To avoid this issue we compute the actual sample period ourselves > * based on the timestamp delta between the last two flush operations. > */ > - sample_period = (data->timestamp - data->old_timestamp) / count; > + sample_period = (data->timestamp - data->old_timestamp); > + do_div(sample_period, count); > tstamp = data->timestamp - (count - 1) * sample_period; > > if (samples && count > samples) > Oops, sorry about this Jonathan and thank you for fixing it so quickly. One more thing, I marked the new sysfs entries for 4.2, but it seems that these might make it in 4.1. Should I send a patch to correct this? ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [iio:testing 10/10] ERROR: "__divdi3" [drivers/iio/accel/bmc150-accel.ko] undefined! 2015-03-29 0:15 ` Octavian Purdila @ 2015-03-29 10:59 ` Jonathan Cameron 0 siblings, 0 replies; 3+ messages in thread From: Jonathan Cameron @ 2015-03-29 10:59 UTC (permalink / raw) To: Octavian Purdila, Jonathan Cameron Cc: Fengguang Wu, linux-iio@vger.kernel.org, kbuild-all On 29/03/15 00:15, Octavian Purdila wrote: > On 28 Mar 2015 16:18, "Jonathan Cameron" <jic23@jic23.retrosnub.co.uk> wrote: >> >> On 28/03/15 13:02, kbuild test robot wrote: >>> tree: git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git testing >>> head: 5e02849a682600c1663a333f95f0388d1c536108 >>> commit: 5e02849a682600c1663a333f95f0388d1c536108 [10/10] iio: bmc150_accel: add support for hardware fifo >>> config: m68k-allmodconfig (attached as .config) >>> reproduce: >>> wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross >>> chmod +x ~/bin/make.cross >>> git checkout 5e02849a682600c1663a333f95f0388d1c536108 >>> # save the attached .config to linux build tree >>> make.cross ARCH=m68k >>> >>> All error/warnings: >>> >>>>> ERROR: "__divdi3" [drivers/iio/accel/bmc150-accel.ko] undefined! >> Oops, missed that. I think we can use a simple do_div for computing the sample_period >> (which included 64bit / 8 bit). >> >> Will push out a patch to the testing branch to see if they autobuilders are >> happy with it then fix up the driver properly if they are. >> >> diff --git a/drivers/iio/accel/bmc150-accel.c b/drivers/iio/accel/bmc150-accel.c >> index c639489671bb..d5e103b208ba 100644 >> --- a/drivers/iio/accel/bmc150-accel.c >> +++ b/drivers/iio/accel/bmc150-accel.c >> @@ -1002,7 +1002,8 @@ static int __bmc150_accel_fifo_flush(struct iio_dev *indio_dev, >> * To avoid this issue we compute the actual sample period ourselves >> * based on the timestamp delta between the last two flush operations. >> */ >> - sample_period = (data->timestamp - data->old_timestamp) / count; >> + sample_period = (data->timestamp - data->old_timestamp); >> + do_div(sample_period, count); >> tstamp = data->timestamp - (count - 1) * sample_period; >> >> if (samples && count > samples) >> > > Oops, sorry about this Jonathan and thank you for fixing it so quickly. Except I just changed it from a build fail to a warning. I think for do_div it needs to be uint64 so just pushed that build test out. All warnings: drivers/iio/accel/bmc150-accel.c: In function '__bmc150_accel_fifo_flush': >> drivers/iio/accel/bmc150-accel.c:1006:2: warning: comparison of distinct pointer types lacks a cast [enabled by default] vim +1006 drivers/iio/accel/bmc150-accel.c > > One more thing, I marked the new sysfs entries for 4.2, but it seems > that these might make it in 4.1. Should I send a patch to correct > this? > ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-03-29 11:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <201503282121.NkeMOw9e%fengguang.wu@intel.com>
2015-03-28 14:18 ` [iio:testing 10/10] ERROR: "__divdi3" [drivers/iio/accel/bmc150-accel.ko] undefined! Jonathan Cameron
2015-03-29 0:15 ` Octavian Purdila
2015-03-29 10:59 ` Jonathan Cameron
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).