Commit ed325ac3 authored by Wolfram Sang's avatar Wolfram Sang Committed by Liviu Dudau

drm/arm/komeda: don't use confusing 'timeout' variable name

There is a confusing pattern in the kernel to use a variable named 'timeout' to
store the result of wait_for_completion_timeout() causing patterns like:

	timeout = wait_for_completion_timeout(...)
	if (!timeout) return -ETIMEDOUT;

with all kinds of permutations. Check the return value directly to drop
'timeout'  which also fixes its wrong type.
Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240507090200.7936-2-wsa+renesas@sang-engineering.com
[changed commit title to match driver name]
Signed-off-by: default avatarLiviu Dudau <liviu.dudau@arm.com>
Acked-by: default avatarLiviu Dudau <liviu.dudau@arm.com>
parent 6597efcf
...@@ -294,7 +294,6 @@ komeda_crtc_flush_and_wait_for_flip_done(struct komeda_crtc *kcrtc, ...@@ -294,7 +294,6 @@ komeda_crtc_flush_and_wait_for_flip_done(struct komeda_crtc *kcrtc,
struct komeda_dev *mdev = kcrtc->master->mdev; struct komeda_dev *mdev = kcrtc->master->mdev;
struct completion *flip_done; struct completion *flip_done;
struct completion temp; struct completion temp;
int timeout;
/* if caller doesn't send a flip_done, use a private flip_done */ /* if caller doesn't send a flip_done, use a private flip_done */
if (input_flip_done) { if (input_flip_done) {
...@@ -308,8 +307,7 @@ komeda_crtc_flush_and_wait_for_flip_done(struct komeda_crtc *kcrtc, ...@@ -308,8 +307,7 @@ komeda_crtc_flush_and_wait_for_flip_done(struct komeda_crtc *kcrtc,
mdev->funcs->flush(mdev, kcrtc->master->id, 0); mdev->funcs->flush(mdev, kcrtc->master->id, 0);
/* wait the flip take affect.*/ /* wait the flip take affect.*/
timeout = wait_for_completion_timeout(flip_done, HZ); if (wait_for_completion_timeout(flip_done, HZ) == 0) {
if (timeout == 0) {
DRM_ERROR("wait pipe%d flip done timeout\n", kcrtc->master->id); DRM_ERROR("wait pipe%d flip done timeout\n", kcrtc->master->id);
if (!input_flip_done) { if (!input_flip_done) {
unsigned long flags; unsigned long flags;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment