lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1500103521-23618-1-git-send-email-arvind.yadav.cs@gmail.com>
Date:   Sat, 15 Jul 2017 12:55:20 +0530
From:   Arvind Yadav <arvind.yadav.cs@...il.com>
To:     airlied@...ux.ie, linux-kernel@...r.kernel.org,
        z.liuxinliang@...ilicon.com, zourongrong@...il.com,
        puck.chen@...ilicon.com, kong.kongxinwei@...ilicon.com
Cc:     dri-devel@...ts.freedesktop.org
Subject: [PATCH 5/5] drm: hisilicon: constify pci_device_id.

pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by <linux/pci.h> work with
const pci_device_id. So mark the non-const structs as const.

File size before:
   text	   data	    bss	    dec	    hex	filename
   2704	    808	      0	   3512	    db8
gpu/drm/hisilicon/hibmc/hibmc_drm_drv.o

File size After adding 'const':
   text	   data	    bss	    dec	    hex	filename
   2768	    744	      0	   3512	    db8
gpu/drm/hisilicon/hibmc/hibmc_drm_drv.o

Signed-off-by: Arvind Yadav <arvind.yadav.cs@...il.com>
---
 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
index 2ffdbf9..a8c8186 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
@@ -401,7 +401,7 @@ static void hibmc_pci_remove(struct pci_dev *pdev)
 	drm_dev_unref(dev);
 }
 
-static struct pci_device_id hibmc_pci_table[] = {
+static const struct pci_device_id hibmc_pci_table[] = {
 	{0x19e5, 0x1711, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
 	{0,}
 };
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ