<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font size="-1">Comments in-line</font>. <font size="-1">Thanks.<br>
<br>
Roy</font><br>
<br>
<div class="moz-cite-prefix">Op 21-09-16 om 08:26 schreef SF Markus
Elfring:<br>
</div>
<blockquote
cite="mid:74cc2e34-cb5f-e3c9-e6cd-aa24ed3529e3@users.sourceforge.net"
type="cite">
<pre wrap="">From: Markus Elfring <a class="moz-txt-link-rfc2396E" href="mailto:elfring@users.sourceforge.net"><elfring@users.sourceforge.net></a>
Date: Wed, 21 Sep 2016 08:28:08 +0200
Do not use curly brackets at four source code places
where a single statement should be sufficient.
Signed-off-by: Markus Elfring <a class="moz-txt-link-rfc2396E" href="mailto:elfring@users.sourceforge.net"><elfring@users.sourceforge.net></a>
---
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c
index dbaf577..cb50539 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c
@@ -127,12 +127,11 @@ gt215_link_train_calc(u32 *vals, struct gt215_ltrain *train)
}
/* Find the best value for 0x1111e0 */
- for (i = 0; i < 4; i++) {
+ for (i = 0; i < 4; i++)
if (bins[i] > qty) {
bin = i + 3;
qty = bins[i];
}
- }</pre>
</blockquote>
<font size="-1">I'm not a fan of removing the braces around a
multi-line statement, despite being functionally correct. It
obscures the program structure on displays with a low effective
vertical resolution.</font><br>
<blockquote
cite="mid:74cc2e34-cb5f-e3c9-e6cd-aa24ed3529e3@users.sourceforge.net"
type="cite">
<pre wrap="">
train->r_100720 = 0;
for (i = 0; i < 8; i++) {
@@ -729,9 +728,8 @@ gt215_ram_calc(struct nvkm_ram *base, u32 freq)
ram_mask(fuc, 0x1007e0, 0x22222222, r100760);
}
- if (device->chipset == 0xa3 && freq > 500000) {
+ if (device->chipset == 0xa3 && freq > 500000)
ram_mask(fuc, 0x100700, 0x00000006, 0x00000000);
- }
/* Final switch */
if (mclk.pll) {
@@ -745,12 +743,11 @@ gt215_ram_calc(struct nvkm_ram *base, u32 freq)
ram_nsec(fuc, 2000);
/* Set RAM MR parameters and timings */
- for (i = 2; i >= 0; i--) {
+ for (i = 2; i >= 0; i--)
if (ram_rd32(fuc, mr[i]) != ram->base.mr[i]) {
ram_wr32(fuc, mr[i], ram->base.mr[i]);
ram_nsec(fuc, 1000);
}
- }</pre>
</blockquote>
<font size="-1">Idem.</font><br>
<blockquote
cite="mid:74cc2e34-cb5f-e3c9-e6cd-aa24ed3529e3@users.sourceforge.net"
type="cite">
<pre wrap="">
ram_wr32(fuc, 0x100220[3], timing[3]);
ram_wr32(fuc, 0x100220[1], timing[1]);
@@ -838,11 +835,10 @@ gt215_ram_calc(struct nvkm_ram *base, u32 freq)
if (!next->bios.ramcfg_DLLoff)
nvkm_sddr2_dll_reset(fuc);
- if (ram->base.type == NVKM_RAM_TYPE_GDDR3) {
+ if (ram->base.type == NVKM_RAM_TYPE_GDDR3)
ram_nsec(fuc, 31000);
- } else {
+ else
ram_nsec(fuc, 14000);
- }
if (ram->base.type == NVKM_RAM_TYPE_DDR3) {
ram_wr32(fuc, 0x100264, 0x1);
</pre>
</blockquote>
<br>
</body>
</html>