From patchwork Wed Sep 21 07:26:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9342971 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 54CD86077A for ; Wed, 21 Sep 2016 07:27:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4060629F7B for ; Wed, 21 Sep 2016 07:27:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 350952A159; Wed, 21 Sep 2016 07:27:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 212DA29F7B for ; Wed, 21 Sep 2016 07:27:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BBD076E7BA; Wed, 21 Sep 2016 07:27:03 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.web.de (mout.web.de [212.227.15.4]) by gabe.freedesktop.org (Postfix) with ESMTPS id 517966E7B3 for ; Wed, 21 Sep 2016 07:27:00 +0000 (UTC) Received: from [192.168.1.2] ([77.182.212.253]) by smtp.web.de (mrweb002) with ESMTPSA (Nemesis) id 0M0yvn-1az37012aN-00v4w6; Wed, 21 Sep 2016 09:26:49 +0200 Subject: [PATCH 3/5] GPU-DRM-nouveau: Delete unnecessary braces To: dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, Ben Skeggs , David Airlie , Martin Peres , Roy Spliet References: <5bcff2ec-f3bd-ab9c-e13d-3a4f5cf7c73b@users.sourceforge.net> From: SF Markus Elfring Message-ID: <74cc2e34-cb5f-e3c9-e6cd-aa24ed3529e3@users.sourceforge.net> Date: Wed, 21 Sep 2016 09:26:48 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <5bcff2ec-f3bd-ab9c-e13d-3a4f5cf7c73b@users.sourceforge.net> X-Provags-ID: V03:K0:Kcqm4igK4dQXczfePXfdlZh4og5gihzkNP48h3L0GgqCCMi39mZ ZJcx1ifxY0Z148N7fPhDeGGjMtX1iXfT6rARTpTfucWbQkxj9dH0WBQEpQ+kBk0/MHY6SPT rTLL3w4TkBY9TSQ3+T5F9VwRU3QYWv4iLqDLjT9p6av1KIkBPE6fY7pLu67tJiNYzU6DVbv D0HboMd+qfaPRVni58V6g== X-UI-Out-Filterresults: notjunk:1; V01:K0:2Qb+uA2MDao=:65MiPOxAhWmbEf9zdnoZ9B yvAdM5tBw/+3V9eZDqKXaHODaawgx4QHY7MMkTuICs4e/0loVkrkINvLvlfjdHjlfDKDlQNk8 rdY13kQD3dd4uIXIq4IFcRextCmScS/AkRlOBzkmDbVdBQMtVZYhYUpUeNLHvHGPywEIC3dpz 2kc5kTZ6ds4ucYYlClKrwPzx9LWkGCxzw2BoXTk7g1ED2Mi+fUpPZyLIr2s0zVTAUtKYNytcU JKsHwrNpMPCWG5sjr8F4RF7BlR3OmY72s88klGnAPqSuQPsR2Lyk5Xawz8fb0RYf1jhYIoeMo kFrzhPdzUt3aOfVw6LSSl1zF3zNrGavd5GrbQ48M4qJRgOdE1WLoWgdvWLiMsDWDyRix11IcH mAaSs1VnkilAgLP9UoX1LDYtyDQnUx0cnEs0m/oKFTb2zbLx4T0xTgeSxvksUaSvoHxbZcoma mC2E9CUH2ZrGVKV6ccS7xuqrkjQ5GT5iKhZL9fwaWpzweOZp9BXW2WT01u4D50TmdtG7P8dV6 Vr1HjINNj3/qQGE1raghdYqSHw53WwUkRtVGOCzIHAIi/diTce19ws1rQUHL0ZVQD5BAenCiS qSueMsoPJRTDC5UqmqprAHosKZgOLjgKVx0gmqiZckO5WPkhJAJ8hMmtT8R1bMWUlK+7kjt7F niZrJHMLFbyDef70qoX/ulpQwMhVVQvfXlk2NDnWryVQ68jbnM1peRp9+xnzbRP0ssabGgFdL i/fOOFnfrkI445mHLE0aWJzk9MODAnwcaao8PICEr8zyzZTKxnXCglRhJ9WnDe5qry4o2BAKo QVcXqJe Cc: trivial@kernel.org, kernel-janitors@vger.kernel.org, LKML , Julia Lawall X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring 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 --- 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);