From: Matt Roper <matthew.d.roper@intel.com>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/plane: Fix sparse warnings
Date: Tue, 13 May 2014 07:28:01 -0700 [thread overview]
Message-ID: <20140513142801.GF25320@intel.com> (raw)
In-Reply-To: <1399978062-29637-1-git-send-email-thierry.reding@gmail.com>
On Tue, May 13, 2014 at 12:47:42PM +0200, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
>
> Include the drm_plane_helper.h header file to fix the following sparse
> warnings:
>
> CHECK drivers/gpu/drm/drm_plane_helper.c
> drivers/gpu/drm/drm_plane_helper.c:102:5: warning: symbol 'drm_primary_helper_update' was not declared. Should it be static?
> drivers/gpu/drm/drm_plane_helper.c:219:5: warning: symbol 'drm_primary_helper_disable' was not declared. Should it be static?
> drivers/gpu/drm/drm_plane_helper.c:233:6: warning: symbol 'drm_primary_helper_destroy' was not declared. Should it be static?
> drivers/gpu/drm/drm_plane_helper.c:241:30: warning: symbol 'drm_primary_helper_funcs' was not declared. Should it be static?
> drivers/gpu/drm/drm_plane_helper.c:259:18: warning: symbol 'drm_primary_helper_create_plane' was not declared. Should it be static?
>
> Doing that makes gcc complain as follows:
>
> CC drivers/gpu/drm/drm_plane_helper.o
> drivers/gpu/drm/drm_plane_helper.c:260:19: error: conflicting types for 'drm_primary_helper_create_plane'
> struct drm_plane *drm_primary_helper_create_plane(struct drm_device *dev,
> ^
> In file included from drivers/gpu/drm/drm_plane_helper.c:29:0:
> include/drm/drm_plane_helper.h:42:19: note: previous declaration of 'drm_primary_helper_create_plane' was here
> struct drm_plane *drm_primary_helper_create_plane(struct drm_device *dev,
> ^
> drivers/gpu/drm/drm_plane_helper.c: In function 'drm_primary_helper_create_plane':
> drivers/gpu/drm/drm_plane_helper.c:274:11: warning: assignment discards 'const' qualifier from pointer target type
> formats = safe_modeset_formats;
> ^
> In file included from include/linux/linkage.h:6:0,
> from include/linux/kernel.h:6,
> from include/drm/drmP.h:45,
> from drivers/gpu/drm/drm_plane_helper.c:27:
> drivers/gpu/drm/drm_plane_helper.c: At top level:
> drivers/gpu/drm/drm_plane_helper.c:289:15: error: conflicting types for 'drm_primary_helper_create_plane'
> EXPORT_SYMBOL(drm_primary_helper_create_plane);
> ^
> include/linux/export.h:57:21: note: in definition of macro '__EXPORT_SYMBOL'
> extern typeof(sym) sym; \
> ^
> drivers/gpu/drm/drm_plane_helper.c:289:1: note: in expansion of macro 'EXPORT_SYMBOL'
> EXPORT_SYMBOL(drm_primary_helper_create_plane);
> ^
> In file included from drivers/gpu/drm/drm_plane_helper.c:29:0:
> include/drm/drm_plane_helper.h:42:19: note: previous declaration of 'drm_primary_helper_create_plane' was here
> struct drm_plane *drm_primary_helper_create_plane(struct drm_device *dev,
> ^
>
> Which can easily be fixed by making the signatures of the implementation
> and the prototype match.
>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
> ---
> drivers/gpu/drm/drm_plane_helper.c | 1 +
> include/drm/drm_plane_helper.h | 2 +-
> 2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_plane_helper.c b/drivers/gpu/drm/drm_plane_helper.c
> index d2b1c03b3d71..63192420bab7 100644
> --- a/drivers/gpu/drm/drm_plane_helper.c
> +++ b/drivers/gpu/drm/drm_plane_helper.c
> @@ -26,6 +26,7 @@
> #include <linux/list.h>
> #include <drm/drmP.h>
> #include <drm/drm_rect.h>
> +#include <drm/drm_plane_helper.h>
>
> #define SUBPIXEL_MASK 0xffff
>
> diff --git a/include/drm/drm_plane_helper.h b/include/drm/drm_plane_helper.h
> index 09824becee3e..c5e7ab9503c8 100644
> --- a/include/drm/drm_plane_helper.h
> +++ b/include/drm/drm_plane_helper.h
> @@ -42,7 +42,7 @@ extern int drm_primary_helper_disable(struct drm_plane *plane);
> extern void drm_primary_helper_destroy(struct drm_plane *plane);
> extern const struct drm_plane_funcs drm_primary_helper_funcs;
> extern struct drm_plane *drm_primary_helper_create_plane(struct drm_device *dev,
> - uint32_t *formats,
> + const uint32_t *formats,
> int num_formats);
>
>
> --
> 1.9.2
>
--
Matt Roper
Graphics Software Engineer
IoTG Platform Enabling & Development
Intel Corporation
(916) 356-2795
prev parent reply other threads:[~2014-05-13 14:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-13 10:47 [PATCH] drm/plane: Fix sparse warnings Thierry Reding
2014-05-13 14:28 ` Matt Roper [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=20140513142801.GF25320@intel.com \
--to=matthew.d.roper@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=thierry.reding@gmail.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