Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp267238pxx; Thu, 29 Oct 2020 02:01:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyvw/CRNX0v8Q0Ba2pcy2mksvdAHR+0hzJq4NTuKxHxYOe0pyIKhg2miT7BeKTyjEfK76Rl X-Received: by 2002:a05:6512:1182:: with SMTP id g2mr1114652lfr.198.1603962106269; Thu, 29 Oct 2020 02:01:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603962106; cv=none; d=google.com; s=arc-20160816; b=Kqs6XqCfwmdijuVcMIxd05CaQuXWLZaCk/tVwyUk8vznj7uVtHGi/NQbL0fEr2Kc6H p3QEiv/mbMhT6MvvcBXGsYuU6hgIKlgQ/90grfiP5HkFOzRw6MGGBTtJ4J5diQ3MqAJ9 gx5Lez84MIQisF89SRgeeLRF0XCYFkwhwHlVyi+HSJ+HTmQw3gqKQ/13zW3h10BDm1rL +4LCYwAouMlj7L80+Z1q2MkjV6vzpt+SYE+zwrSY5kU4QGqWJf95DkyHx+Zf8gObY9sK l9L5kW34klhg7TSisz2WIoyEkDvB3px6tEWQ2lsI+JKZHeOxgrBSCY7kOWFtPq7O0QRo vXsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:to:from; bh=47373ZQS9GHAEVkCs8G1Z34txbtDzUL44qChgj37Yfc=; b=bWZ5ouBZNh9rMaaUPYoP814LBU73C7MAgaKTCEGH/+p8wfJc9GlIqOqEW5EQyl1M4K kdWuYt3Tgz0rK0XvrO9OLtW4NsxKb8dTSIvBO1dGYEHXF3FzzyMdHWYVCiFwtG29nB/2 HhOxuvEv43dAog9oRoFzTv5GcWMnTGWFgnMb/fJKzFkve3ujSJNT1Jr7L5NyFtuT/3L7 DwZRT5lLKZ0i7Ak8tQUlflkuZPUySSiNf8IK7si8ZQZuOEbgU19yKJUYeGXWRh0C3EEG Iaa11qTGFtCx936498rkTgGYBM0TLmaeDFA958/YoHZuI0OWB0SSOg3itN4mXq27WV/v mo9A== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s16si1330678ejy.687.2020.10.29.02.01.24; Thu, 29 Oct 2020 02:01:46 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728475AbgJ2Hab (ORCPT + 99 others); Thu, 29 Oct 2020 03:30:31 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:6666 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728479AbgJ2H3R (ORCPT ); Thu, 29 Oct 2020 03:29:17 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4CMGnW4lsVz15NwL; Thu, 29 Oct 2020 15:11:11 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.487.0; Thu, 29 Oct 2020 15:11:07 +0800 From: Tian Tao To: , , , , , , , , Subject: [PATCH] drm/hisilicon: Adding a const declaration to an invariant construct Date: Thu, 29 Oct 2020 15:11:45 +0800 Message-ID: <1603955505-43942-1-git-send-email-tiantao6@hisilicon.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some constructs cannot be changed after being assigned a value, so add const declarations to invariant constructs. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 2 +- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c index a1eabad..ef18b47 100644 --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c @@ -139,7 +139,7 @@ static const u32 channel_formats1[] = { DRM_FORMAT_ABGR8888 }; -static struct drm_plane_funcs hibmc_plane_funcs = { +static const struct drm_plane_funcs hibmc_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, .destroy = drm_plane_cleanup, diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c index 0c1b40d..fee6fe8 100644 --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c @@ -369,7 +369,7 @@ static void hibmc_pci_remove(struct pci_dev *pdev) drm_dev_put(dev); } -static struct pci_device_id hibmc_pci_table[] = { +static const struct pci_device_id hibmc_pci_table[] = { { PCI_VDEVICE(HUAWEI, 0x1711) }, {0,} }; -- 2.7.4