[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1454690128-21994-11-git-send-email-alexander.shishkin@linux.intel.com>
Date: Fri, 5 Feb 2016 18:35:19 +0200
From: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
To: Greg KH <greg@...ah.com>
Cc: Mathieu Poirier <mathieu.poirier@...aro.org>,
Chunyan Zhang <zhang.chunyan@...aro.org>,
laurent.fert@...el.com, yann.fouassier@...el.com,
linux-kernel@...r.kernel.org, Lucas Tanure <tanure@...ux.com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Subject: [QUEUED v0 10/19] stm class: Use a signed return type for stm_find_master_chan
From: Lucas Tanure <tanure@...ux.com>
The return type "unsigned int" was used by the stm_find_master_chan function
despite of the aspect that it will eventually return a negative error code.
Done with the help of Coccinelle.
Signed-off-by: Lucas Tanure <tanure@...ux.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
---
drivers/hwtracing/stm/core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/hwtracing/stm/core.c b/drivers/hwtracing/stm/core.c
index aef8ddb244..cdec240bd6 100644
--- a/drivers/hwtracing/stm/core.c
+++ b/drivers/hwtracing/stm/core.c
@@ -233,7 +233,7 @@ static int find_free_channels(unsigned long *bitmap, unsigned int start,
return -1;
}
-static unsigned int
+static int
stm_find_master_chan(struct stm_device *stm, unsigned int width,
unsigned int *mstart, unsigned int mend,
unsigned int *cstart, unsigned int cend)
@@ -293,7 +293,7 @@ static int stm_output_assign(struct stm_device *stm, unsigned int width,
goto unlock;
ret = stm_find_master_chan(stm, width, &midx, mend, &cidx, cend);
- if (ret)
+ if (ret < 0)
goto unlock;
output->master = midx;
--
2.7.0
Powered by blists - more mailing lists