Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp575553ybz; Wed, 15 Apr 2020 14:21:43 -0700 (PDT) X-Google-Smtp-Source: APiQypKPdQEgUdn96snyDFhhx6bdBOi0u3Gz7dZhTMwX3FzW6zhgu1PySapVhCd41kRtai5M0NAE X-Received: by 2002:a17:906:3f88:: with SMTP id b8mr7086799ejj.301.1586985702917; Wed, 15 Apr 2020 14:21:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586985702; cv=none; d=google.com; s=arc-20160816; b=nhlRYWG95tvNIPXvYaY+8imoUmP3uwXi8IthrZhwnUe5b450A4F7IRSH9AXOFYUtc+ fICCzMlIAislHJXj7IQw3Oc6X8zx3ztGRHWz1oReDyxdueWGIFTJ3HNtLy8kEMOhvvVT yFYX4TWGpsFpyKwJ3FsZa9I37pYFh3x6X+BPURefqEXeC7w+iH//S2/pcAvTnZIZZ80J dbRnTkiIoG99jmYC//I3JJWBubGto17LN94Pj8XcEO+bQlcy5i6eTKhQMkZy1+dNurcl pPG6My1KFKF64cQ1A7DkMlJ1A6GXAH0ZGAvwO3AGVuppanebeY19gUad3Ocg1ee00P6j aJNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :organization:in-reply-to:subject:cc:to:from:ironport-sdr :ironport-sdr; bh=hNMY6beZhtLy0vAVPutwZwfBjOHB5gEzCsysPZn+LxQ=; b=Z3e6IVVM6OkwycXV3ahtCoy+WtpfSS0euMcTm1PuJvoAWSumEEZ/tXNE8du2J+774B 5asiTeCJ0QtjKko3ONA5BH1ctPLcfNiYXW4l5O7WI0wAOvRvIdpqXNTiB/8BD5XXflnF 2xu39IS0cigE9c5p5iNlIhqeT7WAdHeY/XLtNtk+EuvJ6vilbsh8mymufVbpayM848VW Rbzzi5GuYLlMyXlA2ppsDo3KtlY/HzoMT5LeOpobxl/IKepfFCHfib2zj3X1nbX10GM4 LmbkB2qCLVsJ2NFxHvWyY80DYHe/p3NJM/h/LIjx9pw4I6vcDkg9FdMZOeNTIzlvv5e9 1ZnA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f1si11251140ejl.164.2020.04.15.14.21.18; Wed, 15 Apr 2020 14:21:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2438960AbgDNLI6 (ORCPT + 99 others); Tue, 14 Apr 2020 07:08:58 -0400 Received: from mga18.intel.com ([134.134.136.126]:24384 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2438931AbgDNLIz (ORCPT ); Tue, 14 Apr 2020 07:08:55 -0400 IronPort-SDR: u6kdNmN5TsRggkMkk5mTZVz+NJX9HfZcMeoz9KWu6SCGjvq/c4WiU2hSTl4D7jsx3w5dEDPW17 34yKdSA62AEQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Apr 2020 04:08:53 -0700 IronPort-SDR: L9wwlBfNleH1/PNFWLrfG8Jz/cNseahXJi07CLOpQvdthm6csrngaZnL+xYYyhWKxND8O6vUIl /JKfUAQ1HUJQ== X-IronPort-AV: E=Sophos;i="5.72,382,1580803200"; d="scan'208";a="427025903" Received: from mdoerbec-mobl.ger.corp.intel.com (HELO localhost) ([10.252.38.76]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Apr 2020 04:08:51 -0700 From: Jani Nikula To: Alex Deucher , Tang Bin Cc: Dave Airlie , LKML , Maling list - DRI developers , Shengju Zhang Subject: Re: [PATCH] drm/dp_mst: Fix drm_dp_mst_topology.c selftest compilation warning In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20200411141740.14584-1-tangbin@cmss.chinamobile.com> Date: Tue, 14 Apr 2020 14:08:48 +0300 Message-ID: <87imi2miin.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 13 Apr 2020, Alex Deucher wrote: > On Mon, Apr 13, 2020 at 5:29 AM Tang Bin wrote: >> >> The struct drm_dp_desc contains struct drm_dp_dpcd_ident, and the struct >> drm_dp_dpcd_ident contains the array, so zero-initialization requires a >> more couple of braces. In the ARM compiler environment, the compile >> warning pointing it out: >> drivers/gpu/drm/drm_dp_mst_topology.c: In function 'drm_dp_mst_dsc_aux_for_port': >> drivers/gpu/drm/drm_dp_mst_topology.c:5494:9: warning: missing braces around initializer [-Wmissing-braces] >> struct drm_dp_desc desc = { 0 }; >> > > This seems to vary based on compilers. Maybe a memset would be better. = {}; will do the trick. BR, Jani. > > Alex > >> Signed-off-by: Tang Bin >> Signed-off-by: Shengju Zhang >> --- >> drivers/gpu/drm/drm_dp_mst_topology.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c >> index 70c4b7a..4d8d1fd 100644 >> --- a/drivers/gpu/drm/drm_dp_mst_topology.c >> +++ b/drivers/gpu/drm/drm_dp_mst_topology.c >> @@ -5494,7 +5494,7 @@ struct drm_dp_aux *drm_dp_mst_dsc_aux_for_port(struct drm_dp_mst_port *port) >> { >> struct drm_dp_mst_port *immediate_upstream_port; >> struct drm_dp_mst_port *fec_port; >> - struct drm_dp_desc desc = { 0 }; >> + struct drm_dp_desc desc = { { { 0 } } }; >> u8 endpoint_fec; >> u8 endpoint_dsc; >> >> -- >> 2.7.4 >> >> >> >> _______________________________________________ >> dri-devel mailing list >> dri-devel@lists.freedesktop.org >> https://lists.freedesktop.org/mailman/listinfo/dri-devel > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Jani Nikula, Intel Open Source Graphics Center