Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3457958ybb; Mon, 13 Apr 2020 08:28:39 -0700 (PDT) X-Google-Smtp-Source: APiQypKmHcz59zbowSTxwlD53dwt8IP6hmOymJmZEzLGMy0t7nKfnVMc5gLgSKmvbKK4IJ8ObYNG X-Received: by 2002:a50:bf4d:: with SMTP id g13mr16395992edk.381.1586791719344; Mon, 13 Apr 2020 08:28:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586791719; cv=none; d=google.com; s=arc-20160816; b=mHjBktrupKjJ9vCG+hZ5PIA21nECSjifEqLLpVyrd/mFC53EK2PLTjT55y6oLc/YJb wCHxlH8mUqHRvDbrI407ZxjzA8q5Xui4xg6TAWEgOrQLX1r7xLBeNKWVaRCBj7E1OY5d z9DvCv5o3eibUR9pBr+wCafzB0vMbKq1p3UtYW5ewKfMy0thS/QEOUB+bm4gmN8pEuG4 NNUyKf7dpo1Xi8GEHaoCrwLJ20SCp6FEwPZ0X2+jT2xfU1jiFa3v2+njfRoB+4fzpsrf QjJfnr+JkymVEoM+0wqzJNDF7xHP5JO0guLT0nuHxLmH3ZN+am+zV3qEe4ovS26RTO3J yhJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=EOjjtmiSBry9sWf71C/iCFNq7MksgHVjzrQLc6ngrDY=; b=Y7VLtOvQUQMHTC1loKR2WtbVnYLy2Bpx8Gz7ndQzavg9YW4sP9G3e9DSD/vuyaV/Lb oywgoPRryVa1dJE8pZvql+Ny8IJcxsYRgpP/H0hqr/e9ZuLfAVgDz+SqA2/tulyN3Qz5 NM0h7FzSQuv1o6uwZY7z98Ne2mO2jUTFhSYEOsx2ca0o1L1RPTKbQQoYQScDuDOGQILm UAxs2gydik7EV3mhY4ypgYz/l4CZMC8uCdbxsBzPHAp/i8o9hDuCQczNZDXhrjbFJsTO t5u/GTOh01NZw8wmPixgAi4x+9Et1hZO5YC1QraAq6USE4nvhMTGwJ2JzMBPmWdf/wqM qJig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=aN6LfMf7; spf=pass (google.com: best guess record for 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v25si3846346edx.49.2020.04.13.08.28.15; Mon, 13 Apr 2020 08:28:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=aN6LfMf7; spf=pass (google.com: best guess record for 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730356AbgDMOIw (ORCPT + 99 others); Mon, 13 Apr 2020 10:08:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730285AbgDMOIv (ORCPT ); Mon, 13 Apr 2020 10:08:51 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2386DC0A3BDC for ; Mon, 13 Apr 2020 07:08:51 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id f13so10237117wrm.13 for ; Mon, 13 Apr 2020 07:08:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EOjjtmiSBry9sWf71C/iCFNq7MksgHVjzrQLc6ngrDY=; b=aN6LfMf7c1/78sc1j3yHc6/q7n/6Gr9qwFHzOGxLMZK3tsVvoc0+7N4KxTmQoj9KSp IgdnQtO1kg3PAyn1GxvUnr9nqBFlbVyqvydryKf0GppHMi9yv2tOg40Lzfajv6OUdIeV FGGsVz5LkXKgjcM0ngQjnUlsUfCyx9idTaWLB980gM9nN6K/f2+QTwPWoPy/vYViyyIM Zp3G1fgo63UFYBImjby3R3SFUebQCexOpUAXGxy/N8k3g22R4NF4vfH/cA/7CuzrnEEp jHk9pbuGCNG3npJBuKzHesUPvu+caEZJmD1vpyQkjJZ/HQQV++9zONklY1HEEqWn6kiK 5dLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EOjjtmiSBry9sWf71C/iCFNq7MksgHVjzrQLc6ngrDY=; b=Sx0S55GNMRApXJfBEKIcF5nQixrSJ71WAcBK1dLIX6lZx78DxW9uJzQZZx+NKAueVV fDWh6dFJ0sXSyooTOD27wjjvqz8WQG+fjvZ7KvvJa0gxm+leKKLqm32SScb/zDZ/QTPh JKK/5+rkwdzCCFvJdv9p/4JQo4SSC1QLOr2uzbFsE+yxsHDLnv22kh0RrspuOXd9NWcq UFv13nLu8YjGI6gHN8+o60vNofei45TWfsDozjsNoCUQ99n5hpEomCGm8iwdgsG+kUbF SltlK3ycq9+gUkJlB5CepHABeJnaOwVPh7oXlFkYlxi3FazUFKAjE930oFm0NRDL+WPV gGQQ== X-Gm-Message-State: AGi0Pub5AYrCG2hvyD/VNLbdIv6d5wRQ2J3kbWlizWZsW2F2L/DCshHN LCixSkWRjqFHVioedtZYnxfCQJordaHBLNJ1gLsmtw== X-Received: by 2002:adf:f844:: with SMTP id d4mr282394wrq.362.1586786929901; Mon, 13 Apr 2020 07:08:49 -0700 (PDT) MIME-Version: 1.0 References: <20200411141740.14584-1-tangbin@cmss.chinamobile.com> In-Reply-To: <20200411141740.14584-1-tangbin@cmss.chinamobile.com> From: Alex Deucher Date: Mon, 13 Apr 2020 10:08:38 -0400 Message-ID: Subject: Re: [PATCH] drm/dp_mst: Fix drm_dp_mst_topology.c selftest compilation warning To: Tang Bin Cc: Maarten Lankhorst , Maxime Ripard , Dave Airlie , Daniel Vetter , Shengju Zhang , LKML , Maling list - DRI developers Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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