* [PATCH] drm/arm: make undeclared items static
@ 2019-10-17 11:17 Ben Dooks (Codethink)
2019-10-18 9:49 ` Liviu Dudau
0 siblings, 1 reply; 2+ messages in thread
From: Ben Dooks (Codethink) @ 2019-10-17 11:17 UTC (permalink / raw)
To: linux-kernel
Cc: Ben Dooks (Codethink),
Liviu Dudau, Brian Starkey, David Airlie, Daniel Vetter, malidp,
dri-devel, linux-kernel
Make the following items static to avoid clashes with
other parts of the kernel (dev_attr_core_id) or just
silence the following sparse warning:
drivers/gpu/drm/arm/malidp_drv.c:371:24: warning: symbol 'malidp_fb_create' was not declared. Should it be static?
drivers/gpu/drm/arm/malidp_drv.c:494:6: warning: symbol 'malidp_error_stats_dump' was not declared. Should it be static?
drivers/gpu/drm/arm/malidp_drv.c:668:1: warning: symbol 'dev_attr_core_id' was not declared. Should it be static?
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Brian Starkey <brian.starkey@arm.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: malidp@foss.arm.com
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
.. (open list)
---
drivers/gpu/drm/arm/malidp_drv.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/arm/malidp_drv.c b/drivers/gpu/drm/arm/malidp_drv.c
index 333b88a5efb0..18ca43c9cef4 100644
--- a/drivers/gpu/drm/arm/malidp_drv.c
+++ b/drivers/gpu/drm/arm/malidp_drv.c
@@ -368,7 +368,7 @@ malidp_verify_afbc_framebuffer(struct drm_device *dev, struct drm_file *file,
return false;
}
-struct drm_framebuffer *
+static struct drm_framebuffer *
malidp_fb_create(struct drm_device *dev, struct drm_file *file,
const struct drm_mode_fb_cmd2 *mode_cmd)
{
@@ -491,9 +491,9 @@ void malidp_error(struct malidp_drm *malidp,
spin_unlock_irqrestore(&malidp->errors_lock, irqflags);
}
-void malidp_error_stats_dump(const char *prefix,
- struct malidp_error_stats error_stats,
- struct seq_file *m)
+static void malidp_error_stats_dump(const char *prefix,
+ struct malidp_error_stats error_stats,
+ struct seq_file *m)
{
seq_printf(m, "[%s] num_errors : %d\n", prefix,
error_stats.num_errors);
@@ -665,7 +665,7 @@ static ssize_t core_id_show(struct device *dev, struct device_attribute *attr,
return snprintf(buf, PAGE_SIZE, "%08x\n", malidp->core_id);
}
-DEVICE_ATTR_RO(core_id);
+static DEVICE_ATTR_RO(core_id);
static int malidp_init_sysfs(struct device *dev)
{
--
2.23.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/arm: make undeclared items static
2019-10-17 11:17 [PATCH] drm/arm: make undeclared items static Ben Dooks (Codethink)
@ 2019-10-18 9:49 ` Liviu Dudau
0 siblings, 0 replies; 2+ messages in thread
From: Liviu Dudau @ 2019-10-18 9:49 UTC (permalink / raw)
To: Ben Dooks (Codethink)
Cc: linux-kernel, Brian Starkey, David Airlie, Daniel Vetter, malidp,
dri-devel, linux-kernel
On Thu, Oct 17, 2019 at 12:17:55PM +0100, Ben Dooks (Codethink) wrote:
> Make the following items static to avoid clashes with
> other parts of the kernel (dev_attr_core_id) or just
> silence the following sparse warning:
>
> drivers/gpu/drm/arm/malidp_drv.c:371:24: warning: symbol 'malidp_fb_create' was not declared. Should it be static?
> drivers/gpu/drm/arm/malidp_drv.c:494:6: warning: symbol 'malidp_error_stats_dump' was not declared. Should it be static?
> drivers/gpu/drm/arm/malidp_drv.c:668:1: warning: symbol 'dev_attr_core_id' was not declared. Should it be static?
>
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Acked-by: Liviu Dudau <liviu.dudau@arm.com>
Thanks for the patch! As a side note: the dim tool that we use in the DRM subsystem
flags your S-o-b as being different from author, due to "(Codethink)" addition in the
email name.
Best regards,
Liviu
> ---
> Cc: Liviu Dudau <liviu.dudau@arm.com>
> Cc: Brian Starkey <brian.starkey@arm.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: malidp@foss.arm.com
> Cc: dri-devel@lists.freedesktop.org
> Cc: linux-kernel@vger.kernel.org
> .. (open list)
> ---
> drivers/gpu/drm/arm/malidp_drv.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/arm/malidp_drv.c b/drivers/gpu/drm/arm/malidp_drv.c
> index 333b88a5efb0..18ca43c9cef4 100644
> --- a/drivers/gpu/drm/arm/malidp_drv.c
> +++ b/drivers/gpu/drm/arm/malidp_drv.c
> @@ -368,7 +368,7 @@ malidp_verify_afbc_framebuffer(struct drm_device *dev, struct drm_file *file,
> return false;
> }
>
> -struct drm_framebuffer *
> +static struct drm_framebuffer *
> malidp_fb_create(struct drm_device *dev, struct drm_file *file,
> const struct drm_mode_fb_cmd2 *mode_cmd)
> {
> @@ -491,9 +491,9 @@ void malidp_error(struct malidp_drm *malidp,
> spin_unlock_irqrestore(&malidp->errors_lock, irqflags);
> }
>
> -void malidp_error_stats_dump(const char *prefix,
> - struct malidp_error_stats error_stats,
> - struct seq_file *m)
> +static void malidp_error_stats_dump(const char *prefix,
> + struct malidp_error_stats error_stats,
> + struct seq_file *m)
> {
> seq_printf(m, "[%s] num_errors : %d\n", prefix,
> error_stats.num_errors);
> @@ -665,7 +665,7 @@ static ssize_t core_id_show(struct device *dev, struct device_attribute *attr,
> return snprintf(buf, PAGE_SIZE, "%08x\n", malidp->core_id);
> }
>
> -DEVICE_ATTR_RO(core_id);
> +static DEVICE_ATTR_RO(core_id);
>
> static int malidp_init_sysfs(struct device *dev)
> {
> --
> 2.23.0
>
--
====================
| I would like to |
| fix the world, |
| but they're not |
| giving me the |
\ source code! /
---------------
¯\_(ツ)_/¯
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-18 9:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-17 11:17 [PATCH] drm/arm: make undeclared items static Ben Dooks (Codethink)
2019-10-18 9:49 ` Liviu Dudau
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).