From: Andrew Morton on
On Wed, 3 Mar 2010 22:27:23 -0800 Joe Perches <joe(a)perches.com> wrote:

> Save ~60k in a defconfig
>
> Use %pV and struct va_format
> Format arguments are verified before printk

Well that doesn't work very well.

drivers/net/pcmcia/pcnet_cs.c:117: error: 'dev_info' redeclared as different kind of symbol
include/linux/device.h:645: error: previous declaration of 'dev_info' was here

there are lots of other dev_info's which will fail plus perhaps
dev_err's, etc.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Andrew Morton on
On Thu, 4 Mar 2010 16:56:09 -0800 Andrew Morton <akpm(a)linux-foundation.org> wrote:

> On Wed, 3 Mar 2010 22:27:23 -0800 Joe Perches <joe(a)perches.com> wrote:
>
> > Save ~60k in a defconfig
> >
> > Use %pV and struct va_format
> > Format arguments are verified before printk
>
> Well that doesn't work very well.
>
> drivers/net/pcmcia/pcnet_cs.c:117: error: 'dev_info' redeclared as different kind of symbol
> include/linux/device.h:645: error: previous declaration of 'dev_info' was here
>
> there are lots of other dev_info's which will fail plus perhaps
> dev_err's, etc.
>

btw, this may be kludgeable aroundable by doing

int _dev_info(const struct device *dev, const char *fmt, ...);

#define dev_info(...) _dev_info(...)

which will use the preprocessor's separation of `foo' from `foo()' to
fix things up.

But it would be better to rename all those dev_info's to device_info or
whatever, IMO.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Joe Perches on
dOn Thu, 2010-03-04 at 17:00 -0800, Andrew Morton wrote:
> On Thu, 4 Mar 2010 16:56:09 -0800 Andrew Morton <akpm(a)linux-foundation.org> wrote:
> > On Wed, 3 Mar 2010 22:27:23 -0800 Joe Perches <joe(a)perches.com> wrote:
> > > Save ~60k in a defconfig
> > > Use %pV and struct va_format
> > > Format arguments are verified before printk
> > Well that doesn't work very well.
> >
> > drivers/net/pcmcia/pcnet_cs.c:117: error: 'dev_info' redeclared as different kind of symbol
> > include/linux/device.h:645: error: previous declaration of 'dev_info' was here
> >
> > there are lots of other dev_info's which will fail plus perhaps
> > dev_err's, etc.
> >
> btw, this may be kludgeable aroundable by doing
>
> int _dev_info(const struct device *dev, const char *fmt, ...);
>
> #define dev_info(...) _dev_info(...)
>
> which will use the preprocessor's separation of `foo' from `foo()' to
> fix things up.
>
> But it would be better to rename all those dev_info's to device_info or
> whatever, IMO.

Perhaps using the function name _dev_info() and adding
the macro above is an acceptable workaround until the
dev_info struct names or local variable names could be
renamed if necessary.

dev_err and dev_warn exist in source comments only and
don't seem to be a problem.

David Miller? Do you have an opinion on the renaming
of dev_info local variables and structs?

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Andrew Morton on
On Thu, 4 Mar 2010 22:56:53 -0800 Joe Perches <joe(a)perches.com> wrote:

> Perhaps over time the struct and local uses of dev_info should be renamed.

aww, c'mon.

y:/usr/src/linux-2.6.33> grep -r '\*dev_info;' . | wc -l
30

Half an hour, tops.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Andrew Morton on
On Thu, 04 Mar 2010 23:23:35 -0800 Joe Perches <joe(a)perches.com> wrote:

> On Thu, 2010-03-04 at 23:10 -0800, Andrew Morton wrote:
> > On Thu, 4 Mar 2010 22:56:53 -0800 Joe Perches <joe(a)perches.com> wrote:
> > > Perhaps over time the struct and local uses of dev_info should be renamed.
> > aww, c'mon.
> > y:/usr/src/linux-2.6.33> grep -r '\*dev_info;' . | wc -l
> > 30
>
> No doubt I could submit all the required changes in
> an hour or so, but some of the maintainers seem
> less than open to what they consider "churn".

Well, that has to be one of the worst possible reasons?

> $ grep -rP --include=*.[ch] -l "dev_info\b\s*[^\(]" *
> arch/powerpc/platforms/iseries/dt.c
> drivers/usb/host/xhci-dbg.c
> drivers/usb/host/xhci.h
> drivers/usb/wusbcore/wusbhc.h
> drivers/scsi/scsi_devinfo.c
> drivers/staging/comedi/drivers/das08_cs.c
> drivers/staging/comedi/drivers/ni_daq_dio24.c
> drivers/staging/comedi/drivers/quatech_daqp_cs.c
> drivers/staging/comedi/drivers/ni_daq_700.c
> drivers/staging/comedi/drivers/ni_labpc_cs.c
> drivers/staging/comedi/drivers/cb_das16_cs.c
> drivers/staging/udlfb/udlfb.c
> drivers/media/video/sh_mobile_ceu_camera.c
> drivers/md/linear.h
> drivers/net/ksz884x.c
> drivers/net/bnx2x_link.c
> drivers/net/wireless/wl3501_cs.c
> drivers/net/cnic.c
> drivers/net/bnx2x_main.c
> include/linux/sfi.h
> include/net/bluetooth/rfcomm.h

Send 'em over, please. I'll merge any stragglers directly.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/