From: Daniel Vetter <daniel@ffwll.ch>
To: Oleksandr Andrushchenko <andr2000@gmail.com>
Cc: Nishka Dasgupta <nishkadg.linux@gmail.com>,
oleksandr_andrushchenko@epam.com, airlied@linux.ie,
dri-devel@lists.freedesktop.org, daniel@ffwll.ch,
xen-devel@lists.xenproject.org
Subject: Re: [Xen-devel] [PATCH] drm/xen-front: Make structure fb_funcs constant
Date: Wed, 14 Aug 2019 19:26:20 +0200 [thread overview]
Message-ID: <20190814172620.GO7444@phenom.ffwll.local> (raw)
In-Reply-To: <f370930a-6c1c-ef4f-9fc1-0848985b9765@gmail.com>
On Tue, Aug 13, 2019 at 10:32:00AM +0300, Oleksandr Andrushchenko wrote:
>
> On 8/13/19 9:27 AM, Nishka Dasgupta wrote:
> > Static structure fb_funcs, of type drm_framebuffer_funcs, is used only
> > when it is passed to drm_gem_fb_create_with_funcs() as its last
> > argument. drm_gem_fb_create_with_funcs does not modify its lst argument
> > (fb_funcs) and hence fb_funcs is never modified. Therefore make fb_funcs
> > constant to protect it from further modification.
> > Issue found with Coccinelle.
> >
> > Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
> Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
I'm assuming you'll apply this to drm-misc-next too? Good to state that,
to avoid confusion and coordination issues.
-Daniel
> > ---
> > drivers/gpu/drm/xen/xen_drm_front_kms.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/xen/xen_drm_front_kms.c b/drivers/gpu/drm/xen/xen_drm_front_kms.c
> > index c2955d375394..4a984f45555e 100644
> > --- a/drivers/gpu/drm/xen/xen_drm_front_kms.c
> > +++ b/drivers/gpu/drm/xen/xen_drm_front_kms.c
> > @@ -45,7 +45,7 @@ static void fb_destroy(struct drm_framebuffer *fb)
> > drm_gem_fb_destroy(fb);
> > }
> > -static struct drm_framebuffer_funcs fb_funcs = {
> > +static const struct drm_framebuffer_funcs fb_funcs = {
> > .destroy = fb_destroy,
> > };
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2019-08-14 17:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-13 6:27 [Xen-devel] [PATCH] drm/xen-front: Make structure fb_funcs constant Nishka Dasgupta
2019-08-13 7:32 ` Oleksandr Andrushchenko
2019-08-14 17:26 ` Daniel Vetter [this message]
2019-08-19 5:47 ` Oleksandr Andrushchenko
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=20190814172620.GO7444@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=airlied@linux.ie \
--cc=andr2000@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=nishkadg.linux@gmail.com \
--cc=oleksandr_andrushchenko@epam.com \
--cc=xen-devel@lists.xenproject.org \
/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;
as well as URLs for NNTP newsgroup(s).