From patchwork Sat Jul 16 15:08:03 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: 9233293 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 475CB6075E for ; Sat, 16 Jul 2016 15:08:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3795920855 for ; Sat, 16 Jul 2016 15:08:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2BCFF2223E; Sat, 16 Jul 2016 15:08:17 +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]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D904E20855 for ; Sat, 16 Jul 2016 15:08:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CD57C6E2CF; Sat, 16 Jul 2016 15:08:13 +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 [217.72.192.78]) by gabe.freedesktop.org (Postfix) with ESMTPS id 66F066E2CF for ; Sat, 16 Jul 2016 15:08:11 +0000 (UTC) Received: from [192.168.1.2] ([77.182.189.163]) by smtp.web.de (mrweb101) with ESMTPSA (Nemesis) id 0LshKH-1bDo2n0RhJ-012KnT; Sat, 16 Jul 2016 17:08:04 +0200 Subject: [PATCH 7/8] drm/amd/powerplay: Change assignment for a buffer variable in phm_dispatch_table() To: dri-devel@lists.freedesktop.org, David Airlie , =?UTF-8?Q?Christian_K=c3=b6nig?= , Alex Deucher References: <5307CAA2.8060406@users.sourceforge.net> <530A086E.8010901@users.sourceforge.net> <530A72AA.3000601@users.sourceforge.net> <530B5FB6.6010207@users.sourceforge.net> <530C5E18.1020800@users.sourceforge.net> <530CD2C4.4050903@users.sourceforge.net> <530CF8FF.8080600@users.sourceforge.net> <530DD06F.4090703@users.sourceforge.net> <5317A59D.4@users.sourceforge.net> <558FB427.80103@users.sourceforge.net> From: SF Markus Elfring Message-ID: <477a5e29-19aa-6eea-fd33-c5e5cb790966@users.sourceforge.net> Date: Sat, 16 Jul 2016 17:08:03 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2 MIME-Version: 1.0 In-Reply-To: X-Provags-ID: V03:K0:DQ8p2aQdVaX/VT71G/Ihq3AafThrw7qIwg/lvZnevprZKDI9hYc be1wPGsECm8/UlLt75G44UFh8nChpeu53dSKDDc+qagBknqYbmvG2afWT2vTTW/CUoJS+8H XovNz1j7GVh/ZFWtJXK1p9rkeSiaZaBNa8+fkptQi49KpWx223gYjqbB0V381egWW3esjPj C+vgT8YCt/ZBe9ZGNI8cQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:IQQdOLwyj0s=:C8/1q8reGQyNk0Xy6XjJeX d0q7xQH16BtmVYU0w1/1pfb6KMnm7FeqajZOSsTgjRMykEWqfI9U+KXz7i2AWRFzvh9ungtMa LPiMDnb+pXfhewwFtKdxPxWkdY9vsG2EfEmkukspFvSerVj0StqTs9IFrskt/IytFJMqbg1j0 dZbLcBzAMEBg/UC7VE5xCjlsctLnz2H85oKsSf6a9eLF2N+FJzcXABBsXbL6y3NcMc6nJj1ui A6cLgnXEfarsFF+f8Z4jj5mTRbURv6sanUk9D618iEse0O9KAdsgHle1SI/0mrS1e1pB1Vvl9 xecBiHrCDDE1pIcfPWFEd/Y/bL0jTGay8xytixbPc7F7vcqHl3s8uc9/LjH5BR8LZQgPz8arZ ABmOcUfg5ysFDDasi8IAoufKI9udn4ng4+LvWhIUcxdhS3FsDJ5Z3wzuUV4no5UkCsaLi7gUa /AvyFv4O/O43zDLIvYTyfpdEsyQ5Jca3YbmV76E2ImhIj6/qGJoqDu502n8wCZgH4uNyAEkuF uIuY81bfjI2xMvTq8Ntsmgpr7zNxIoe8a2kFvQ4X14Psm5ojEzlZf8iS9TfFCCrr5nTeprykv nAHSScaFL2uNMrcHXf00u5/8kuWpdNtLlP2Mf51OVUP+fUtLP8K+8qyPU/y5to9FNnvCW3JBo zyZNYZUJuQJOqzB8h3Q10qHtkyv70MLy9PrrmUrapaPh/onLl6X1sSvDNVYhfMMB+wZ4LX2Kl 9jFclWU/NoQkfsxqoiFfmfcuPSp+hSZWvunE7OhWoXOu6qOwxZoOn9SuMITuojzGgWWlyfygL X4ANnmc Cc: Julia Lawall , kernel-janitors@vger.kernel.org, LKML 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: Sat, 16 Jul 2016 15:36:36 +0200 The variable "temp_storage" was eventually reassigned with a pointer. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring --- drivers/gpu/drm/amd/powerplay/hwmgr/functiontables.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/functiontables.c b/drivers/gpu/drm/amd/powerplay/hwmgr/functiontables.c index 024e22e..735aeb0 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/functiontables.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/functiontables.c @@ -60,7 +60,7 @@ int phm_dispatch_table(struct pp_hwmgr *hwmgr, void *input, void *output) { int result = 0; - void *temp_storage = NULL; + void *temp_storage; if (hwmgr == NULL || rt_table == NULL) { printk(KERN_ERR "[ powerplay ] Invalid Parameter!\n"); @@ -73,7 +73,8 @@ int phm_dispatch_table(struct pp_hwmgr *hwmgr, printk(KERN_ERR "[ powerplay ] Could not allocate table temporary storage\n"); return -ENOMEM; } - } + } else + temp_storage = NULL; result = phm_run_table(hwmgr, rt_table, input, output, temp_storage); kfree(temp_storage);