From: SF Markus Elfring <elfring@users.sourceforge.net>
To: dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org,
Ben Skeggs <bskeggs@redhat.com>, David Airlie <airlied@linux.ie>,
Martin Peres <martin.peres@free.fr>,
Roy Spliet <rspliet@eclipso.eu>
Cc: LKML <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org, trivial@kernel.org,
Julia Lawall <julia.lawall@lip6.fr>
Subject: [PATCH 3/5] GPU-DRM-nouveau: Delete unnecessary braces
Date: Wed, 21 Sep 2016 09:26:48 +0200 [thread overview]
Message-ID: <74cc2e34-cb5f-e3c9-e6cd-aa24ed3529e3@users.sourceforge.net> (raw)
In-Reply-To: <5bcff2ec-f3bd-ab9c-e13d-3a4f5cf7c73b@users.sourceforge.net>
From: Markus Elfring <elfring@users.sourceforge.net>
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 <elfring@users.sourceforge.net>
---
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];
}
- }
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);
}
- }
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);
--
2.10.0
next prev parent reply other threads:[~2016-09-21 7:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-21 7:23 [PATCH 0/5] GPU-DRM-nouveau: Fine-tuning for five function implementations SF Markus Elfring
2016-09-21 7:24 ` [PATCH 1/5] GPU-DRM-nouveau: Use kmalloc_array() in nvbios_iccsense_parse() SF Markus Elfring
2016-09-21 7:25 ` [PATCH 2/5] GPU-DRM-nouveau: Use kmalloc_array() in gt215_link_train() SF Markus Elfring
2016-09-21 7:26 ` SF Markus Elfring [this message]
2016-09-21 8:47 ` [PATCH 3/5] GPU-DRM-nouveau: Delete unnecessary braces Dan Carpenter
2016-09-21 13:20 ` SF Markus Elfring
2016-09-21 7:28 ` [PATCH 4/5] GPU-DRM-nouveau: Adjust a kzalloc() call in gt215_ram_new() SF Markus Elfring
2016-09-21 7:29 ` [PATCH 5/5] GPU-DRM-nouveau: Add space after an "if" SF Markus Elfring
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=74cc2e34-cb5f-e3c9-e6cd-aa24ed3529e3@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=airlied@linux.ie \
--cc=bskeggs@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=julia.lawall@lip6.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.peres@free.fr \
--cc=nouveau@lists.freedesktop.org \
--cc=rspliet@eclipso.eu \
--cc=trivial@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).