lkml.org 
[lkml]   [2008]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: sparc: struct device - replace bus_id with dev_name(), dev_set_name()
From
From: "Kay Sievers" <kay.sievers@vrfy.org>
Date: Fri, 7 Nov 2008 09:33:16 +0100

> On Fri, Nov 7, 2008 at 08:35, David Miller <davem@davemloft.net> wrote:
> > From: Kay Sievers <kay.sievers@vrfy.org>
> > Date: Fri, 07 Nov 2008 01:43:59 +0100
> >
> >> --- a/arch/sparc64/kernel/vio.c
> >> +++ b/arch/sparc64/kernel/vio.c
> >> @@ -224,7 +224,7 @@ static struct vio_dev *vio_create_one(st
> >> if (!strcmp(type, "domain-services-port"))
> >> bus_id_name = "ds";
> >>
> >> - if (strlen(bus_id_name) >= BUS_ID_SIZE - 4) {
> >> + if (strlen(bus_id_name) >= 20 - 4) {
> >> printk(KERN_ERR "VIO: bus_id_name [%s] is too long.\n",
> >> bus_id_name);
> >> return NULL;
> >>
> >>
> >
> > But I don't like this.
> >
> > Could you please keep the macro around until everything is converted?
> > Then you can remove the test entirely.
> >
> > Leaving it with just constants there is inviting confusion, no matter
> > how short amount of time it will be there.
>
> I can add a SPARC_BUS_ID_SIZE, to that file, or in a sparc header, but
> the core will not provide any such value, and have to, go to catch all
> remaining occurrences across the tree. Where should I add it?

You should keep BUS_ID_SIZE in the device.h header or wherever it is
now.

Then it's a simply grep to kill that off and all the references (and
you have to systematically eliminate these no-longer-needed tests
anyways) in one fell swoop.

Otherwise someone will have to grep for "20" (!!) in order to do that
cleanup.


\
 
 \ /
  Last update: 2008-11-07 10:41    [W:0.096 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site