From: Dan Carpenter <dan.carpenter@oracle.com>
To: David Airlie <airlied@linux.ie>, Ben Skeggs <bskeggs@redhat.com>
Cc: David Herrmann <dh.herrmann@gmail.com>,
Dave Airlie <airlied@redhat.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
dri-devel@lists.freedesktop.org, kernel-janitors@vger.kernel.org
Subject: [patch] drm/nouveau/disp: add a comment on confusing loop
Date: Wed, 13 Nov 2013 07:45:52 +0000 [thread overview]
Message-ID: <20131113074552.GE25541@elgon.mountain> (raw)
The "ret = -EIO" is deliberate. It's a very uncommon thing to do and it
upsets static checkers because they normally would expect "ret = -EIO".
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/gpu/drm/nouveau/core/engine/disp/dport.c b/drivers/gpu/drm/nouveau/core/engine/disp/dport.c
index 1bd4c63..2bc45ae 100644
--- a/drivers/gpu/drm/nouveau/core/engine/disp/dport.c
+++ b/drivers/gpu/drm/nouveau/core/engine/disp/dport.c
@@ -322,6 +322,7 @@ nouveau_dp_train(struct nouveau_disp *disp, const struct nouveau_dp_func *func,
while (*link_bw > (dp->dpcd[1] * 27000))
link_bw++;
+ /* set ret to -EIO on the last loop iteration */
while ((ret = -EIO) && link_bw[0]) {
/* find minimum required lane count at this link rate */
dp->link_nr = dp->dpcd[2] & DPCD_RC02_MAX_LANE_COUNT;
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: David Airlie <airlied@linux.ie>, Ben Skeggs <bskeggs@redhat.com>
Cc: David Herrmann <dh.herrmann@gmail.com>,
Dave Airlie <airlied@redhat.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
dri-devel@lists.freedesktop.org, kernel-janitors@vger.kernel.org
Subject: [patch] drm/nouveau/disp: add a comment on confusing loop
Date: Wed, 13 Nov 2013 10:45:52 +0300 [thread overview]
Message-ID: <20131113074552.GE25541@elgon.mountain> (raw)
The "ret = -EIO" is deliberate. It's a very uncommon thing to do and it
upsets static checkers because they normally would expect "ret == -EIO".
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/gpu/drm/nouveau/core/engine/disp/dport.c b/drivers/gpu/drm/nouveau/core/engine/disp/dport.c
index 1bd4c63..2bc45ae 100644
--- a/drivers/gpu/drm/nouveau/core/engine/disp/dport.c
+++ b/drivers/gpu/drm/nouveau/core/engine/disp/dport.c
@@ -322,6 +322,7 @@ nouveau_dp_train(struct nouveau_disp *disp, const struct nouveau_dp_func *func,
while (*link_bw > (dp->dpcd[1] * 27000))
link_bw++;
+ /* set ret to -EIO on the last loop iteration */
while ((ret = -EIO) && link_bw[0]) {
/* find minimum required lane count at this link rate */
dp->link_nr = dp->dpcd[2] & DPCD_RC02_MAX_LANE_COUNT;
next reply other threads:[~2013-11-13 7:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-13 7:45 Dan Carpenter [this message]
2013-11-13 7:45 ` [patch] drm/nouveau/disp: add a comment on confusing loop Dan Carpenter
2013-11-20 11:54 ` walter harms
2013-11-20 11:54 ` walter harms
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131113074552.GE25541@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=airlied@linux.ie \
--cc=airlied@redhat.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bskeggs@redhat.com \
--cc=dh.herrmann@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.