Re: possible odd acceleration scaling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ritesh,


On Wed, 2016-09-14 at 21:30 +0530, Ritesh Raj Sarraf wrote:
> Hello Bastien,
> 
> On Wed, 2016-09-14 at 17:44 +0200, Bastien Nocera wrote:
> > 
> > 
> > My guess:
> > -       return (int) (info_1->index - info_2->index);
> > +       return ((int) info_1->index - (int) info_2->index);
> > 
Can you try attached patch for both 4.7 and 4.8 kernel?

Thanks,
Srinivas

> > Ritesh, could you try to change those lines in
> > compare_channel_index()
> > in src/iio-buffer-utils.c and capture another log if it fails?
> 
> That did not seem to change anything. I've put up the log at:
> https://people.debian.org/~rrs/tmp/iio-int.txt
> 
>  
From 553fb5ace1b131c7c0f146a772168879d6f8c704 Mon Sep 17 00:00:00 2001
From: Srinivas Pandruvada <srinivas.pandruvada@xxxxxxxxxxxxxxx>
Date: Fri, 16 Sep 2016 10:31:00 -0700
Subject: [PATCH] Fix sorting

Need to derefernce parameters passed to compare callback.
---
 src/iio-buffer-utils.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/iio-buffer-utils.c b/src/iio-buffer-utils.c
index 440a8b7..0b24bac 100644
--- a/src/iio-buffer-utils.c
+++ b/src/iio-buffer-utils.c
@@ -200,8 +200,8 @@ channel_info_free (iio_channel_info *ci)
 static int
 compare_channel_index (gconstpointer a, gconstpointer b)
 {
-	const iio_channel_info *info_1 = a;
-	const iio_channel_info *info_2 = b;
+	const iio_channel_info *info_1 = *(iio_channel_info **) a;
+	const iio_channel_info *info_2 = *(iio_channel_info **) b;
 
 	return (int) (info_1->index - info_2->index);
 }
-- 
2.7.4


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux