Skip to contentSkip to conversation

Patch "iio: fix config watermark initial value" has been added to the 4.5-stable tree

PATCH [email protected] 1 participant 1 message Apr 17, 2016

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

iio: fix config watermark initial value

to the 4.5-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
iio-fix-config-watermark-initial-value.patch
and it can be found in the queue-4.5 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 1bef2c1d4e4fd92bdf8219b13ba97ba861618254 Mon Sep 17 00:00:00 2001

From: Irina Tirdea <[email protected]>
Date: Thu, 24 Mar 2016 11:09:45 +0200
Subject: iio: fix config watermark initial value

From: Irina Tirdea <[email protected]>

commit 1bef2c1d4e4fd92bdf8219b13ba97ba861618254 upstream.

config structure is set to 0 when updating the buffers, so by default config->watermark will be 0. When computing the minimum between config->watermark and the buffer->watermark or insert_buffer-watermark, this will always be 0 regardless of the value set by the user for the buffer.

Set as initial value for config->watermark the maximum allowed value so that the minimum value will always be set from one of the buffers.

Fixes f0566c0c405d ("iio: Set device watermark based on watermark of all

attached buffers")

---
 drivers/iio/industrialio-buffer.c |    1 +
 1 file changed, 1 insertion(+)
drivers/iio/industrialio-buffer.c +1 -0
@@ -645,6 +645,7 @@ static int iio_verify_update(struct iio_
 	unsigned int modes;
 
 	memset(config, 0, sizeof(*config));
+	config->watermark = ~0;
 
 	/*
 	 * If there is just one buffer and we are removing it there is nothing

Patches currently in stable-queue which might be from [email protected] are

queue-4.5/iio-gyro-bmg160-fix-buffer-read-values.patch queue-4.5/iio-gyro-bmg160-fix-endianness-when-reading-axes.patch queue-4.5/iio-fix-config-watermark-initial-value.patch queue-4.5/iio-accel-bmc150-fix-endianness-when-reading-axes.patch