Patchwork uninorth agp: don't mark module parameter __devinit

login
register
mail settings
Submitter Johannes Berg
Date Oct. 29, 2008, 2:11 a.m.
Message ID <1225246284.1369.31.camel@johannes.berg>
Download mbox | patch
Permalink /patch/6244/
State Accepted, archived
Commit b0385146bcdd24b0390c2b60fd05a083888835db
Headers show

Comments

Johannes Berg - Oct. 29, 2008, 2:11 a.m.
A module parameter can possibly be shown via sysfs, which isn't a good
idea if the section has been removed, so remove the __devinit
annotation.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
Also fixes a section mismatch warning.
Michel Dänzer - Oct. 29, 2008, 12:09 p.m.
On Wed, 2008-10-29 at 03:11 +0100, Johannes Berg wrote:
> A module parameter can possibly be shown via sysfs, which isn't a good
> idea if the section has been removed, so remove the __devinit
> annotation.

Under what circumstances could it be shown in sysfs?
Johannes Berg - Oct. 29, 2008, 12:12 p.m.
On Wed, 2008-10-29 at 13:09 +0100, Michel Dänzer wrote:
> On Wed, 2008-10-29 at 03:11 +0100, Johannes Berg wrote:
> > A module parameter can possibly be shown via sysfs, which isn't a good
> > idea if the section has been removed, so remove the __devinit
> > annotation.
> 
> Under what circumstances could it be shown in sysfs?

Sorry, my mistake, I overlooked that it had 0 permission:
module_param(aperture, charp, 0);

otherwise it would of course be in sysfs.

Can uninorth_fetch_size be marked __devinit then?

johannes
Michel Dänzer - Oct. 29, 2008, 4:34 p.m.
On Wed, 2008-10-29 at 13:12 +0100, Johannes Berg wrote:
> On Wed, 2008-10-29 at 13:09 +0100, Michel Dänzer wrote:
> > On Wed, 2008-10-29 at 03:11 +0100, Johannes Berg wrote:
> > > A module parameter can possibly be shown via sysfs, which isn't a good
> > > idea if the section has been removed, so remove the __devinit
> > > annotation.
> > 
> > Under what circumstances could it be shown in sysfs?
> 
> Sorry, my mistake, I overlooked that it had 0 permission:
> module_param(aperture, charp, 0);
> 
> otherwise it would of course be in sysfs.
> 
> Can uninorth_fetch_size be marked __devinit then?

I'm not sure, and none of the other AGP backend drivers seems to do
so...
Johannes Berg - Oct. 30, 2008, 8:45 a.m.
Michel Dänzer wrote:

>> Can uninorth_fetch_size be marked __devinit then?
>
> I'm not sure, and none of the other AGP backend drivers seems to do
> so...

Well, either it can, or marking "aperture" is wrong, no?

johannes
Michel Dänzer - Oct. 30, 2008, 8:50 a.m.
On Thu, 2008-10-30 at 09:45 +0100, Johannes Berg wrote:
> Michel Dänzer wrote:
> 
> >> Can uninorth_fetch_size be marked __devinit then?
> >
> > I'm not sure, and none of the other AGP backend drivers seems to do
> > so...
> 
> Well, either it can, or marking "aperture" is wrong, no?

Makes sense, but I'm not sure about all the conditions and implications
involved.

Patch

--- everything.orig/drivers/char/agp/uninorth-agp.c	2008-10-29 03:07:26.000000000 +0100
+++ everything/drivers/char/agp/uninorth-agp.c	2008-10-29 03:08:16.000000000 +0100
@@ -27,7 +27,7 @@ 
 static int uninorth_rev;
 static int is_u3;
 
-static char __devinitdata *aperture = NULL;
+static char *aperture = NULL;
 
 static int uninorth_fetch_size(void)
 {