Messages in this thread | | | From | Jim Cromie <> | Date | Wed, 20 Oct 2010 14:36:17 -0600 | Subject | Re: [PATCH] drivers/hwmon: Use pr_fmt and pr_<level> |
| |
On Wed, Oct 20, 2010 at 1:59 PM, Joe Perches <joe@perches.com> wrote: > On Wed, 2010-10-20 at 12:52 -0700, Joe Perches wrote: >> So perhaps add this to include/linux/hwmon.h instead: >> #if defined pr_fmt >> #undef pr_fmt >> #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt >> #endif > > Nope. That won't work as other non-hwmon files include it. > > drivers/platform/x86/eeepc-laptop.c:#include <linux/hwmon.h> > drivers/platform/x86/compal-laptop.c:#include <linux/hwmon.h> > drivers/platform/x86/thinkpad_acpi.c:#include <linux/hwmon.h> > drivers/thermal/thermal_sys.c:#include <linux/hwmon.h> > drivers/staging/iio/light/tsl2563.c:#include <linux/hwmon.h> > drivers/gpu/drm/radeon/radeon_pm.c:#include <linux/hwmon.h> > drivers/gpu/drm/nouveau/nouveau_pm.c:#include <linux/hwmon.h> > drivers/acpi/power_meter.c:#include <linux/hwmon.h> > drivers/input/touchscreen/ads7846.c:#include <linux/hwmon.h> > > >
what about modules.h ? or device.h ?
Id think that would cover many users without being universally inadequate, and Id guess one of those (or a neighbor) would cover most of the use-cases.
youve got a list of 200 pr-fmt users, why not break them down by which format theyre using, and see if those formats line up with subsystems. Id think 6 or 7 definitions in the appropriate headers would give useful log-content, and avoid countless changes.
KBUILD_MODNAME is always #defined by the make system. so if your defn built upon that, it would address all code that builds as modules, how many other use-cases are there ? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |