Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp220198ybc; Mon, 11 Nov 2019 23:56:29 -0800 (PST) X-Google-Smtp-Source: APXvYqyFRa63DxVAyWq8VnH2/MLpHjqkzJrz3Z0sC3+yxlKlPVwa73Ppu2BqHKRwrjGqqPZIgp9n X-Received: by 2002:aa7:d6cf:: with SMTP id x15mr31438983edr.202.1573545389387; Mon, 11 Nov 2019 23:56:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573545389; cv=none; d=google.com; s=arc-20160816; b=viJvOhFiLnPXM1k6o9zZ4e2FdcSjMv5K/NYbPYxZCdE+OQeF2REqBWQJcjI7lOdtrR snTZWg3rduQPZGnmdBo+96l8PTUKPMV/0gJnhB8D1pXib8PRl8cjNJcqF6gfdhbpunbm rT8F7jlj1COcRd2IwauIVC3lDeTH6luRqBVHhCMvU8sjtuYURIy7dG6CjhaTlOVR3471 Nqwut2sOkrYT+t5SmH/SCn3Hp0cTj1L/jNXliFdWnEM0HlTlRpIWY2IFH/Vr7TiwItps 0lXMjJB8gfqbphJq3dCK75E4p2n2JY9VXD7FrknTeG+3EKwWsYHfxWjXitDGjlMPEpOD hmrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=Ij+CpA6+lusqgJeJvoXRdL1cZGmoisYRhe5Yg35MoKg=; b=BFiFPtyVvdK7hcLtv9RokX6r/VlQHjrqElP/S37JZA1dzt2/lcgmkT75oEXDuLQyCw QbWPqWhEDJsXzOxCrGSKFC/3laFenk+sjHwTwUx8AAppcGxOq0Zw6nWr8KOzMlkWsYTL K93TzwsPVzHQYw0BAxedVQ2GsQBdqYsrlI9QJL03QNf+eLxVpDD7doPEAQCp9pZfZgtT mxAsFFud90o2fa0QSl6GRiKUXhfIZQBdah3RLhIBsoExINbCvoVux2+adhSOIuykn0uW tV2wr5AHMdKBCDBTyvyr2sqQdmCqwQBoqvehonLKnhvqGRaoRHMm1iK5orIjodPoibqZ YFdw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r7si11780467edm.224.2019.11.11.23.56.05; Mon, 11 Nov 2019 23:56:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727089AbfKLHvr (ORCPT + 99 others); Tue, 12 Nov 2019 02:51:47 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:6639 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725847AbfKLHvq (ORCPT ); Tue, 12 Nov 2019 02:51:46 -0500 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 1DA92BC29FDA6D619B61; Tue, 12 Nov 2019 15:51:43 +0800 (CST) Received: from [127.0.0.1] (10.133.213.239) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.439.0; Tue, 12 Nov 2019 15:51:38 +0800 Subject: Re: [PATCH -next] drm/amd/display: Fix old-style declaration To: Joe Perches , , , , , , , , , , , , , , References: <20191111122801.18584-1-yuehaibing@huawei.com> <01c630e6d4c58b3f6184603e158f53fb9aaeae7d.camel@perches.com> CC: , , From: Yuehaibing Message-ID: <3361b760-fe4f-87e8-b0a4-ebda390aa492@huawei.com> Date: Tue, 12 Nov 2019 15:51:33 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <01c630e6d4c58b3f6184603e158f53fb9aaeae7d.camel@perches.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.133.213.239] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/11/12 10:39, Joe Perches wrote: > On Mon, 2019-11-11 at 20:28 +0800, YueHaibing wrote: >> Fix a build warning: >> >> drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:75:1: >> warning: 'static' is not at beginning of declaration [-Wold-style-declaration] > [] >> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c > [] >> @@ -69,7 +69,7 @@ >> #define DC_LOGGER \ >> dc->ctx->logger >> >> -const static char DC_BUILD_ID[] = "production-build"; >> +static const char DC_BUILD_ID[] = "production-build"; > > DC_BUILD_ID is used exactly once. > Maybe just use it directly and remove DC_BUILD_ID instead? commit be61df574256ae8c0dbd45ac148ca7260a0483c0 Author: Jun Lei Date: Thu Sep 13 09:32:26 2018 -0400 drm/amd/display: Add DC build_id to determine build type [why] Sometimes there are indications that the incorrect driver is being loaded in automated tests. This change adds the ability for builds to be tagged with a string, and picked up by the test infrastructure. [how] dc.c will allocate const for build id, which is init-ed with default value, indicating production build. For test builds, build server will find/replace this value. The test machine will then verify this value. It seems DC_BUILD_ID is used by the build server, so maybe we should keep it. > > --- > drivers/gpu/drm/amd/display/dc/core/dc.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c > index 1fdba13..803dc14 100644 > --- a/drivers/gpu/drm/amd/display/dc/core/dc.c > +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c > @@ -69,8 +69,6 @@ > #define DC_LOGGER \ > dc->ctx->logger > > -const static char DC_BUILD_ID[] = "production-build"; > - > /** > * DOC: Overview > * > @@ -815,7 +813,7 @@ struct dc *dc_create(const struct dc_init_data *init_params) > if (dc->res_pool->dmcu != NULL) > dc->versions.dmcu_version = dc->res_pool->dmcu->dmcu_version; > > - dc->build_id = DC_BUILD_ID; > + dc->build_id = "production-build"; > > DC_LOG_DC("Display Core initialized\n"); > > > > > . >