From: Sinclair Yeh <syeh@vmware.com>
To: Arvind Yadav <arvind.yadav.cs@gmail.com>
Cc: airlied@linux.ie, linux-graphics-maintainer@vmware.com,
linux-kernel@vger.kernel.org, thellstrom@vmware.com,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 2/5] drm: vmwgfx: constify pci_device_id.
Date: Mon, 17 Jul 2017 23:55:54 -0700 [thread overview]
Message-ID: <20170718065535.GA5669@ubuntu> (raw)
In-Reply-To: <1500102893-23353-1-git-send-email-arvind.yadav.cs@gmail.com>
Thanks. Queued.
On Sat, Jul 15, 2017 at 12:44:53PM +0530, Arvind Yadav wrote:
> 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
> 13765 800 20 14585 38f9 gpu/drm/vmwgfx/vmwgfx_drv.o
>
> File size After adding 'const':
> text data bss dec hex filename
> 13829 736 20 14585 38f9 gpu/drm/vmwgfx/vmwgfx_drv.o
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> ---
> drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
> index 4a64155..f5fe28f 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
> @@ -227,7 +227,7 @@ static const struct drm_ioctl_desc vmw_ioctls[] = {
> DRM_AUTH | DRM_RENDER_ALLOW),
> };
>
> -static struct pci_device_id vmw_pci_id_list[] = {
> +static const struct pci_device_id vmw_pci_id_list[] = {
> {0x15ad, 0x0405, PCI_ANY_ID, PCI_ANY_ID, 0, 0, VMWGFX_CHIP_SVGAII},
> {0, 0, 0}
> };
> --
> 2.7.4
>
prev parent reply other threads:[~2017-07-18 6:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-15 7:14 [PATCH 2/5] drm: vmwgfx: constify pci_device_id Arvind Yadav
2017-07-18 6:55 ` Sinclair Yeh [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170718065535.GA5669@ubuntu \
--to=syeh@vmware.com \
--cc=airlied@linux.ie \
--cc=arvind.yadav.cs@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-graphics-maintainer@vmware.com \
--cc=linux-kernel@vger.kernel.org \
--cc=thellstrom@vmware.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox