From: Jaswinder Singh Rajput <jaswinder@kernel.org>
To: Hannes Eder <hannes@hanneseder.net>
Cc: dri-devel@lists.sourceforge.net, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] drivers/gpu/drm: fix sparse warnings: unexport symbols
Date: Sun, 18 Jan 2009 21:48:19 +0530 [thread overview]
Message-ID: <1232295499.24415.11.camel@localhost.localdomain> (raw)
In-Reply-To: <154e089b0901180804k46e9411lcbc10f591871b14@mail.gmail.com>
On Sun, 2009-01-18 at 17:04 +0100, Hannes Eder wrote:
> >> /**
> >> diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
> >> index 7c36f16..c0cfe39 100644
> >> --- a/drivers/gpu/drm/drm_modes.c
> >> +++ b/drivers/gpu/drm/drm_modes.c
> >> @@ -357,9 +357,9 @@ EXPORT_SYMBOL(drm_mode_validate_size);
> >> * sure each mode falls within a given range (defined by @min and @max
> >> * arrays) and sets @mode->status as needed.
> >> */
> >> -void drm_mode_validate_clocks(struct drm_device *dev,
> >> - struct list_head *mode_list,
> >> - int *min, int *max, int n_ranges)
> >> +static void drm_mode_validate_clocks(struct drm_device *dev,
> >> + struct list_head *mode_list,
> >> + int *min, int *max, int n_ranges)
> >> {
> >> struct drm_display_mode *mode;
> >> int i;
> >> @@ -376,7 +376,6 @@ void drm_mode_validate_clocks(struct drm_device *dev,
> >> mode->status = MODE_CLOCK_RANGE;
> >> }
> >> }
> >> -EXPORT_SYMBOL(drm_mode_validate_clocks);
> >
> > ??
>
> In both cases: a grep over the entire kernel tree shows that the
> function is only used within the compilation unit it is defined,
> therefore make it static and un-EXPORT it.
If it is EXPORTED you cannot make it static. EXPORTED means it can be
used from a kernel module.
you need to define the declaration of these functions on related header
file to fix these sparse warnings.
--
JSR
next prev parent reply other threads:[~2009-01-18 16:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-18 15:28 [PATCH 0/3] drivers/gpu/drm: fix (sparse) warnings Hannes Eder
2009-01-18 15:28 ` [PATCH 1/3] drivers/gpu/drm: fix sparse warnings: make symbols static Hannes Eder
2009-02-27 0:54 ` Hannes Eder
2009-01-18 15:28 ` [PATCH 2/3] drivers/gpu/drm: fix sparse warnings: unexport symbols Hannes Eder
2009-01-18 15:56 ` Jaswinder Singh Rajput
2009-01-18 16:04 ` Hannes Eder
2009-01-18 16:11 ` Julia Lawall
2009-01-18 17:42 ` Hannes Eder
2009-01-18 16:18 ` Jaswinder Singh Rajput [this message]
2009-01-18 15:28 ` [PATCH 3/3] drivers/gpu/drm: comment out dead code Hannes Eder
2009-02-27 0:55 ` Hannes Eder
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=1232295499.24415.11.camel@localhost.localdomain \
--to=jaswinder@kernel.org \
--cc=dri-devel@lists.sourceforge.net \
--cc=hannes@hanneseder.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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