public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 6/6] drm/i915: add prototype for 'intelfb_panic' to header file
@ 2008-12-18 21:32 Hannes Eder
  2008-12-18 23:40 ` Jesse Barnes
  0 siblings, 1 reply; 3+ messages in thread
From: Hannes Eder @ 2008-12-18 21:32 UTC (permalink / raw)
  To: David Airlie; +Cc: dri-devel, linux-kernel, kernel-janitors

Fix this sparse warning:

  drivers/gpu/drm/i915/intel_fb.c:417:5: warning: symbol 'intelfb_panic' was not declared. Should it be static?

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
---
 drivers/gpu/drm/i915/intel_drv.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 407edd5..b8ae5ce 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -135,6 +135,8 @@ extern void intel_sdvo_set_hotplug(struct drm_connector *connector, int enable);
 extern int intelfb_probe(struct drm_device *dev);
 extern int intelfb_remove(struct drm_device *dev, struct drm_framebuffer *fb);
 extern int intelfb_resize(struct drm_device *dev, struct drm_crtc *crtc);
+extern int intelfb_panic(struct notifier_block *n, unsigned long ununsed,
+			 void *panic_str);
 extern void intelfb_restore(void);
 extern void intel_crtc_fb_gamma_set(struct drm_crtc *crtc, u16 red, u16 green,
 				    u16 blue, int regno);
-- 
1.5.6.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 6/6] drm/i915: add prototype for 'intelfb_panic' to header file
  2008-12-18 21:32 [PATCH 6/6] drm/i915: add prototype for 'intelfb_panic' to header file Hannes Eder
@ 2008-12-18 23:40 ` Jesse Barnes
  2008-12-19 11:34   ` [PATCH v2 6/6] drm/i915: un-EXPORT and make 'intelfb_panic' static Hannes Eder
  0 siblings, 1 reply; 3+ messages in thread
From: Jesse Barnes @ 2008-12-18 23:40 UTC (permalink / raw)
  To: dri-devel; +Cc: Hannes Eder, David Airlie, kernel-janitors, linux-kernel

On Thursday, December 18, 2008 1:32 pm Hannes Eder wrote:
> Fix this sparse warning:
>
>   drivers/gpu/drm/i915/intel_fb.c:417:5: warning: symbol 'intelfb_panic'
> was not declared. Should it be static?

Yep, this one should be static instead (I think, just double checking now to 
make sure it's not used elsewhere, iirc it's not).

-- 
Jesse Barnes, Intel Open Source Technology Center


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v2 6/6] drm/i915: un-EXPORT and make 'intelfb_panic' static
  2008-12-18 23:40 ` Jesse Barnes
@ 2008-12-19 11:34   ` Hannes Eder
  0 siblings, 0 replies; 3+ messages in thread
From: Hannes Eder @ 2008-12-19 11:34 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: David Airlie, dri-devel, linux-kernel, kernel-janitors

Fix this sparse warning:

  drivers/gpu/drm/i915/intel_fb.c:417:5: warning: symbol 'intelfb_panic' was not declared. Should it be static?

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
---

On Fri, Dec 19, 2008 at 12:40 AM, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> On Thursday, December 18, 2008 1:32 pm Hannes Eder wrote:
>> Fix this sparse warning:
>>
>>   drivers/gpu/drm/i915/intel_fb.c:417:5: warning: symbol 'intelfb_panic'
>> was not declared. Should it be static?
>
> Yep, this one should be static instead (I think, just double checking now to
> make sure it's not used elsewhere, iirc it's not).

Ok, so let's make the function static and there is no need to EXPORT
it, which wouldn't work for a static function anyway.

When is it safe to un-EXPORT a function?  When it is only referenced
within the translation unit it is defined in?  But it could be
referenced from outside the kernel source, or?


 drivers/gpu/drm/i915/intel_fb.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_fb.c b/drivers/gpu/drm/i915/intel_fb.c
index 12664c3..bbf6fe0 100644
--- a/drivers/gpu/drm/i915/intel_fb.c
+++ b/drivers/gpu/drm/i915/intel_fb.c
@@ -414,15 +414,14 @@ EXPORT_SYMBOL(intelfb_resize);
 
 static struct drm_mode_set kernelfb_mode;
 
-int intelfb_panic(struct notifier_block *n, unsigned long ununsed,
-		  void *panic_str)
+static int intelfb_panic(struct notifier_block *n, unsigned long ununsed,
+			 void *panic_str)
 {
 	DRM_ERROR("panic occurred, switching back to text console\n");
 
 	intelfb_restore();
 	return 0;
 }
-EXPORT_SYMBOL(intelfb_panic);
 
 static struct notifier_block paniced = {
 	.notifier_call = intelfb_panic,
-- 
1.5.6.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-12-19 11:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-18 21:32 [PATCH 6/6] drm/i915: add prototype for 'intelfb_panic' to header file Hannes Eder
2008-12-18 23:40 ` Jesse Barnes
2008-12-19 11:34   ` [PATCH v2 6/6] drm/i915: un-EXPORT and make 'intelfb_panic' static Hannes Eder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox