From patchwork Tue May 7 10:01:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Qian Wang X-Patchwork-Id: 10932705 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4ED8F1515 for ; Tue, 7 May 2019 10:01:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 38E5728931 for ; Tue, 7 May 2019 10:01:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2B5832893D; Tue, 7 May 2019 10:01:15 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED 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 7A27428931 for ; Tue, 7 May 2019 10:01:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8D4EE89FAC; Tue, 7 May 2019 10:01:12 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60060.outbound.protection.outlook.com [40.107.6.60]) by gabe.freedesktop.org (Postfix) with ESMTPS id B001789FAC for ; Tue, 7 May 2019 10:01:10 +0000 (UTC) Received: from VE1PR08MB5006.eurprd08.prod.outlook.com (10.255.159.31) by VE1PR08MB5183.eurprd08.prod.outlook.com (20.179.31.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1856.15; Tue, 7 May 2019 10:01:07 +0000 Received: from VE1PR08MB5006.eurprd08.prod.outlook.com ([fe80::6841:2153:b91f:759]) by VE1PR08MB5006.eurprd08.prod.outlook.com ([fe80::6841:2153:b91f:759%5]) with mapi id 15.20.1856.012; Tue, 7 May 2019 10:01:07 +0000 From: "james qian wang (Arm Technology China)" To: Liviu Dudau , "airlied@linux.ie" , Brian Starkey , "maarten.lankhorst@linux.intel.com" , "sean@poorly.run" Subject: [PATCH v2] drm/komeda: Mark the local functions as static Thread-Topic: [PATCH v2] drm/komeda: Mark the local functions as static Thread-Index: AQHVBLvKScW4YmYc+UGQZe2ZtbUFxA== Date: Tue, 7 May 2019 10:01:07 +0000 Message-ID: <20190507100040.16058-1-james.qian.wang@arm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [113.29.88.7] x-clientproxiedby: HK2PR03CA0057.apcprd03.prod.outlook.com (2603:1096:202:17::27) To VE1PR08MB5006.eurprd08.prod.outlook.com (2603:10a6:803:113::31) x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4c4b0428-7027-48f1-7d8a-08d6d2d2ec92 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(4618075)(2017052603328)(7193020); SRVR:VE1PR08MB5183; x-ms-traffictypediagnostic: VE1PR08MB5183: x-ms-exchange-purlcount: 1 nodisclaimer: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1417; x-forefront-prvs: 0030839EEE x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(39860400002)(396003)(376002)(346002)(136003)(199004)(189003)(54906003)(55236004)(305945005)(1076003)(66066001)(6116002)(99286004)(53936002)(6506007)(66476007)(66556008)(64756008)(66446008)(102836004)(3846002)(386003)(6512007)(186003)(73956011)(256004)(4326008)(14444005)(2906002)(66946007)(26005)(2501003)(25786009)(68736007)(6486002)(110136005)(8936002)(8676002)(71200400001)(2616005)(71190400001)(476003)(5660300002)(81166006)(50226002)(81156014)(6306002)(7736002)(86362001)(52116002)(478600001)(2201001)(966005)(486006)(103116003)(36756003)(316002)(14454004)(6436002); DIR:OUT; SFP:1101; SCL:1; SRVR:VE1PR08MB5183; H:VE1PR08MB5006.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: PXyooe+J2mljtH6req91VJ1xpRqhVgY4QZbguIZMw8sbFG+sei/JQ8zze2JekkIQMAGVLsX/ni9xOKEavLpSWjWeMEc1AqE2DaenAnagt0UeJO5lvVes1H96u2EdMGr/Oj3scHQ4VFPzO8uPcme5DKpz4o6beizzBgXapCs+pu9LI5si8sebV4tLOHDFv+E0YeM9yB0JDyV1jQ+LvjLCdGzQ1ijQzesxOUny1MSTKlOAsf43ipk6AzqaAb1uClh+tbQ2nfB7SccTHargPyebGR/zmzIn6IKSM/Q9TqSXg3FOAizForD7fTipTLbQjcdl3JxO2AdPAM6z8gBuvfLaaPt1uJE3jv1iVPGqBz4pE+CwgNeb2jfmM9FLPJ0Q4oUOoUKbAIijNHtSGyQL5T1QIc50z18yfON5SOlQisLWQPs= MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4c4b0428-7027-48f1-7d8a-08d6d2d2ec92 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 May 2019 10:01:07.6474 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB5183 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HqkgVq3vWRydxghCN0d3OD5//vjDyQ1bLF30wRzea8A=; b=osCOBIxmwcgz/GWjI8RkYs3Ph64RP2MdC0xEQCtmiM149Jf4MggFCQkoQLJSvFH1g7GNv6Gx39MIbCuTadBB6zeQT6E3c/rus5p3pmgCp4TQHseRWrNPEvjYKQYmx3fisG09BrK9fYpgWCuM1403Ws8l+UQkudaH3R1naee4SQk= X-Mailman-Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=james.qian.wang@arm.com; X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: nd , Ayan Halder , "Tiannan Zhu \(Arm Technology China\)" , "Jonathan Chai \(Arm Technology China\)" , Liviu Dudau , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , "Julien Yin \(Arm Technology China\)" , "james qian wang \(Arm Technology China\)" , "Yiqi Kang \(Arm Technology China\)" , "thomas Sun \(Arm Technology China\)" , "Lowry Li \(Arm Technology China\)" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Fix the kbuild test rebot reported warnings: - symbol was not declared. Should it be static? - missing braces around initializer Depends on: - https://patchwork.freedesktop.org/series/58976/ V2: Update Signed-off-by name to make it same with author entirely. Reported-by: kbuild test robot Signed-off-by: james qian wang (Arm Technology China) Signed-off-by: Liviu Dudau --- .../gpu/drm/arm/display/komeda/d71/d71_component.c | 9 +++++---- drivers/gpu/drm/arm/display/komeda/komeda_crtc.c | 4 ++-- drivers/gpu/drm/arm/display/komeda/komeda_dev.c | 4 +++- drivers/gpu/drm/arm/display/komeda/komeda_drv.c | 2 +- drivers/gpu/drm/arm/display/komeda/komeda_pipeline.c | 2 +- .../drm/arm/display/komeda/komeda_pipeline_state.c | 11 ++++++----- drivers/gpu/drm/arm/display/komeda/komeda_plane.c | 10 ++++++---- 7 files changed, 24 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/arm/display/komeda/d71/d71_component.c b/drivers/gpu/drm/arm/display/komeda/d71/d71_component.c index c56cfc2de147..031e5f305a3c 100644 --- a/drivers/gpu/drm/arm/display/komeda/d71/d71_component.c +++ b/drivers/gpu/drm/arm/display/komeda/d71/d71_component.c @@ -391,7 +391,7 @@ static void d71_compiz_dump(struct komeda_component *c, struct seq_file *sf) seq_printf(sf, "CU_USER_HIGH:\t\t0x%X\n", v[1]); } -struct komeda_component_funcs d71_compiz_funcs = { +static struct komeda_component_funcs d71_compiz_funcs = { .update = d71_compiz_update, .disable = d71_component_disable, .dump_register = d71_compiz_dump, @@ -467,7 +467,7 @@ static void d71_improc_dump(struct komeda_component *c, struct seq_file *sf) seq_printf(sf, "IPS_RGB_YUV_COEFF%u:\t0x%X\n", i, v[i]); } -struct komeda_component_funcs d71_improc_funcs = { +static struct komeda_component_funcs d71_improc_funcs = { .update = d71_improc_update, .disable = d71_component_disable, .dump_register = d71_improc_dump, @@ -543,7 +543,8 @@ static void d71_timing_ctrlr_update(struct komeda_component *c, malidp_write32(reg, BLK_CONTROL, value); } -void d71_timing_ctrlr_dump(struct komeda_component *c, struct seq_file *sf) +static void d71_timing_ctrlr_dump(struct komeda_component *c, + struct seq_file *sf) { u32 v[8], i; @@ -579,7 +580,7 @@ void d71_timing_ctrlr_dump(struct komeda_component *c, struct seq_file *sf) seq_printf(sf, "BS_USER:\t\t0x%X\n", v[4]); } -struct komeda_component_funcs d71_timing_ctrlr_funcs = { +static struct komeda_component_funcs d71_timing_ctrlr_funcs = { .update = d71_timing_ctrlr_update, .disable = d71_timing_ctrlr_disable, .dump_register = d71_timing_ctrlr_dump, diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c b/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c index d335fec1b727..62fad59f5a6a 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c +++ b/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c @@ -52,7 +52,7 @@ komeda_crtc_atomic_check(struct drm_crtc *crtc, return 0; } -u32 komeda_calc_mclk(struct komeda_crtc_state *kcrtc_st) +static u32 komeda_calc_mclk(struct komeda_crtc_state *kcrtc_st) { unsigned long mclk = kcrtc_st->base.adjusted_mode.clock * 1000; @@ -350,7 +350,7 @@ static bool komeda_crtc_mode_fixup(struct drm_crtc *crtc, return true; } -struct drm_crtc_helper_funcs komeda_crtc_helper_funcs = { +static struct drm_crtc_helper_funcs komeda_crtc_helper_funcs = { .atomic_check = komeda_crtc_atomic_check, .atomic_flush = komeda_crtc_atomic_flush, .atomic_enable = komeda_crtc_atomic_enable, diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_dev.c b/drivers/gpu/drm/arm/display/komeda/komeda_dev.c index 9d6c31cca875..2075f4ac7078 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_dev.c +++ b/drivers/gpu/drm/arm/display/komeda/komeda_dev.c @@ -73,9 +73,11 @@ config_id_show(struct device *dev, struct device_attribute *attr, char *buf) { struct komeda_dev *mdev = dev_to_mdev(dev); struct komeda_pipeline *pipe = mdev->pipelines[0]; - union komeda_config_id config_id = {0,}; + union komeda_config_id config_id; int i; + config_id.value = 0; + config_id.max_line_sz = pipe->layers[0]->hsize_in.end; config_id.n_pipelines = mdev->n_pipelines; config_id.n_scalers = pipe->n_scalers; diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_drv.c b/drivers/gpu/drm/arm/display/komeda/komeda_drv.c index 0285fd37a016..cfa5068d9d1e 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_drv.c +++ b/drivers/gpu/drm/arm/display/komeda/komeda_drv.c @@ -127,7 +127,7 @@ static const struct komeda_product_data komeda_products[] = { }, }; -const struct of_device_id komeda_of_match[] = { +static const struct of_device_id komeda_of_match[] = { { .compatible = "arm,mali-d71", .data = &komeda_products[MALI_D71], }, {}, }; diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_pipeline.c b/drivers/gpu/drm/arm/display/komeda/komeda_pipeline.c index 07398efc40f5..c379439c6194 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_pipeline.c +++ b/drivers/gpu/drm/arm/display/komeda/komeda_pipeline.c @@ -62,7 +62,7 @@ void komeda_pipeline_destroy(struct komeda_dev *mdev, devm_kfree(mdev->dev, pipe); } -struct komeda_component ** +static struct komeda_component ** komeda_pipeline_get_component_pos(struct komeda_pipeline *pipe, int id) { struct komeda_dev *mdev = pipe->mdev; diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c b/drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c index ae1c3773c4ef..36570d7dad61 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c +++ b/drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c @@ -20,7 +20,7 @@ static inline bool is_switching_user(void *old, void *new) return old != new; } -struct komeda_pipeline_state * +static struct komeda_pipeline_state * komeda_pipeline_get_state(struct komeda_pipeline *pipe, struct drm_atomic_state *state) { @@ -45,7 +45,7 @@ komeda_pipeline_get_old_state(struct komeda_pipeline *pipe, return NULL; } -struct komeda_pipeline_state * +static struct komeda_pipeline_state * komeda_pipeline_get_new_state(struct komeda_pipeline *pipe, struct drm_atomic_state *state) { @@ -58,7 +58,7 @@ komeda_pipeline_get_new_state(struct komeda_pipeline *pipe, } /* Assign pipeline for crtc */ -struct komeda_pipeline_state * +static struct komeda_pipeline_state * komeda_pipeline_get_state_and_set_crtc(struct komeda_pipeline *pipe, struct drm_atomic_state *state, struct drm_crtc *crtc) @@ -505,8 +505,9 @@ int komeda_build_display_data_flow(struct komeda_crtc *kcrtc, return 0; } -void komeda_pipeline_unbound_components(struct komeda_pipeline *pipe, - struct komeda_pipeline_state *new) +static void +komeda_pipeline_unbound_components(struct komeda_pipeline *pipe, + struct komeda_pipeline_state *new) { struct drm_atomic_state *drm_st = new->obj.state; struct komeda_pipeline_state *old = priv_to_pipe_st(pipe->obj.state); diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_plane.c b/drivers/gpu/drm/arm/display/komeda/komeda_plane.c index 46654f0be73d..07ed0cc1bc44 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_plane.c +++ b/drivers/gpu/drm/arm/display/komeda/komeda_plane.c @@ -47,8 +47,9 @@ komeda_plane_init_data_flow(struct drm_plane_state *st, * RETURNS: * Zero for success or -errno */ -int komeda_plane_atomic_check(struct drm_plane *plane, - struct drm_plane_state *state) +static int +komeda_plane_atomic_check(struct drm_plane *plane, + struct drm_plane_state *state) { struct komeda_plane *kplane = to_kplane(plane); struct komeda_plane_state *kplane_st = to_kplane_st(state); @@ -87,8 +88,9 @@ int komeda_plane_atomic_check(struct drm_plane *plane, /* plane doesn't represent a real HW, so there is no HW update for plane. * komeda handles all the HW update in crtc->atomic_flush */ -void komeda_plane_atomic_update(struct drm_plane *plane, - struct drm_plane_state *old_state) +static void +komeda_plane_atomic_update(struct drm_plane *plane, + struct drm_plane_state *old_state) { }