Prev: drivers/net/enic: Use %pUB to format a UUID
Next: davinci_emac: Fix use after free in davinci_emac_remove
From: Dmitry Torokhov on 4 Aug 2010 00:40 Hi Joe, On Tue, Aug 03, 2010 at 11:40:50AM -0700, Joe Perches wrote: > Remove prefixes from printks and convert to pr_fmt/pr_<level>. > > Always make output prefix match module name. > There are some existing uses that do not. For instance: > spaceorb used "input: " once, probably a copy/paste error, > newtonkbd as well. Synaptics used "serio: ", etc. > > A few miscellaneous typos corrected. > Converted a few uses of usb macros err to pr_err. > > Compiled x86 only, some files not compile tested > Thanks for doing this, however instead of using pr_xxx() I'd like drivers that are integrated in driver model (serio, usb, gameport, etc, i.e. when we have 'struct device' available, exept for psmouse) to use drv_xxx() instead. > > diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c > index 8c32440..e02c2a7 100644 > --- a/drivers/input/mouse/synaptics.c > +++ b/drivers/input/mouse/synaptics.c > @@ -23,6 +23,8 @@ > * Trademarks are the property of their respective owners. > */ > > +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > + That would make synaptics messages to come as "psmouse", right? I think we shoudl use #define pr_fmt(fmt) "synaptics: " fmt here and in the rest of specialized PS/2 protocol handlers. Thanks. -- Dmitry -- 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 4 Aug 2010 03:40 On Tue, 2010-08-03 at 21:32 -0700, Dmitry Torokhov wrote: > Hi Joe, Hi Dmitry. > On Tue, Aug 03, 2010 at 11:40:50AM -0700, Joe Perches wrote: > > Remove prefixes from printks and convert to pr_fmt/pr_<level>. > Thanks for doing this, however instead of using pr_xxx() I'd like > drivers that are integrated in driver model (serio, usb, gameport, etc, > i.e. when we have 'struct device' available, exept for psmouse) to use > drv_xxx() instead. These files? $ grep -rPl --include=*.[ch] "\bstruct\s+device\b" drivers/input | \ xargs grep -wl pr_fmt drivers/input/keyboard/omap-keypad.c drivers/input/mousedev.c drivers/input/serio/serio.c drivers/input/serio/i8042.c drivers/input/evdev.c drivers/input/joydev.c drivers/input/gameport/gameport.c drivers/input/touchscreen/htcpen.c drivers/input/input-polldev.c drivers/input/input.c drivers/input/tablet/aiptek.c drivers/input/misc/winbond-cir.c drivers/input/misc/yealink.c drivers/input/misc/ati_remote2.c drivers/input/misc/wistron_btns.c drivers/input/misc/ati_remote.c drivers/input/mouse/psmouse-base.c > That would make synaptics messages to come as "psmouse", right? Yes. > I think we should use > #define pr_fmt(fmt) "synaptics: " fmt > here and in the rest of specialized PS/2 protocol handlers. Perhaps convert to what elantech uses #define pr_fmt(fmt) KBUILD_BASENAME ": " fmt $ grep -l "define pr_fmt" drivers/input/mouse/*.[ch] | \ xargs grep -il "ps2" drivers/input/mouse/alps.c drivers/input/mouse/elantech.c drivers/input/mouse/lifebook.c drivers/input/mouse/logips2pp.c drivers/input/mouse/psmouse-base.c drivers/input/mouse/sentelic.c drivers/input/mouse/synaptics.c drivers/input/mouse/trackpoint.c Which ones do you want converted? Any others? -- 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: Dmitry Torokhov on 4 Aug 2010 04:10 On Wed, Aug 04, 2010 at 12:33:42AM -0700, Joe Perches wrote: > On Tue, 2010-08-03 at 21:32 -0700, Dmitry Torokhov wrote: > > Hi Joe, > > Hi Dmitry. > > > On Tue, Aug 03, 2010 at 11:40:50AM -0700, Joe Perches wrote: > > > Remove prefixes from printks and convert to pr_fmt/pr_<level>. > > Thanks for doing this, however instead of using pr_xxx() I'd like > > drivers that are integrated in driver model (serio, usb, gameport, etc, > > i.e. when we have 'struct device' available, exept for psmouse) to use > > drv_xxx() instead. > > These files? > $ grep -rPl --include=*.[ch] "\bstruct\s+device\b" drivers/input | \ > xargs grep -wl pr_fmt > drivers/input/keyboard/omap-keypad.c > drivers/input/mousedev.c > drivers/input/serio/serio.c > drivers/input/serio/i8042.c > drivers/input/evdev.c > drivers/input/joydev.c > drivers/input/gameport/gameport.c > drivers/input/touchscreen/htcpen.c > drivers/input/input-polldev.c > drivers/input/input.c > drivers/input/tablet/aiptek.c > drivers/input/misc/winbond-cir.c > drivers/input/misc/yealink.c > drivers/input/misc/ati_remote2.c > drivers/input/misc/wistron_btns.c > drivers/input/misc/ati_remote.c > drivers/input/mouse/psmouse-base.c There should be more. USB for example. Basically anything but very old legacy drivers that never been converted to the 2.6 device model. > > > That would make synaptics messages to come as "psmouse", right? > > Yes. > > > I think we should use > > #define pr_fmt(fmt) "synaptics: " fmt > > here and in the rest of specialized PS/2 protocol handlers. > > Perhaps convert to what elantech uses > #define pr_fmt(fmt) KBUILD_BASENAME ": " fmt > > $ grep -l "define pr_fmt" drivers/input/mouse/*.[ch] | \ > xargs grep -il "ps2" > drivers/input/mouse/alps.c > drivers/input/mouse/elantech.c > drivers/input/mouse/lifebook.c > drivers/input/mouse/logips2pp.c > drivers/input/mouse/psmouse-base.c psmouse-base should use KBUILD_MODNAME, for the rest of these KBUILD_BASENAME seems to fit. > drivers/input/mouse/sentelic.c > drivers/input/mouse/synaptics.c > drivers/input/mouse/trackpoint.c > > Which ones do you want converted? > Any others? > No, I think this is it as far as PS/2 mice go. -- Dmitry -- 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 4 Aug 2010 04:50 On Wed, 2010-08-04 at 01:04 -0700, Dmitry Torokhov wrote: > On Wed, Aug 04, 2010 at 12:33:42AM -0700, Joe Perches wrote: > > On Tue, 2010-08-03 at 21:32 -0700, Dmitry Torokhov wrote: > > > On Tue, Aug 03, 2010 at 11:40:50AM -0700, Joe Perches wrote: > > > > Remove prefixes from printks and convert to pr_fmt/pr_<level>. > > > Thanks for doing this, however instead of using pr_xxx() I'd like > > > drivers that are integrated in driver model (serio, usb, gameport, etc, > > > i.e. when we have 'struct device' available, exept for psmouse) to use > > > drv_xxx() instead. > > These files? > > $ grep -rPl --include=*.[ch] "\bstruct\s+device\b" drivers/input | \ > > xargs grep -wl pr_fmt > > drivers/input/keyboard/omap-keypad.c > > drivers/input/mousedev.c > > drivers/input/serio/serio.c > > drivers/input/serio/i8042.c > > drivers/input/evdev.c > > drivers/input/joydev.c > > drivers/input/gameport/gameport.c > > drivers/input/touchscreen/htcpen.c > > drivers/input/input-polldev.c > > drivers/input/input.c > > drivers/input/tablet/aiptek.c > > drivers/input/misc/winbond-cir.c > > drivers/input/misc/yealink.c > > drivers/input/misc/ati_remote2.c > > drivers/input/misc/wistron_btns.c > > drivers/input/misc/ati_remote.c > > drivers/input/mouse/psmouse-base.c > There should be more. USB for example. Basically anything but very old > legacy drivers that never been converted to the 2.6 device model. I propose you take the patch as-is and then conversions from pr_<level>(...) to dev_<level>(struct device *, ...) can be done as appropriate. > > $ grep -l "define pr_fmt" drivers/input/mouse/*.[ch] | \ > > xargs grep -il "ps2" > > drivers/input/mouse/alps.c > > drivers/input/mouse/elantech.c > > drivers/input/mouse/lifebook.c > > drivers/input/mouse/logips2pp.c > > drivers/input/mouse/psmouse-base.c > psmouse-base should use KBUILD_MODNAME, for the rest of these > KBUILD_BASENAME seems to fit. > > drivers/input/mouse/sentelic.c > > drivers/input/mouse/synaptics.c > > drivers/input/mouse/trackpoint.c > > > > Which ones do you want converted? > > Any others? > >No, I think this is it as far as PS/2 mice go. OK, done. Do you want a diff from the original, a new single patch or patches by directory? ie: drivers/input/gameport drivers/input/joystick drivers/input/keyboard drivers/input/misc drivers/input/mouse drivers/input/serio drivers/input/tablet drivers/input/touchscreen drivers/input -- 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: Dmitry Torokhov on 5 Aug 2010 02:50
On Wednesday, August 04, 2010 01:44:32 am Joe Perches wrote: > On Wed, 2010-08-04 at 01:04 -0700, Dmitry Torokhov wrote: > > On Wed, Aug 04, 2010 at 12:33:42AM -0700, Joe Perches wrote: > > > On Tue, 2010-08-03 at 21:32 -0700, Dmitry Torokhov wrote: > > > > > > These files? > > > $ grep -rPl --include=*.[ch] "\bstruct\s+device\b" drivers/input | \ > > > > > > xargs grep -wl pr_fmt > > > > > > drivers/input/keyboard/omap-keypad.c > > > drivers/input/mousedev.c > > > drivers/input/serio/serio.c > > > drivers/input/serio/i8042.c > > > drivers/input/evdev.c > > > drivers/input/joydev.c > > > drivers/input/gameport/gameport.c > > > drivers/input/touchscreen/htcpen.c > > > drivers/input/input-polldev.c > > > drivers/input/input.c > > > drivers/input/tablet/aiptek.c > > > drivers/input/misc/winbond-cir.c > > > drivers/input/misc/yealink.c > > > drivers/input/misc/ati_remote2.c > > > drivers/input/misc/wistron_btns.c > > > drivers/input/misc/ati_remote.c > > > drivers/input/mouse/psmouse-base.c > > > > There should be more. USB for example. Basically anything but very old > > legacy drivers that never been converted to the 2.6 device model. > > I propose you take the patch as-is and then conversions > from pr_<level>(...) to dev_<level>(struct device *, ...) > can be done as appropriate. > > > > $ grep -l "define pr_fmt" drivers/input/mouse/*.[ch] | \ > > > > > > xargs grep -il "ps2" > > > > > > drivers/input/mouse/alps.c > > > drivers/input/mouse/elantech.c > > > drivers/input/mouse/lifebook.c > > > drivers/input/mouse/logips2pp.c > > > drivers/input/mouse/psmouse-base.c > > > > psmouse-base should use KBUILD_MODNAME, for the rest of these > > KBUILD_BASENAME seems to fit. > > > > > drivers/input/mouse/sentelic.c > > > drivers/input/mouse/synaptics.c > > > drivers/input/mouse/trackpoint.c > > > > > > Which ones do you want converted? > > > Any others? > > > > > >No, I think this is it as far as PS/2 mice go. > > OK, done. > > Do you want a diff from the original, > a new single patch or patches by directory? Split by directories, if possible, please. -- Dmitry -- 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/ |