Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp31370pxb; Tue, 12 Jan 2021 19:06:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJxbGCvPjSuNhH4keVpg1oz5QcjBldP5xJQuAzmdgkKByV5GG8YFzvy3nSrq8eZ0jkhodsKa X-Received: by 2002:a17:906:38c3:: with SMTP id r3mr6777ejd.193.1610507166490; Tue, 12 Jan 2021 19:06:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610507166; cv=none; d=google.com; s=arc-20160816; b=a7kMQ0PbuFR78tJMzN+EDv+Ipanq5HH7nsVhlekQDzKAM9PtSAfILoqdbXcXbxqgnu iLqJU4eLlz5cOEJTIAJXzTju2d3J+uLz8m5hHSRXXgUkHJGyJu944Jxjf3HS2SuvWMQ2 GR8/zfQ981OlbRTa1/xpMkN4yzcY3fC3uWZVg7KIaEZ+Nt8616BG9oJ7ABnSbYJmeH6b kjFTSEVe1J+pIZ1uMET+DhKF5YAYxnEYtTcjadwc5XditlNmi76X5QYWrchrJ3FqDmsd lhpRIBK/opka2sM25vSY8um6OzfEkaWBTyh4mOqP1n2atKn1MwWb9zg28EjGySr49825 5fJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=2rlldwJer3sr2AnmP99UBbkreO3bRQYA52H6Sx5kmiQ=; b=c5KuZbJ9fl46aQgl7uchqbxAQRFkyHlhUvLNEBAqGV446of1CGJqP5UakaVNf6ydHD qz9ue8IRdj1QjKEWDcwFNUj3k4T4uaLYc1FGpnWB/d/aqEsBC7lqGNo5FwG4zu7pjQ7L VoJuAQC0OISAIEeru8QuzgW3Gr9P/uHkzWDqCPG9h8TLDXXpFIiZ30oDqn0MFrUSQZXa dqPMB/4JTfamMrN8ncBXMUQWi8gyAe89PTwDDrnrkIkRbDBZXnhjZy6RaP76ngdyn5xp fzzvX3e4aOByFxiBWULfvwVoRkLpcyRFg0YAdcXG1EX/sUhjDyfM39escuzKTKGMbCve 0fBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IyYfQtmG; 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=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 bo24si314728edb.495.2021.01.12.19.05.35; Tue, 12 Jan 2021 19:06:06 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IyYfQtmG; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2438168AbhALWPx (ORCPT + 99 others); Tue, 12 Jan 2021 17:15:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403924AbhALWN6 (ORCPT ); Tue, 12 Jan 2021 17:13:58 -0500 Received: from mail-ot1-x331.google.com (mail-ot1-x331.google.com [IPv6:2607:f8b0:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D409C061575 for ; Tue, 12 Jan 2021 14:13:18 -0800 (PST) Received: by mail-ot1-x331.google.com with SMTP id j12so3861371ota.7 for ; Tue, 12 Jan 2021 14:13:18 -0800 (PST) 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:content-transfer-encoding; bh=2rlldwJer3sr2AnmP99UBbkreO3bRQYA52H6Sx5kmiQ=; b=IyYfQtmGxqdwLuMw2jLptl7CZpr7L69oOQEeG0T1MRClpcYEGo4XkG8Z86Vxi8Tba9 6A6BuP+5rXqtahnJpxjHcwlYXslQPmBrPOWyOg2oH9bt6JDygS7LMMP8LUAtFEIMMeBU 8ewVNWLaVVpDOe5uTcqfI8llnZovv++pdUe/7kaQvt/zHWxFXaGX8/TVCn051Ko/9wF0 yCRXU4OYF7tCfJKY6vGQrKqTXZbMGiXiyZsdPqq43b7cd3ipLgMN6OFknANxC9UrnMMR yXVQnFKMgJsMjk/Srd2Z4yTD5a6HPCrVW9UFqgq1RsEbf/chzCdEtgB40M2lJxq1ECVr 4cFQ== 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:content-transfer-encoding; bh=2rlldwJer3sr2AnmP99UBbkreO3bRQYA52H6Sx5kmiQ=; b=gIJbX0keBFiLlFNLniwFScS8zSlUjv8A1u6CLmWPLVM8OaOaK+jOsgb9n1PfqWysC9 oRdhjghkopiblOKBYW+m7D0Pjm9SFmeSfTHNa2N8QSqNWUXxhK/hPuDZz0JjL/WS/+IN ySP+g3TMuXpVV3W3X2rsB4O9jQKMHlN/8nlq1Ej7Bp9lKrZ520fCtb11E3pQBmfOhVo2 Gdj7kZptyjuXWmpIS8c/dyWD7RaU+50RyvzCCnY53axBlDZyHlTh0NdNfdUHQDyKLFKN +T68Zmdr8L2nSsqtIhzb4EGLq02X400CH2jr5B0wzZjgz3PxeABw5yMtcDetUX8Sm1yh Zs6Q== X-Gm-Message-State: AOAM530/nQJz3Cf2pgbXq/dIukykANnfs9zY/3SC67KJKx3ord788WY1 4ErFU8o9ZNQAhc8yManUX03Ly0CfSMIXoLg5LfbSaJ7n X-Received: by 2002:a05:6830:1b7b:: with SMTP id d27mr1096229ote.132.1610489597818; Tue, 12 Jan 2021 14:13:17 -0800 (PST) MIME-Version: 1.0 References: <20210111191926.3688443-1-lee.jones@linaro.org> <20210111191926.3688443-13-lee.jones@linaro.org> In-Reply-To: <20210111191926.3688443-13-lee.jones@linaro.org> From: Alex Deucher Date: Tue, 12 Jan 2021 17:13:04 -0500 Message-ID: Subject: Re: [PATCH 12/40] drm/amd/display/dc/dce120/Makefile: Ignore -Woverride-init warning To: Lee Jones Cc: Leo Li , LKML , amd-gfx list , David Airlie , Maling list - DRI developers , Alex Deucher , =?UTF-8?Q?Christian_K=C3=B6nig?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 11, 2021 at 2:20 PM Lee Jones wrote: > > This file uses a complex abstracted set of hierarchical macros to > setup its applicable register lists within constant structures. > However in the case of TMDS_CNTL we wish to mark it as not applicable > for this use-case. > > One method would be to de-const all of the definitions and users, then > manually zero out TMDS_CNTL from the list. Another would be to create > a new set of hierarchical macros to omit TMDS_CNTL entirely. Both > would entail a great deal of unnecessary changes and maintenance > burden. > > Instead, let's just silence the warning. > > Fixes the following W=3D1 kernel build warning(s): > > drivers/gpu/drm/amd/amdgpu/../display/dc/dce120/dce120_resource.c:277:15= : warning: initialized field overwritten [-Woverride-init] > drivers/gpu/drm/amd/amdgpu/../display/dc/dce120/dce120_resource.c:281:2:= note: in expansion of macro =E2=80=98stream_enc_regs=E2=80=99 > drivers/gpu/drm/amd/amdgpu/../display/dc/dce120/dce120_resource.c:277:15= : note: (near initialization for =E2=80=98stream_enc_regs[0].TMDS_CNTL=E2= =80=99) > drivers/gpu/drm/amd/amdgpu/../display/dc/dce120/dce120_resource.c:281:2:= note: in expansion of macro =E2=80=98stream_enc_regs=E2=80=99 > drivers/gpu/drm/amd/amdgpu/../display/dc/dce120/dce120_resource.c:277:15= : warning: initialized field overwritten [-Woverride-init] > drivers/gpu/drm/amd/amdgpu/../display/dc/dce120/dce120_resource.c:282:2:= note: in expansion of macro =E2=80=98stream_enc_regs=E2=80=99 > drivers/gpu/drm/amd/amdgpu/../display/dc/dce120/dce120_resource.c:277:15= : note: (near initialization for =E2=80=98stream_enc_regs[1].TMDS_CNTL=E2= =80=99) > drivers/gpu/drm/amd/amdgpu/../display/dc/dce120/dce120_resource.c:282:2:= note: in expansion of macro =E2=80=98stream_enc_regs=E2=80=99 > drivers/gpu/drm/amd/amdgpu/../display/dc/dce120/dce120_resource.c:277:15= : warning: initialized field overwritten [-Woverride-init] > drivers/gpu/drm/amd/amdgpu/../display/dc/dce120/dce120_resource.c:283:2:= note: in expansion of macro =E2=80=98stream_enc_regs=E2=80=99 > drivers/gpu/drm/amd/amdgpu/../display/dc/dce120/dce120_resource.c:277:15= : note: (near initialization for =E2=80=98stream_enc_regs[2].TMDS_CNTL=E2= =80=99) > drivers/gpu/drm/amd/amdgpu/../display/dc/dce120/dce120_resource.c:283:2:= note: in expansion of macro =E2=80=98stream_enc_regs=E2=80=99 > drivers/gpu/drm/amd/amdgpu/../display/dc/dce120/dce120_resource.c:277:15= : warning: initialized field overwritten [-Woverride-init] > drivers/gpu/drm/amd/amdgpu/../display/dc/dce120/dce120_resource.c:284:2:= note: in expansion of macro =E2=80=98stream_enc_regs=E2=80=99 > drivers/gpu/drm/amd/amdgpu/../display/dc/dce120/dce120_resource.c:277:15= : note: (near initialization for =E2=80=98stream_enc_regs[3].TMDS_CNTL=E2= =80=99) > drivers/gpu/drm/amd/amdgpu/../display/dc/dce120/dce120_resource.c:284:2:= note: in expansion of macro =E2=80=98stream_enc_regs=E2=80=99 > drivers/gpu/drm/amd/amdgpu/../display/dc/dce120/dce120_resource.c:277:15= : warning: initialized field overwritten [-Woverride-init] > drivers/gpu/drm/amd/amdgpu/../display/dc/dce120/dce120_resource.c:285:2:= note: in expansion of macro =E2=80=98stream_enc_regs=E2=80=99 > drivers/gpu/drm/amd/amdgpu/../display/dc/dce120/dce120_resource.c:277:15= : note: (near initialization for =E2=80=98stream_enc_regs[4].TMDS_CNTL=E2= =80=99) > drivers/gpu/drm/amd/amdgpu/../display/dc/dce120/dce120_resource.c:285:2:= note: in expansion of macro =E2=80=98stream_enc_regs=E2=80=99 > drivers/gpu/drm/amd/amdgpu/../display/dc/dce120/dce120_resource.c:277:15= : warning: initialized field overwritten [-Woverride-init] > drivers/gpu/drm/amd/amdgpu/../display/dc/dce120/dce120_resource.c:286:2:= note: in expansion of macro =E2=80=98stream_enc_regs=E2=80=99 > drivers/gpu/drm/amd/amdgpu/../display/dc/dce120/dce120_resource.c:277:15= : note: (near initialization for =E2=80=98stream_enc_regs[5].TMDS_CNTL=E2= =80=99) > drivers/gpu/drm/amd/amdgpu/../display/dc/dce120/dce120_resource.c:286:2:= note: in expansion of macro =E2=80=98stream_enc_regs=E2=80=99 > > Cc: Harry Wentland > Cc: Leo Li > Cc: Alex Deucher > Cc: "Christian K=C3=B6nig" > Cc: David Airlie > Cc: Daniel Vetter > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-devel@lists.freedesktop.org > Signed-off-by: Lee Jones Applied. Thanks! Alex > --- > drivers/gpu/drm/amd/display/dc/dce120/Makefile | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/gpu/drm/amd/display/dc/dce120/Makefile b/drivers/gpu= /drm/amd/display/dc/dce120/Makefile > index 37db1f8d45ea5..a9cc4b73270bb 100644 > --- a/drivers/gpu/drm/amd/display/dc/dce120/Makefile > +++ b/drivers/gpu/drm/amd/display/dc/dce120/Makefile > @@ -24,6 +24,8 @@ > # It provides the control and status of HW CRTC block. > > > +CFLAGS_$(AMDDALPATH)/dc/dce120/dce120_resource.o =3D $(call cc-disable-w= arning, override-init) > + > DCE120 =3D dce120_resource.o dce120_timing_generator.o \ > dce120_hw_sequencer.o > > -- > 2.25.1 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel