From patchwork Tue Jul 25 21:47:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kees Cook X-Patchwork-Id: 9864081 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 D566D60380 for ; Wed, 26 Jul 2017 00:56:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CEEA12871A for ; Wed, 26 Jul 2017 00:56:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C3C8028721; Wed, 26 Jul 2017 00:56:59 +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.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID 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 5935E2871A for ; Wed, 26 Jul 2017 00:56:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E69416E5BA; Wed, 26 Jul 2017 00:56:54 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pg0-x229.google.com (mail-pg0-x229.google.com [IPv6:2607:f8b0:400e:c05::229]) by gabe.freedesktop.org (Postfix) with ESMTPS id B4FD06E3DB for ; Tue, 25 Jul 2017 21:47:58 +0000 (UTC) Received: by mail-pg0-x229.google.com with SMTP id y129so75296490pgy.4 for ; Tue, 25 Jul 2017 14:47:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=4GhnByYpeZBOKY+qxcrXUphQlfBZTvYDSt76xblLJcE=; b=iVqLaRrCAHaD30u+bbDlusQYMGbioP3ZmAIPvm/qCXoVdOcfStap63WY0ViNMyuXpg Y+5X4HCWtm3kfbwcvt9J5tgEOTB5NWl8VCbnYY4qKRmMqGU4KOntAscWi428Luq3cWUP 98LPEtE0GASMTP5DM2/WxARRh4gc0RMa+RNNU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=4GhnByYpeZBOKY+qxcrXUphQlfBZTvYDSt76xblLJcE=; b=W145DQt4Os8XGylJaZuNw50lMyZiyr80iv51Yqop9GqZsY9BTKRZpAUAKAcr+rZET9 BK1yWCZto+QMZxSYndQXS4j9LA9BLPum2ptjZrsqoYQro3txBHf3aS+KUlh0tS1u7wUl 3RPIxEIJGMPYan47Q6bXrpCQdLhugMZb//tXar442Je4uoFYl51A4+dPu1swJNIhkThJ 34fEMOubqUE+2Ui/y1ML57JQ9j4QYIW8SrBb79qJRdEpdtlbxkff+Jj5cAQ9/A0xpH1z qNuueCqddKrcnYsUnMvFvC6HFSOuXP2cP57bp1SyuIH98Q3DiAfWHblh1J+997GvNP4/ bwrQ== X-Gm-Message-State: AIVw111H98kE92EX9dnG1D11ztR+Vwmm/Vsl9lz5dBegUhCDahy0Trf/ 8TKb9/GCVfKYQ03v X-Received: by 10.99.178.72 with SMTP id t8mr20924754pgo.34.1501019278316; Tue, 25 Jul 2017 14:47:58 -0700 (PDT) Received: from www.outflux.net (173-164-112-133-Oregon.hfc.comcastbusiness.net. [173.164.112.133]) by smtp.gmail.com with ESMTPSA id l15sm28736573pfj.157.2017.07.25.14.47.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Jul 2017 14:47:57 -0700 (PDT) Date: Tue, 25 Jul 2017 14:47:56 -0700 From: Kees Cook To: linux-kernel@vger.kernel.org Subject: [PATCH] drm/amd/powerplay: rv: Use designated initializers Message-ID: <20170725214756.GA102262@beast> MIME-Version: 1.0 Content-Disposition: inline X-Mailman-Approved-At: Wed, 26 Jul 2017 00:56:51 +0000 Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Alex Deucher , Rex Zhu , Christian =?iso-8859-1?Q?K=F6nig?= , Hawking Zhang 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 As done for vega10 in commit 3ddd396f6b57 ("drm/amd/powerplay: Use designated initializers") mark other tableFunction entries with designated initializers. The randstruct plugin requires designated initializers for structures that are entirely function pointers. Cc: Rex Zhu Cc: Hawking Zhang Cc: Alex Deucher Signed-off-by: Kees Cook Acked-by: Alex Deucher --- If I can get an Ack for this, I'll carry it in the gcc-plugins tree, unless you think this is worth landing for v4.13, in which case, please take it now. :) Thanks! --- drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c index 4c7f430b36eb..8e6cfd89c7e0 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c @@ -308,8 +308,8 @@ static int rv_tf_set_num_active_display(struct pp_hwmgr *hwmgr, void *input, } static const struct phm_master_table_item rv_set_power_state_list[] = { - { NULL, rv_tf_set_clock_limit }, - { NULL, rv_tf_set_num_active_display }, + { .tableFunction = rv_tf_set_clock_limit }, + { .tableFunction = rv_tf_set_num_active_display }, { } }; @@ -382,7 +382,7 @@ static int rv_tf_disable_gfx_off(struct pp_hwmgr *hwmgr, } static const struct phm_master_table_item rv_disable_dpm_list[] = { - {NULL, rv_tf_disable_gfx_off}, + { .tableFunction = rv_tf_disable_gfx_off }, { }, }; @@ -407,7 +407,7 @@ static int rv_tf_enable_gfx_off(struct pp_hwmgr *hwmgr, } static const struct phm_master_table_item rv_enable_dpm_list[] = { - {NULL, rv_tf_enable_gfx_off}, + { .tableFunction = rv_tf_enable_gfx_off }, { }, };