drivers/hwmon: Use pr_fmt and pr_<level>
Subsystems (15)
PATCH 1/1 drivers/hwmon: Use pr_fmt and pr_<level>
Convert printks to pr_<level>
Coalesce long formats
Removed prefixes from formats
Added #define pr_fmt KBUILD_MODNAME ": " fmt Standardized abitguru messages for reporting and finding MAINTAINER
Compiled x86 allyesconfig only.
I inspected "strings drivers/hwmon/built-in.o",
but it's otherwise untested.
--- drivers/hwmon/abituguru.c | 36 ++++++++++++------------- drivers/hwmon/abituguru3.c | 45 +++++++++++++------------------ drivers/hwmon/adt7470.c | 4 ++- drivers/hwmon/applesmc.c | 60 +++++++++++++++++++----------------------- drivers/hwmon/asb100.c | 9 +++--- drivers/hwmon/asus_atk0110.c | 7 +++-- drivers/hwmon/coretemp.c | 11 ++++--- drivers/hwmon/dme1737.c | 12 ++++---- drivers/hwmon/f71805f.c | 29 +++++++++----------- drivers/hwmon/f71882fg.c | 23 ++++++++------- drivers/hwmon/hp_accel.c | 13 +++++---- drivers/hwmon/hwmon-vid.c | 11 ++++--- drivers/hwmon/hwmon.c | 4 ++- drivers/hwmon/ibmaem.c | 4 ++- drivers/hwmon/it87.c | 30 ++++++++++----------- drivers/hwmon/lis3lv02d.c | 23 +++++++-------- drivers/hwmon/lm70.c | 5 ++- drivers/hwmon/lm78.c | 14 +++++----- drivers/hwmon/pc87360.c | 32 +++++++++------------- drivers/hwmon/pc87427.c | 26 +++++++++--------- drivers/hwmon/pcf8591.c | 5 ++- drivers/hwmon/pkgtemp.c | 7 +++-- drivers/hwmon/sis5595.c | 10 +++--- drivers/hwmon/smsc47b397.c | 13 ++++----- drivers/hwmon/smsc47m1.c | 31 ++++++++++----------- drivers/hwmon/via-cputemp.c | 10 +++--- drivers/hwmon/via686a.c | 10 +++--- drivers/hwmon/vt1211.c | 30 +++++++++------------ drivers/hwmon/vt8231.c | 10 +++--- drivers/hwmon/w83627ehf.c | 23 +++++++--------- drivers/hwmon/w83627hf.c | 17 +++++------ drivers/hwmon/w83781d.c | 29 ++++++++++---------- 32 files changed, 285 insertions(+), 308 deletions(-)
drivers/hwmon/abituguru.c +16 -19
@@ -20,6 +20,9 @@the custom Abit uGuru chip found on Abit uGuru motherboards. Note: because of lack of specs the CPU/RAM voltage & frequency control is not supported! */ + +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/sched.h> #include <linux/init.h>
@@ -220,6 +223,10 @@ struct abituguru_data {u8 pwm_settings[ABIT_UGURU_MAX_PWMS ][5 ]; }; +static const char *never_happen ="This should never happen." ; +static const char *report_this + "Please report this to the abituguru maintainer (see MAINTAINERS)"; +/* wait till the uguru is in the specified state */ static int abituguru_wait (struct abituguru_data *data,u8 state) {
@@ -438,8 +445,7 @@ abituguru_detect_bank1_sensor_type(struct abituguru_data *data,/* Test val is sane / usable for sensor type detection. */ if ((val <10u ) || (val >250u )) { - printk(KERN_WARNING ABIT_UGURU_NAME -": bank1-sensor: %d reading (%d) too close to limits, " +pr_warn ("bank1-sensor: %d reading (%d) too close to limits, " "unable to determine sensor type, skipping sensor\n" , (int )sensor_addr, (int )val);/* assume no sensor is there for sensors for which we can't
@@ -535,10 +541,8 @@ abituguru_detect_bank1_sensor_type_exit: 3) = 3)break ;if (i =3 ) { - printk(KERN_ERR ABIT_UGURU_NAME -": Fatal error could not restore original settings. " -"This should never happen please report this to the " - "abituguru maintainer (see MAINTAINERS)\n"); +pr_err ("Fatal error could not restore original settings. %s %s\n" , + never_happen, report_this);return -ENODEV ; }return ret;
@@ -1268,14 +1272,12 @@ static int __devinit abituguru_probe(struct platform_device *pdev) }/* Fail safe check, this should never happen! */ if (sysfs_names_free <0 ) { - printk(KERN_ERR ABIT_UGURU_NAME ": Fatal error ran out of " -"space for sysfs attr names. This should never " -"happen please report to the abituguru maintainer " - "(see MAINTAINERS)\n"); +pr_err ("Fatal error ran out of space for sysfs attr names. %s %s" , + never_happen, report_this); res = -ENAMETOOLONG ; goto abituguru_probe_error; } - printk(KERN_INFO ABIT_UGURU_NAME ": found Abit uGuru\n"); +pr_info ("found Abit uGuru\n" );/* Register sysfs hooks */ for (i =0 ; i < sysfs_attr_i; i++)
@@ -1432,8 +1434,7 @@ static int __init abituguru_detect(void) "0x%02X\n", (unsigned int)data_val, (unsigned int)cmd_val);if (force) { - printk(KERN_INFO ABIT_UGURU_NAME ": Assuming Abit uGuru is " - "present because of \"force\" parameter\n"); +pr_info ("Assuming Abit uGuru is present because of \"force\" parameter\n" );return ABIT_UGURU_BASE ; }
@@ -1467,8 +1468,7 @@ static int __init abituguru_init(void) abituguru_pdev =platform_device_alloc (ABIT_UGURU_NAME , address);if (!abituguru_pdev) { - printk(KERN_ERR ABIT_UGURU_NAME - ": Device allocation failed\n"); +pr_err ("Device allocation failed\n" ); err = -ENOMEM ; goto exit_driver_unregister; }
@@ -1479,15 +1479,13 @@ static int __init abituguru_init(void) err =platform_device_add_resources (abituguru_pdev, &res,1 );if (err) { - printk(KERN_ERR ABIT_UGURU_NAME - ": Device resource addition failed (%d)\n", err); +pr_err ("Device resource addition failed (%d)\n" , err); goto exit_device_put; } err =platform_device_add (abituguru_pdev);if (err) { - printk(KERN_ERR ABIT_UGURU_NAME - ": Device addition failed (%d)\n", err); +pr_err ("Device addition failed (%d)\n" , err); goto exit_device_put; }
drivers/hwmon/abituguru3.c +18 -26
107 lines not on this page · raw message
drivers/hwmon/adt7470.c +3 -1
@@ -19,6 +19,8 @@* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/jiffies.h> #include <linux/i2c.h>
@@ -274,7 +276,7 @@ static int adt7470_read_temperatures(struct i2c_client *client,i2c_smbus_write_byte_data (client,ADT7470_REG_PWM_CFG (2 ), pwm_cfg[1 ]);if (res) { -printk (KERN_ERR "ha ha, interrupted" ); +pr_err ("ha ha, interrupted\n" );return -EAGAIN ; }
drivers/hwmon/applesmc.c +27 -33
166 lines not on this page · raw message
drivers/hwmon/asb100.c +5 -4
@@ -36,6 +36,8 @@asb100 7 3 1 4 0x31 0x0694 yes no */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/slab.h> #include <linux/i2c.h>
@@ -701,8 +703,7 @@ static int asb100_detect(struct i2c_client *client,int val1, val2;if (!i2c_check_functionality (adapter,I2C_FUNC_SMBUS_BYTE_DATA )) { -pr_debug ("asb100.o: detect failed, " -"smbus byte data not supported!\n" ); +pr_debug ("detect failed, smbus byte data not supported!\n" );return -ENODEV ; }
@@ -715,7 +716,7 @@ static int asb100_detect(struct i2c_client *client, (((!(val1 & 0x80)) && (val2 != 0x94)) || /* Check for ASB100 ID (high byte ) */ ((val1 & 0x80) && (val2 != 0x06)))) { -pr_debug ("asb100: detect failed, bad chip id 0x%02x!\n" , val2); +pr_debug ("detect failed, bad chip id 0x%02x!\n" , val2);return -ENODEV ; }
@@ -744,7 +745,7 @@ static int asb100_probe(struct i2c_client *client, data =kzalloc (sizeof (struct asb100_data ),GFP_KERNEL );if (!data) { -pr_debug ("asb100.o: probe failed, kzalloc failed!\n" ); +pr_debug ("probe failed, kzalloc failed!\n" ); err = -ENOMEM ; goto ERROR0; }
drivers/hwmon/asus_atk0110.c +4 -3
@@ -5,6 +5,8 @@* See COPYING in the top level directory of the kernel tree. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/debugfs.h> #include <linux/kernel.h> #include <linux/hwmon.h>
@@ -1414,14 +1416,13 @@ static int __init atk0110_init(void)/* Make sure it's safe to access the device through ACPI */ if (!acpi_resources_are_enforced ()) { -pr_err ("atk: Resources not safely usable due to " -"acpi_enforce_resources kernel parameter\n" ); +pr_err ("Resources not safely usable due to acpi_enforce_resources kernel parameter\n" );return -EBUSY ; } ret =acpi_bus_register_driver (&atk_driver);if (ret) -pr_info ("atk: acpi_bus_register_driver failed: %d\n" , ret); +pr_info ("acpi_bus_register_driver failed: %d\n" , ret);return ret; }
drivers/hwmon/coretemp.c +6 -5
@@ -20,6 +20,8 @@* 02110-1301 USA. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h>
@@ -445,8 +447,8 @@ static int __cpuinit coretemp_device_add(unsigned int cpu)* without thermal sensors will be filtered out. */ if (!cpu_has (c,X86_FEATURE_DTS )) { - printk(KERN_INFO DRVNAME ": CPU (model=0x%x)" - " has no thermal sensor.\n", c->x86_model); +pr_info ("CPU (model=0x%x) has no thermal sensor\n" , + c->x86_model);return 0 ; }
@@ -466,7 +468,7 @@ static int __cpuinit coretemp_device_add(unsigned int cpu) pdev =platform_device_alloc (DRVNAME , cpu);if (!pdev) { err = -ENOMEM ; - printk(KERN_ERR DRVNAME ": Device allocation failed\n"); +pr_err ("Device allocation failed\n" ); goto exit; }
@@ -478,8 +480,7 @@ static int __cpuinit coretemp_device_add(unsigned int cpu) err =platform_device_add (pdev);if (err) { - printk(KERN_ERR DRVNAME ": Device addition failed (%d)\n", - err); +pr_err ("Device addition failed (%d)\n" , err); goto exit_device_free; }
drivers/hwmon/dme1737.c +6 -6
@@ -25,6 +25,8 @@* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h>
@@ -2446,7 +2448,7 @@ static int __init dme1737_isa_detect(int sio_cip, unsigned short *addr)/* Get the base address of the runtime registers */ if (!(base_addr = (dme1737_sio_inb (sio_cip,0x60 ) <<8 ) |dme1737_sio_inb (sio_cip,0x61 ))) { -printk (KERN_ERR "dme1737: Base address not set.\n" ); +pr_err ("Base address not set\n" ); err = -ENODEV ; goto exit; }
@@ -2475,20 +2477,18 @@ static int __init dme1737_isa_device_add(unsigned short addr) goto exit;if (!(pdev =platform_device_alloc ("dme1737" , addr))) { -printk (KERN_ERR "dme1737: Failed to allocate device.\n" ); +pr_err ("Failed to allocate device\n" ); err = -ENOMEM ; goto exit; }if ((err =platform_device_add_resources (pdev, &res,1 ))) { -printk (KERN_ERR "dme1737: Failed to add device resource " -"(err = %d).\n" , err); +pr_err ("Failed to add device resource (err = %d)\n" , err); goto exit_device_put; }if ((err =platform_device_add (pdev))) { -printk (KERN_ERR "dme1737: Failed to add device (err = %d).\n" , - err); +pr_err ("Failed to add device (err = %d)\n" , err); goto exit_device_put; }
drivers/hwmon/f71805f.c +13 -16
@@ -28,6 +28,8 @@* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h>
@@ -1309,7 +1311,7 @@ static int __devinit f71805f_probe(struct platform_device *pdev)if (!(data =kzalloc (sizeof (struct f71805f_data ),GFP_KERNEL ))) { err = -ENOMEM ; - printk(KERN_ERR DRVNAME ": Out of memory\n"); +pr_err ("Out of memory\n" ); goto exit; }
@@ -1451,7 +1453,7 @@ static int __init f71805f_device_add(unsigned short address, pdev =platform_device_alloc (DRVNAME , address);if (!pdev) { err = -ENOMEM ; - printk(KERN_ERR DRVNAME ": Device allocation failed\n"); +pr_err ("Device allocation failed\n" ); goto exit; }
@@ -1462,22 +1464,20 @@ static int __init f71805f_device_add(unsigned short address, err =platform_device_add_resources (pdev, &res,1 );if (err) { - printk(KERN_ERR DRVNAME ": Device resource addition failed " - "(%d)\n", err); +pr_err ("Device resource addition failed (%d)\n" , err); goto exit_device_put; } err =platform_device_add_data (pdev, sio_data,sizeof (struct f71805f_sio_data ));if (err) { - printk(KERN_ERR DRVNAME ": Platform data allocation failed\n"); +pr_err ("Platform data allocation failed\n" ); goto exit_device_put; } err =platform_device_add (pdev);if (err) { - printk(KERN_ERR DRVNAME ": Device addition failed (%d)\n", - err); +pr_err ("Device addition failed (%d)\n" , err); goto exit_device_put; }
@@ -1516,30 +1516,27 @@ static int __init f71805f_find(int sioaddr, unsigned short *address, sio_data->fnsel1 =superio_inb (sioaddr,SIO_REG_FNSEL1 );break ;default : - printk(KERN_INFO DRVNAME ": Unsupported Fintek device, " - "skipping\n"); +pr_info ("Unsupported Fintek device, skipping\n" ); goto exit; }superio_select (sioaddr,F71805F_LD_HWM );if (!(superio_inb (sioaddr,SIO_REG_ENABLE ) &0x01 )) { - printk(KERN_WARNING DRVNAME ": Device not activated, " - "skipping\n"); +pr_warn ("Device not activated, skipping\n" ); goto exit; } *address =superio_inw (sioaddr,SIO_REG_ADDR );if (*address =0 ) { - printk(KERN_WARNING DRVNAME ": Base address not set, " - "skipping\n"); +pr_warn ("Base address not set, skipping\n" ); goto exit; } *address &= ~(REGION_LENGTH -1 );/* Ignore 3 LSB */ err =0 ; - printk(KERN_INFO DRVNAME ": Found %s chip at %#x, revision %u\n", - names[sio_data->kind], *address, - superio_inb(sioaddr, SIO_REG_DEVREV)); +pr_info ("Found %s chip at %#x, revision %u\n" , + names[sio_data->kind], *address, +superio_inb (sioaddr,SIO_REG_DEVREV )); exit:superio_exit (sioaddr);
drivers/hwmon/f71882fg.c +12 -11
@@ -18,6 +18,8 @@* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h>
@@ -865,8 +867,7 @@ static inline int superio_enter(int base) {/* Don't step on other drivers' I/O space by accident */ if (!request_muxed_region (base,2 ,DRVNAME )) { - printk(KERN_ERR DRVNAME ": I/O address 0x%04x already in use\n", - base); +pr_err ("I/O address 0x%04x already in use\n" , base);return -EBUSY ; }
@@ -2192,7 +2193,7 @@ static int __init f71882fg_find(int sioaddr, unsigned short *address, devid =superio_inw (sioaddr,SIO_REG_MANID );if (devid !=SIO_FINTEK_ID ) { -pr_debug (DRVNAME ": Not a Fintek device\n" ); +pr_debug ("Not a Fintek device\n" ); err = -ENODEV ; goto exit; }
@@ -2215,8 +2216,8 @@ static int __init f71882fg_find(int sioaddr, unsigned short *address, sio_data->type = f8000;break ;default : - printk(KERN_INFO DRVNAME ": Unsupported Fintek device: %04x\n", - (unsigned int)devid); +pr_info ("Unsupported Fintek device: %04x\n" , + (unsigned int )devid); err = -ENODEV ; goto exit; }
@@ -2227,21 +2228,21 @@ static int __init f71882fg_find(int sioaddr, unsigned short *address,superio_select (sioaddr,SIO_F71882FG_LD_HWM );if (!(superio_inb (sioaddr,SIO_REG_ENABLE ) &0x01 )) { - printk(KERN_WARNING DRVNAME ": Device not activated\n"); +pr_warn ("Device not activated\n" ); err = -ENODEV ; goto exit; } *address =superio_inw (sioaddr,SIO_REG_ADDR );if (*address =0 ) { - printk(KERN_WARNING DRVNAME ": Base address not set\n"); +pr_warn ("Base address not set\n" ); err = -ENODEV ; goto exit; } *address &= ~(REGION_LENGTH -1 );/* Ignore 3 LSB */ err =0 ; - printk(KERN_INFO DRVNAME ": Found %s chip at %#x, revision %d\n", +pr_info ("Found %s chip at %#x, revision %d\n" , f71882fg_names[sio_data->type], (unsigned int )*address, (int )superio_inb (sioaddr,SIO_REG_DEVREV )); exit:
@@ -2270,20 +2271,20 @@ static int __init f71882fg_device_add(unsigned short address, err =platform_device_add_resources (f71882fg_pdev, &res,1 );if (err) { - printk(KERN_ERR DRVNAME ": Device resource addition failed\n"); +pr_err ("Device resource addition failed\n" ); goto exit_device_put; } err =platform_device_add_data (f71882fg_pdev, sio_data,sizeof (struct f71882fg_sio_data ));if (err) { - printk(KERN_ERR DRVNAME ": Platform data allocation failed\n"); +pr_err ("Platform data allocation failed\n" ); goto exit_device_put; } err =platform_device_add (f71882fg_pdev);if (err) { - printk(KERN_ERR DRVNAME ": Device addition failed\n"); +pr_err ("Device addition failed\n" ); goto exit_device_put; }
drivers/hwmon/hp_accel.c +7 -6
@@ -20,6 +20,8 @@* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/kernel.h> #include <linux/init.h> #include <linux/dmi.h>
@@ -147,7 +149,7 @@ int lis3lv02d_acpi_write(struct lis3lv02d *lis3, int reg, u8 val)static int lis3lv02d_dmi_matched (const struct dmi_system_id *dmi) { lis3_dev.ac = *((union axis_conversion *)dmi->driver_data); - printk(KERN_INFO DRIVER_NAME ": hardware type %s found.\n", dmi->ident); +pr_info ("hardware type %s found\n" , dmi->ident);return 1 ; }
@@ -303,11 +305,10 @@ static int lis3lv02d_add(struct acpi_device *device)/* If possible use a "standard" axes order */ if (lis3_dev.ac.x && lis3_dev.ac.y && lis3_dev.ac.z) { - printk(KERN_INFO DRIVER_NAME ": Using custom axes %d,%d,%d\n", - lis3_dev.ac.x, lis3_dev.ac.y, lis3_dev.ac.z); +pr_info ("Using custom axes %d,%d,%d\n" , + lis3_dev.ac.x, lis3_dev.ac.y, lis3_dev.ac.z); }else if (dmi_check_system (lis3lv02d_dmi_ids) =0 ) { - printk(KERN_INFO DRIVER_NAME ": laptop model unknown, " - "using default axes configuration\n"); +pr_info ("laptop model unknown, using default axes configuration\n" ); lis3_dev.ac = lis3lv02d_axis_normal; }
@@ -385,7 +386,7 @@ static int __init lis3lv02d_init_module(void)if (ret <0 )return ret; - printk(KERN_INFO DRIVER_NAME " driver loaded.\n"); +pr_info ("driver loaded\n" );return 0 ; }
drivers/hwmon/hwmon-vid.c +6 -5
@@ -22,6 +22,8 @@* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/kernel.h> #include <linux/hwmon-vid.h>
@@ -146,8 +148,8 @@ int vid_from_reg(int val, u8 vrm)return (val >0x77 ?0 : (1500000 - (val *12500 ) +500 ) /1000 );default :/* report 0 for unknown */ if (vrm) -printk (KERN_WARNING "hwmon-vid: Requested unsupported " -"VRM version (%u)\n" , (unsigned int )vrm); +pr_warn ("Requested unsupported VRM version (%u)\n" , + (unsigned int )vrm);return 0 ; } }
@@ -246,8 +248,7 @@ u8 vid_which_vrm(void) } vrm_ret =find_vrm (eff_family, eff_model, eff_stepping, c->x86_vendor);if (vrm_ret =0 ) -printk (KERN_INFO "hwmon-vid: Unknown VRM version of your " -"x86 CPU\n" ); +pr_info ("Unknown VRM version of your x86 CPU\n" );return vrm_ret; }
@@ -255,7 +256,7 @@ u8 vid_which_vrm(void)#else u8 vid_which_vrm (void ) { -printk (KERN_INFO "hwmon-vid: Unknown VRM version of your CPU\n" ); +pr_info ("Unknown VRM version of your CPU\n" );return 0 ; }#endif
drivers/hwmon/hwmon.c +3 -1
@@ -10,6 +10,8 @@the Free Software Foundation; version 2 of the License. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/device.h> #include <linux/err.h>
@@ -119,7 +121,7 @@ static int __init hwmon_init(void) hwmon_class =class_create (THIS_MODULE ,"hwmon" );if (IS_ERR (hwmon_class)) { -printk (KERN_ERR "hwmon.c: couldn't create sysfs class\n" ); +pr_err ("couldn't create sysfs class\n" );return PTR_ERR (hwmon_class); }return 0 ;
drivers/hwmon/ibmaem.c +3 -1
@@ -20,6 +20,8 @@* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/ipmi.h> #include <linux/module.h> #include <linux/hwmon.h>
@@ -1090,7 +1092,7 @@ static int __init aem_init(void) res =driver_register (&aem_driver.driver);if (res) { -printk (KERN_ERR "Can't register aem driver\n" ); +pr_err ("Can't register aem driver\n" );return res; }
drivers/hwmon/it87.c +14 -16
@@ -36,6 +36,8 @@* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h>
@@ -1493,26 +1495,25 @@ static int __init it87_find(unsigned short *address,case 0xffff :/* No device at all */ goto exit;default : -pr_debug (DRVNAME ": Unsupported chip (DEVID=0x%x)\n" , - chip_type); +pr_debug ("Unsupported chip (DEVID=0x%x)\n" , chip_type); goto exit; }superio_select (PME );if (!(superio_inb (IT87_ACT_REG ) &0x01 )) { -pr_info ("it87: Device not activated, skipping\n" ); +pr_info ("Device not activated, skipping\n" ); goto exit; } *address =superio_inw (IT87_BASE_REG ) & ~(IT87_EXTENT -1 );if (*address =0 ) { -pr_info ("it87: Base address not set, skipping\n" ); +pr_info ("Base address not set, skipping\n" ); goto exit; } err =0 ; sio_data->revision =superio_inb (DEVREV ) &0x0f ; -pr_info ("it87: Found IT%04xF chip at 0x%x, revision %d\n" , +pr_info ("Found IT%04xF chip at 0x%x, revision %d\n" , chip_type, *address, sio_data->revision);/* in8 (Vbat) is always internal */
@@ -1533,7 +1534,7 @@ static int __init it87_find(unsigned short *address,/* We need at least 4 VID pins */ reg =superio_inb (IT87_SIO_GPIO3_REG );if (reg &0x0f ) { -pr_info ("it87: VID is disabled (pins used for GPIO)\n" ); +pr_info ("VID is disabled (pins used for GPIO)\n" ); sio_data->skip_vid =1 ; }
@@ -1568,7 +1569,7 @@ static int __init it87_find(unsigned short *address,if (sio_data->type = it8720 && !(reg & (1 <<1 ))) { reg |= (1 <<1 );superio_outb (IT87_SIO_PINX2_REG , reg); -pr_notice ("it87: Routing internal VCCH to in7\n" ); +pr_notice ("Routing internal VCCH to in7\n" ); }if (reg & (1 <<0 )) sio_data->internal |= (1 <<0 );
@@ -1578,7 +1579,7 @@ static int __init it87_find(unsigned short *address, sio_data->beep_pin =superio_inb (IT87_SIO_BEEP_PIN_REG ) &0x3f ; }if (sio_data->beep_pin) -pr_info ("it87: Beeping is supported\n" ); +pr_info ("Beeping is supported\n" );/* Disable specific features based on DMI strings */ board_vendor =dmi_get_system_info (DMI_BOARD_VENDOR );
@@ -1592,8 +1593,7 @@ static int __init it87_find(unsigned short *address,the PWM2 duty cycle, so we disable it. I use the board name string as the trigger in case the same board is ever used in other systems. */ -pr_info ("it87: Disabling pwm2 due to " -"hardware constraints\n" ); +pr_info ("Disabling pwm2 due to hardware constraints\n" ); sio_data->skip_pwm = (1 <<1 ); } }
@@ -2086,28 +2086,26 @@ static int __init it87_device_add(unsigned short address, pdev =platform_device_alloc (DRVNAME , address);if (!pdev) { err = -ENOMEM ; - printk(KERN_ERR DRVNAME ": Device allocation failed\n"); +pr_err ("Device allocation failed\n" ); goto exit; } err =platform_device_add_resources (pdev, &res,1 );if (err) { - printk(KERN_ERR DRVNAME ": Device resource addition failed " - "(%d)\n", err); +pr_err ("Device resource addition failed (%d)\n" , err); goto exit_device_put; } err =platform_device_add_data (pdev, sio_data,sizeof (struct it87_sio_data ));if (err) { - printk(KERN_ERR DRVNAME ": Platform data allocation failed\n"); +pr_err ("Platform data allocation failed\n" ); goto exit_device_put; } err =platform_device_add (pdev);if (err) { - printk(KERN_ERR DRVNAME ": Device addition failed (%d)\n", - err); +pr_err ("Device addition failed (%d)\n" , err); goto exit_device_put; }
drivers/hwmon/lis3lv02d.c +11 -12
@@ -20,6 +20,8 @@* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/kernel.h> #include <linux/init.h> #include <linux/dmi.h>
@@ -673,8 +675,7 @@ static void lis3lv02d_8b_configure(struct lis3lv02d *dev,IRQF_ONESHOT , DRIVER_NAME, &lis3_dev);if (err <0 ) - printk(KERN_ERR DRIVER_NAME -"No second IRQ. Limited functionality\n" ); +pr_err ("No second IRQ. Limited functionality\n" ); } }
@@ -691,7 +692,7 @@ int lis3lv02d_init_device(struct lis3lv02d *dev)switch (dev->whoami) {case WAI_12B : - printk(KERN_INFO DRIVER_NAME ": 12 bits sensor found\n"); +pr_info ("12 bits sensor found\n" ); dev->read_data = lis3lv02d_read_12; dev->mdps_max_val =2048 ; dev->pwron_delay =LIS3_PWRON_DELAY_WAI_12B ;
@@ -700,7 +701,7 @@ int lis3lv02d_init_device(struct lis3lv02d *dev) dev->scale =LIS3_SENSITIVITY_12B ;break ;case WAI_8B : - printk(KERN_INFO DRIVER_NAME ": 8 bits sensor found\n"); +pr_info ("8 bits sensor found\n" ); dev->read_data = lis3lv02d_read_8; dev->mdps_max_val =128 ; dev->pwron_delay =LIS3_PWRON_DELAY_WAI_8B ;
@@ -709,7 +710,7 @@ int lis3lv02d_init_device(struct lis3lv02d *dev) dev->scale =LIS3_SENSITIVITY_8B ;break ;case WAI_3DC : - printk(KERN_INFO DRIVER_NAME ": 8 bits 3DC sensor found\n"); +pr_info ("8 bits 3DC sensor found\n" ); dev->read_data = lis3lv02d_read_8; dev->mdps_max_val =128 ; dev->pwron_delay =LIS3_PWRON_DELAY_WAI_8B ;
@@ -718,8 +719,7 @@ int lis3lv02d_init_device(struct lis3lv02d *dev) dev->scale =LIS3_SENSITIVITY_8B ;break ;default : - printk(KERN_ERR DRIVER_NAME - ": unknown sensor type 0x%X\n", dev->whoami); +pr_err ("unknown sensor type 0x%X\n" , dev->whoami);return -EINVAL ; }
@@ -729,7 +729,7 @@ int lis3lv02d_init_device(struct lis3lv02d *dev)lis3lv02d_poweron (dev);if (lis3lv02d_joystick_enable ()) - printk(KERN_ERR DRIVER_NAME ": joystick initialization failed\n"); +pr_err ("joystick initialization failed\n" );/* passing in platform specific data is purely optional and only * used by the SPI transport layer at the moment */
@@ -745,8 +745,7 @@ int lis3lv02d_init_device(struct lis3lv02d *dev)/* bail if we did not get an IRQ from the bus layer */ if (!dev->irq) { - printk(KERN_ERR DRIVER_NAME - ": No IRQ. Disabling /dev/freefall\n"); +pr_err ("No IRQ. Disabling /dev/freefall\n" ); goto out; }
@@ -772,12 +771,12 @@ int lis3lv02d_init_device(struct lis3lv02d *dev) DRIVER_NAME, &lis3_dev);if (err <0 ) { - printk(KERN_ERR DRIVER_NAME "Cannot get IRQ\n"); +pr_err ("Cannot get IRQ\n" ); goto out; }if (misc_register (&lis3lv02d_misc_device)) - printk(KERN_ERR DRIVER_NAME ": misc_register failed\n"); +pr_err ("misc_register failed\n" ); out:return 0 ; }
drivers/hwmon/lm70.c +3 -2
@@ -24,6 +24,8 @@* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/init.h> #include <linux/module.h> #include <linux/kernel.h>
@@ -67,8 +69,7 @@ static ssize_t lm70_sense_temp(struct device *dev,*/ status =spi_write_then_read (spi,NULL ,0 , &rxbuf[0 ],2 );if (status <0 ) { -printk (KERN_WARNING -"spi_write_then_read failed with status %d\n" , status); +pr_warn ("spi_write_then_read failed with status %d\n" , status); goto out; } raw = (rxbuf[0 ] <<8 ) + rxbuf[1 ];
drivers/hwmon/lm78.c +7 -7
@@ -19,6 +19,8 @@Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h>
@@ -858,7 +860,7 @@ static int __init lm78_isa_found(unsigned short address)* individually for the probing phase. */ for (port = address; port < address +LM78_EXTENT ; port++) {if (!request_region (port,1 ,"lm78" )) { -pr_debug ("lm78: Failed to request port 0x%x\n" , port); +pr_debug ("Failed to request port 0x%x\n" , port); goto release; } }
@@ -920,7 +922,7 @@ static int __init lm78_isa_found(unsigned short address) found =1 ;if (found) -pr_info ("lm78: Found an %s chip at %#x\n" , +pr_info ("Found an %s chip at %#x\n" , val &0x80 ?"LM79" :"LM78" , (int )address); release:
@@ -942,21 +944,19 @@ static int __init lm78_isa_device_add(unsigned short address) pdev =platform_device_alloc ("lm78" , address);if (!pdev) { err = -ENOMEM ; -printk (KERN_ERR "lm78: Device allocation failed\n" ); +pr_err ("Device allocation failed\n" ); goto exit; } err =platform_device_add_resources (pdev, &res,1 );if (err) { -printk (KERN_ERR "lm78: Device resource addition failed " -"(%d)\n" , err); +pr_err ("Device resource addition failed (%d)\n" , err); goto exit_device_put; } err =platform_device_add (pdev);if (err) { -printk (KERN_ERR "lm78: Device addition failed (%d)\n" , - err); +pr_err ("Device addition failed (%d)\n" , err); goto exit_device_put; }
drivers/hwmon/pc87360.c +13 -19
@@ -33,6 +33,8 @@* the standard Super-I/O addresses is used (0x2E/0x2F or 0x4E/0x4F). */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h>
@@ -1031,16 +1033,15 @@ static int __init pc87360_find(int sioaddr, u8 *devid, unsigned short *addresses val =superio_inb (sioaddr,ACT );if (!(val &0x01 )) { -printk (KERN_INFO "pc87360: Device 0x%02x not " -"activated\n" , logdev[i]); +pr_info ("Device 0x%02x not activated\n" , logdev[i]);continue ; } val = (superio_inb (sioaddr,BASE ) <<8 ) |superio_inb (sioaddr,BASE +1 );if (!val) { -printk (KERN_INFO "pc87360: Base address not set for " -"device 0x%02x\n" , logdev[i]); +pr_info ("Base address not set for device 0x%02x\n" , + logdev[i]);continue ; }
@@ -1071,14 +1072,11 @@ static int __init pc87360_find(int sioaddr, u8 *devid, unsigned short *addresses confreg[3 ] =superio_inb (sioaddr,0x25 );if (confreg[2 ] &0x40 ) { -printk (KERN_INFO "pc87360: Using " -"thermistors for temperature " -"monitoring\n" ); +pr_info ("Using thermistors for temperature monitoring\n" ); }if (confreg[3 ] &0xE0 ) { -printk (KERN_INFO "pc87360: VID " -"inputs routed (mode %u)\n" , - confreg[3 ] >>5 ); +pr_info ("VID inputs routed (mode %u)\n" , + confreg[3 ] >>5 ); } } }
@@ -1616,7 +1614,7 @@ static int __init pc87360_device_add(unsigned short address) pdev =platform_device_alloc ("pc87360" , address);if (!pdev) { err = -ENOMEM ; -printk (KERN_ERR "pc87360: Device allocation failed\n" ); +pr_err ("Device allocation failed\n" ); goto exit; }
@@ -1639,15 +1637,13 @@ static int __init pc87360_device_add(unsigned short address) err =platform_device_add_resources (pdev, res, res_count);if (err) { -printk (KERN_ERR "pc87360: Device resources addition failed " -"(%d)\n" , err); +pr_err ("Device resources addition failed (%d)\n" , err); goto exit_device_put; } err =platform_device_add (pdev);if (err) { -printk (KERN_ERR "pc87360: Device addition failed (%d)\n" , - err); +pr_err ("Device addition failed (%d)\n" , err); goto exit_device_put; }
@@ -1666,8 +1662,7 @@ static int __init pc87360_init(void)if (pc87360_find (0x2e , &devid, extra_isa) &&pc87360_find (0x4e , &devid, extra_isa)) { -printk (KERN_WARNING "pc87360: PC8736x not detected, " -"module not inserted.\n" ); +pr_warn ("PC8736x not detected, module not inserted\n" );return -ENODEV ; }
@@ -1680,8 +1675,7 @@ static int __init pc87360_init(void) }if (address =0x0000 ) { -printk (KERN_WARNING "pc87360: No active logical device, " -"module not inserted.\n" ); +pr_warn ("No active logical device, module not inserted\n" );return -ENODEV ; }
drivers/hwmon/pc87427.c +13 -13
@@ -22,6 +22,8 @@* mode, and voltages aren't supported at all. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h>
@@ -1077,7 +1079,7 @@ static int __devinit pc87427_probe(struct platform_device *pdev) data =kzalloc (sizeof (struct pc87427_data ),GFP_KERNEL );if (!data) { err = -ENOMEM ; - printk(KERN_ERR DRVNAME ": Out of memory\n"); +pr_err ("Out of memory\n" ); goto exit; }
@@ -1196,28 +1198,26 @@ static int __init pc87427_device_add(const struct pc87427_sio_data *sio_data) pdev =platform_device_alloc (DRVNAME , res[0 ].start);if (!pdev) { err = -ENOMEM ; - printk(KERN_ERR DRVNAME ": Device allocation failed\n"); +pr_err ("Device allocation failed\n" ); goto exit; } err =platform_device_add_resources (pdev, res, res_count);if (err) { - printk(KERN_ERR DRVNAME ": Device resource addition failed " - "(%d)\n", err); +pr_err ("Device resource addition failed (%d)\n" , err); goto exit_device_put; } err =platform_device_add_data (pdev, sio_data,sizeof (struct pc87427_sio_data ));if (err) { - printk(KERN_ERR DRVNAME ": Platform data allocation failed\n"); +pr_err ("Platform data allocation failed\n" ); goto exit_device_put; } err =platform_device_add (pdev);if (err) { - printk(KERN_ERR DRVNAME ": Device addition failed (%d)\n", - err); +pr_err ("Device addition failed (%d)\n" , err); goto exit_device_put; }
@@ -1249,23 +1249,23 @@ static int __init pc87427_find(int sioaddr, struct pc87427_sio_data *sio_data) val =superio_inb (sioaddr,SIOREG_ACT );if (!(val &0x01 )) { - printk(KERN_INFO DRVNAME ": Logical device 0x%02x " - "not activated\n", logdev[i]); +pr_info ("Logical device 0x%02x not activated\n" , + logdev[i]);continue ; } val =superio_inb (sioaddr,SIOREG_MAP );if (val &0x01 ) { - printk(KERN_WARNING DRVNAME ": Logical device 0x%02x " - "is memory-mapped, can't use\n", logdev[i]); +pr_warn ("Logical device 0x%02x is memory-mapped, can't use\n" , + logdev[i]);continue ; } val = (superio_inb (sioaddr,SIOREG_IOBASE ) <<8 ) |superio_inb (sioaddr,SIOREG_IOBASE +1 );if (!val) { - printk(KERN_INFO DRVNAME ": I/O base address not set " - "for logical device 0x%02x\n", logdev[i]); +pr_info ("I/O base address not set for logical device 0x%02x\n" , + logdev[i]);continue ; } sio_data->address[i] = val;
drivers/hwmon/pcf8591.c +3 -2
@@ -18,6 +18,8 @@Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h>
@@ -290,8 +292,7 @@ static struct i2c_driver pcf8591_driver = {static int __init pcf8591_init (void ) {if (input_mode <0 || input_mode >3 ) { -printk (KERN_WARNING "pcf8591: invalid input_mode (%d)\n" , - input_mode); +pr_warn ("invalid input_mode (%d)\n" , input_mode); input_mode =0 ; }return i2c_add_driver (&pcf8591_driver);
drivers/hwmon/pkgtemp.c +4 -3
@@ -20,6 +20,8 @@* 02110-1301 USA. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h>
@@ -303,7 +305,7 @@ static int __cpuinit pkgtemp_device_add(unsigned int cpu) pdev =platform_device_alloc (DRVNAME , cpu);if (!pdev) { err = -ENOMEM ; - printk(KERN_ERR DRVNAME ": Device allocation failed\n"); +pr_err ("Device allocation failed\n" ); goto exit; }
@@ -315,8 +317,7 @@ static int __cpuinit pkgtemp_device_add(unsigned int cpu) err =platform_device_add (pdev);if (err) { - printk(KERN_ERR DRVNAME ": Device addition failed (%d)\n", - err); +pr_err ("Device addition failed (%d)\n" , err); goto exit_device_free; }
drivers/hwmon/sis5595.c +5 -5
@@ -50,6 +50,8 @@735 0008 0735 */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/slab.h> #include <linux/ioport.h>
@@ -735,21 +737,19 @@ static int __devinit sis5595_device_add(unsigned short address) pdev =platform_device_alloc ("sis5595" , address);if (!pdev) { err = -ENOMEM ; -printk (KERN_ERR "sis5595: Device allocation failed\n" ); +pr_err ("Device allocation failed\n" ); goto exit; } err =platform_device_add_resources (pdev, &res,1 );if (err) { -printk (KERN_ERR "sis5595: Device resource addition failed " -"(%d)\n" , err); +pr_err ("Device resource addition failed (%d)\n" , err); goto exit_device_put; } err =platform_device_add (pdev);if (err) { -printk (KERN_ERR "sis5595: Device addition failed (%d)\n" , - err); +pr_err ("Device addition failed (%d)\n" , err); goto exit_device_put; }
drivers/hwmon/smsc47b397.c +6 -7
@@ -26,6 +26,8 @@Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/slab.h> #include <linux/ioport.h>
@@ -311,21 +313,19 @@ static int __init smsc47b397_device_add(unsigned short address) pdev =platform_device_alloc (DRVNAME , address);if (!pdev) { err = -ENOMEM ; - printk(KERN_ERR DRVNAME ": Device allocation failed\n"); +pr_err ("Device allocation failed\n" ); goto exit; } err =platform_device_add_resources (pdev, &res,1 );if (err) { - printk(KERN_ERR DRVNAME ": Device resource addition failed " - "(%d)\n", err); +pr_err ("Device resource addition failed (%d)\n" , err); goto exit_device_put; } err =platform_device_add (pdev);if (err) { - printk(KERN_ERR DRVNAME ": Device addition failed (%d)\n", - err); +pr_err ("Device addition failed (%d)\n" , err); goto exit_device_put; }
@@ -367,8 +367,7 @@ static int __init smsc47b397_find(unsigned short *addr) *addr = (superio_inb (SUPERIO_REG_BASE_MSB ) <<8 ) |superio_inb (SUPERIO_REG_BASE_LSB ); - printk(KERN_INFO DRVNAME ": found SMSC %s " -"(base address 0x%04x, revision %u)\n" , +pr_info ("found SMSC %s (base address 0x%04x, revision %u)\n" , name, *addr, rev);superio_exit ();
drivers/hwmon/smsc47m1.c +15 -16
@@ -26,6 +26,8 @@Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/slab.h> #include <linux/ioport.h>
@@ -435,30 +437,29 @@ static int __init smsc47m1_find(unsigned short *addr,*/ switch (val) {case 0x51 : -pr_info (DRVNAME ": Found SMSC LPC47B27x\n" ); +pr_info ("Found SMSC LPC47B27x\n" ); sio_data->type = smsc47m1;break ;case 0x59 : -pr_info (DRVNAME ": Found SMSC LPC47M10x/LPC47M112/LPC47M13x\n" ); +pr_info ("Found SMSC LPC47M10x/LPC47M112/LPC47M13x\n" ); sio_data->type = smsc47m1;break ;case 0x5F : -pr_info (DRVNAME ": Found SMSC LPC47M14x\n" ); +pr_info ("Found SMSC LPC47M14x\n" ); sio_data->type = smsc47m1;break ;case 0x60 : -pr_info (DRVNAME ": Found SMSC LPC47M15x/LPC47M192/LPC47M997\n" ); +pr_info ("Found SMSC LPC47M15x/LPC47M192/LPC47M997\n" ); sio_data->type = smsc47m1;break ;case 0x6B :if (superio_inb (SUPERIO_REG_DEVREV ) &0x80 ) { -pr_debug (DRVNAME ": " -"Found SMSC LPC47M233, unsupported\n" ); +pr_debug ("Found SMSC LPC47M233, unsupported\n" );superio_exit ();return -ENODEV ; } -pr_info (DRVNAME ": Found SMSC LPC47M292\n" ); +pr_info ("Found SMSC LPC47M292\n" ); sio_data->type = smsc47m2;break ;default :
@@ -470,7 +471,7 @@ static int __init smsc47m1_find(unsigned short *addr, *addr = (superio_inb (SUPERIO_REG_BASE ) <<8 ) |superio_inb (SUPERIO_REG_BASE +1 );if (*addr =0 ) { -pr_info (DRVNAME ": Device address not set, will not use\n" ); +pr_info ("Device address not set, will not use\n" );superio_exit ();return -ENODEV ; }
@@ -479,7 +480,7 @@ static int __init smsc47m1_find(unsigned short *addr,* Compaq Presario S4000NX) */ sio_data->activate =superio_inb (SUPERIO_REG_ACT );if ((sio_data->activate &0x01 ) =0 ) { -pr_info (DRVNAME ": Enabling device\n" ); +pr_info ("Enabling device\n" );superio_outb (SUPERIO_REG_ACT , sio_data->activate |0x01 ); }
@@ -494,7 +495,7 @@ static void smsc47m1_restore(const struct smsc47m1_sio_data *sio_data)superio_enter ();superio_select (); -pr_info (DRVNAME ": Disabling device\n" ); +pr_info ("Disabling device\n" );superio_outb (SUPERIO_REG_ACT , sio_data->activate);superio_exit ();
@@ -823,28 +824,26 @@ static int __init smsc47m1_device_add(unsigned short address, pdev =platform_device_alloc (DRVNAME , address);if (!pdev) { err = -ENOMEM ; - printk(KERN_ERR DRVNAME ": Device allocation failed\n"); +pr_err ("Device allocation failed\n" ); goto exit; } err =platform_device_add_resources (pdev, &res,1 );if (err) { - printk(KERN_ERR DRVNAME ": Device resource addition failed " - "(%d)\n", err); +pr_err ("Device resource addition failed (%d)\n" , err); goto exit_device_put; } err =platform_device_add_data (pdev, sio_data,sizeof (struct smsc47m1_sio_data ));if (err) { - printk(KERN_ERR DRVNAME ": Platform data allocation failed\n"); +pr_err ("Platform data allocation failed\n" ); goto exit_device_put; } err =platform_device_add (pdev);if (err) { - printk(KERN_ERR DRVNAME ": Device addition failed (%d)\n", - err); +pr_err ("Device addition failed (%d)\n" , err); goto exit_device_put; }
drivers/hwmon/via-cputemp.c +5 -5
@@ -21,6 +21,8 @@* 02110-1301 USA. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h>
@@ -202,7 +204,7 @@ static int __cpuinit via_cputemp_device_add(unsigned int cpu) pdev =platform_device_alloc (DRVNAME , cpu);if (!pdev) { err = -ENOMEM ; - printk(KERN_ERR DRVNAME ": Device allocation failed\n"); +pr_err ("Device allocation failed\n" ); goto exit; }
@@ -214,8 +216,7 @@ static int __cpuinit via_cputemp_device_add(unsigned int cpu) err =platform_device_add (pdev);if (err) { - printk(KERN_ERR DRVNAME ": Device addition failed (%d)\n", - err); +pr_err ("Device addition failed (%d)\n" , err); goto exit_device_free; }
@@ -295,8 +296,7 @@ static int __init via_cputemp_init(void)continue ;if (c->x86_model >0x0f ) { - printk(KERN_WARNING DRVNAME ": Unknown CPU " - "model 0x%x\n", c->x86_model); +pr_warn ("Unknown CPU model 0x%x\n" , c->x86_model);continue ; }
drivers/hwmon/via686a.c +5 -5
@@ -30,6 +30,8 @@Warning - only supports a single device. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/slab.h> #include <linux/pci.h>
@@ -791,21 +793,19 @@ static int __devinit via686a_device_add(unsigned short address) pdev =platform_device_alloc ("via686a" , address);if (!pdev) { err = -ENOMEM ; -printk (KERN_ERR "via686a: Device allocation failed\n" ); +pr_err ("Device allocation failed\n" ); goto exit; } err =platform_device_add_resources (pdev, &res,1 );if (err) { -printk (KERN_ERR "via686a: Device resource addition failed " -"(%d)\n" , err); +pr_err ("Device resource addition failed (%d)\n" , err); goto exit_device_put; } err =platform_device_add (pdev);if (err) { -printk (KERN_ERR "via686a: Device addition failed (%d)\n" , - err); +pr_err ("Device addition failed (%d)\n" , err); goto exit_device_put; }
drivers/hwmon/vt1211.c +13 -17
@@ -21,6 +21,8 @@* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h>
@@ -1254,8 +1256,7 @@ static int __init vt1211_device_add(unsigned short address) pdev =platform_device_alloc (DRVNAME , address);if (!pdev) { err = -ENOMEM ; - printk(KERN_ERR DRVNAME ": Device allocation failed (%d)\n", - err); +pr_err ("Device allocation failed (%d)\n" , err); goto EXIT; }
@@ -1266,15 +1267,13 @@ static int __init vt1211_device_add(unsigned short address) err =platform_device_add_resources (pdev, &res,1 );if (err) { - printk(KERN_ERR DRVNAME ": Device resource addition failed " - "(%d)\n", err); +pr_err ("Device resource addition failed (%d)\n" , err); goto EXIT_DEV_PUT; } err =platform_device_add (pdev);if (err) { - printk(KERN_ERR DRVNAME ": Device addition failed (%d)\n", - err); +pr_err ("Device addition failed (%d)\n" , err); goto EXIT_DEV_PUT; }
@@ -1301,23 +1300,20 @@ static int __init vt1211_find(int sio_cip, unsigned short *address)superio_select (sio_cip,SIO_VT1211_LDN_HWMON );if ((superio_inb (sio_cip,SIO_VT1211_ACTIVE ) &1 ) =0 ) { - printk(KERN_WARNING DRVNAME ": HW monitor is disabled, " - "skipping\n"); +pr_warn ("HW monitor is disabled, skipping\n" ); goto EXIT; } *address = ((superio_inb (sio_cip,SIO_VT1211_BADDR ) <<8 ) | (superio_inb (sio_cip,SIO_VT1211_BADDR +1 ))) &0xff00 ;if (*address =0 ) { - printk(KERN_WARNING DRVNAME ": Base address is not set, " - "skipping\n"); +pr_warn ("Base address is not set, skipping\n" ); goto EXIT; } err =0 ; - printk(KERN_INFO DRVNAME ": Found VT1211 chip at 0x%04x, " -"revision %u\n" , *address, - superio_inb(sio_cip, SIO_VT1211_DEVREV)); +pr_info ("Found VT1211 chip at 0x%04x, revision %u\n" , + *address,superio_inb (sio_cip,SIO_VT1211_DEVREV )); EXIT:superio_exit (sio_cip);
@@ -1336,15 +1332,15 @@ static int __init vt1211_init(void)if ((uch_config <-1 ) || (uch_config >31 )) { err = -EINVAL ; - printk(KERN_WARNING DRVNAME ": Invalid UCH configuration %d. " - "Choose a value between 0 and 31.\n", uch_config); +pr_warn ("Invalid UCH configuration %d. Choose a value between 0 and 31.\n" , + uch_config); goto EXIT; }if ((int_mode <-1 ) || (int_mode >0 )) { err = -EINVAL ; - printk(KERN_WARNING DRVNAME ": Invalid interrupt mode %d. " - "Only mode 0 is supported.\n", int_mode); +pr_warn ("Invalid interrupt mode %d. Only mode 0 is supported.\n" , + int_mode); goto EXIT; }
drivers/hwmon/vt8231.c +5 -5
@@ -24,6 +24,8 @@/* Supports VIA VT8231 South Bridge embedded sensors */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h>
@@ -902,21 +904,19 @@ static int __devinit vt8231_device_add(unsigned short address) pdev =platform_device_alloc ("vt8231" , address);if (!pdev) { err = -ENOMEM ; -printk (KERN_ERR "vt8231: Device allocation failed\n" ); +pr_err ("Device allocation failed\n" ); goto exit; } err =platform_device_add_resources (pdev, &res,1 );if (err) { -printk (KERN_ERR "vt8231: Device resource addition failed " -"(%d)\n" , err); +pr_err ("Device resource addition failed (%d)\n" , err); goto exit_device_put; } err =platform_device_add (pdev);if (err) { -printk (KERN_ERR "vt8231: Device addition failed (%d)\n" , - err); +pr_err ("Device addition failed (%d)\n" , err); goto exit_device_put; }
drivers/hwmon/w83627ehf.c +10 -13
@@ -42,6 +42,8 @@w83667hg-b 9 5 3 3 0xb350 0xc1 0x5ca3 */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h>
@@ -1668,8 +1670,7 @@ static int __init w83627ehf_find(int sioaddr, unsigned short *addr,break ;default :if (val !=0xffff ) -pr_debug (DRVNAME ": unsupported chip ID: 0x%04x\n" , - val); +pr_debug ("unsupported chip ID: 0x%04x\n" , val);superio_exit (sioaddr);return -ENODEV ; }
@@ -1680,8 +1681,7 @@ static int __init w83627ehf_find(int sioaddr, unsigned short *addr, | superio_inb(sioaddr, SIO_REG_ADDR + 1); *addr = val &IOREGION_ALIGNMENT ;if (*addr =0 ) { - printk(KERN_ERR DRVNAME ": Refusing to enable a Super-I/O " - "device with a base I/O port 0.\n"); +pr_err ("Refusing to enable a Super-I/O device with a base I/O port 0\n" );superio_exit (sioaddr);return -ENODEV ; }
@@ -1689,13 +1689,12 @@ static int __init w83627ehf_find(int sioaddr, unsigned short *addr,/* Activate logical device if needed */ val =superio_inb (sioaddr,SIO_REG_ENABLE );if (!(val &0x01 )) { - printk(KERN_WARNING DRVNAME ": Forcibly enabling Super-I/O. " - "Sensor is probably unusable.\n"); +pr_warn ("Forcibly enabling Super-I/O. Sensor is probably unusable.\n" );superio_outb (sioaddr,SIO_REG_ENABLE , val |0x01 ); }superio_exit (sioaddr); -pr_info (DRVNAME ": Found %s chip at %#x\n" , sio_name, *addr); +pr_info ("Found %s chip at %#x\n" , sio_name, *addr); sio_data->sioreg = sioaddr;return 0 ;
@@ -1729,14 +1728,14 @@ static int __init sensors_w83627ehf_init(void)if (!(pdev =platform_device_alloc (DRVNAME , address))) { err = -ENOMEM ; - printk(KERN_ERR DRVNAME ": Device allocation failed\n"); +pr_err ("Device allocation failed\n" ); goto exit_unregister; } err =platform_device_add_data (pdev, &sio_data,sizeof (struct w83627ehf_sio_data ));if (err) { - printk(KERN_ERR DRVNAME ": Platform data allocation failed\n"); +pr_err ("Platform data allocation failed\n" ); goto exit_device_put; }
@@ -1752,16 +1751,14 @@ static int __init sensors_w83627ehf_init(void) err =platform_device_add_resources (pdev, &res,1 );if (err) { - printk(KERN_ERR DRVNAME ": Device resource addition failed " - "(%d)\n", err); +pr_err ("Device resource addition failed (%d)\n" , err); goto exit_device_put; }/* platform_device_add calls probe() */ err =platform_device_add (pdev);if (err) { - printk(KERN_ERR DRVNAME ": Device addition failed (%d)\n", - err); +pr_err ("Device addition failed (%d)\n" , err); goto exit_device_put; }
drivers/hwmon/w83627hf.c +8 -9
@@ -39,6 +39,8 @@supported yet. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h>
@@ -1166,14 +1168,13 @@ static int __init w83627hf_find(int sioaddr, unsigned short *addr,superio_inb (sio_data,WINB_BASE_REG +1 ); *addr = val &WINB_ALIGNMENT ;if (*addr =0 ) { - printk(KERN_WARNING DRVNAME ": Base address not set, " - "skipping\n"); +pr_warn ("Base address not set, skipping\n" ); goto exit; } val =superio_inb (sio_data,WINB_ACT_REG );if (!(val &0x01 )) { - printk(KERN_WARNING DRVNAME ": Enabling HWM logical device\n"); +pr_warn ("Enabling HWM logical device\n" );superio_outb (sio_data,WINB_ACT_REG , val |0x01 ); }
@@ -1789,28 +1790,26 @@ static int __init w83627hf_device_add(unsigned short address, pdev =platform_device_alloc (DRVNAME , address);if (!pdev) { err = -ENOMEM ; - printk(KERN_ERR DRVNAME ": Device allocation failed\n"); +pr_err ("Device allocation failed\n" ); goto exit; } err =platform_device_add_resources (pdev, &res,1 );if (err) { - printk(KERN_ERR DRVNAME ": Device resource addition failed " - "(%d)\n", err); +pr_err ("Device resource addition failed (%d)\n" , err); goto exit_device_put; } err =platform_device_add_data (pdev, sio_data,sizeof (struct w83627hf_sio_data ));if (err) { - printk(KERN_ERR DRVNAME ": Platform data allocation failed\n"); +pr_err ("Platform data allocation failed\n" ); goto exit_device_put; } err =platform_device_add (pdev);if (err) { - printk(KERN_ERR DRVNAME ": Device addition failed (%d)\n", - err); +pr_err ("Device addition failed (%d)\n" , err); goto exit_device_put; }
drivers/hwmon/w83781d.c +14 -15
@@ -33,6 +33,8 @@*/ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h>
@@ -1798,8 +1800,7 @@ w83781d_isa_found(unsigned short address)* individually for the probing phase. */ for (port = address; port < address +W83781D_EXTENT ; port++) {if (!request_region (port,1 ,"w83781d" )) { -pr_debug ("w83781d: Failed to request port 0x%x\n" , - port); +pr_debug ("Failed to request port 0x%x\n" , port); goto release; } }
@@ -1811,7 +1812,7 @@ w83781d_isa_found(unsigned short address)if (inb_p (address +2 ) != val ||inb_p (address +3 ) != val ||inb_p (address +7 ) != val) { -pr_debug ("w83781d: Detection failed at step 1\n" ); +pr_debug ("Detection failed at step 1\n" ); goto release; }#undef REALLY_SLOW_IO
@@ -1820,14 +1821,14 @@ w83781d_isa_found(unsigned short address)MSB (busy flag) should be clear initially, set after the write. */ save =inb_p (address +W83781D_ADDR_REG_OFFSET );if (save &0x80 ) { -pr_debug ("w83781d: Detection failed at step 2\n" ); +pr_debug ("Detection failed at step 2\n" ); goto release; } val = ~save &0x7f ;outb_p (val, address +W83781D_ADDR_REG_OFFSET );if (inb_p (address +W83781D_ADDR_REG_OFFSET ) != (val |0x80 )) {outb_p (save, address +W83781D_ADDR_REG_OFFSET ); -pr_debug ("w83781d: Detection failed at step 3\n" ); +pr_debug ("Detection failed at step 3\n" ); goto release; }
@@ -1835,7 +1836,7 @@ w83781d_isa_found(unsigned short address)outb_p (W83781D_REG_CONFIG , address +W83781D_ADDR_REG_OFFSET ); val =inb_p (address +W83781D_DATA_REG_OFFSET );if (val &0x80 ) { -pr_debug ("w83781d: Detection failed at step 4\n" ); +pr_debug ("Detection failed at step 4\n" ); goto release; }outb_p (W83781D_REG_BANK , address +W83781D_ADDR_REG_OFFSET );
@@ -1844,19 +1845,19 @@ w83781d_isa_found(unsigned short address) val =inb_p (address +W83781D_DATA_REG_OFFSET );if ((!(save &0x80 ) && (val !=0xa3 )) || ((save &0x80 ) && (val !=0x5c ))) { -pr_debug ("w83781d: Detection failed at step 5\n" ); +pr_debug ("Detection failed at step 5\n" ); goto release; }outb_p (W83781D_REG_I2C_ADDR , address +W83781D_ADDR_REG_OFFSET ); val =inb_p (address +W83781D_DATA_REG_OFFSET );if (val <0x03 || val >0x77 ) {/* Not a valid I2C address */ -pr_debug ("w83781d: Detection failed at step 6\n" ); +pr_debug ("Detection failed at step 6\n" ); goto release; }/* The busy flag should be clear again */ if (inb_p (address +W83781D_ADDR_REG_OFFSET ) &0x80 ) { -pr_debug ("w83781d: Detection failed at step 7\n" ); +pr_debug ("Detection failed at step 7\n" ); goto release; }
@@ -1871,7 +1872,7 @@ w83781d_isa_found(unsigned short address) found =1 ;if (found) -pr_info ("w83781d: Found a %s chip at %#x\n" , +pr_info ("Found a %s chip at %#x\n" , val =0x30 ?"W83782D" :"W83781D" , (int )address); release:
@@ -1894,21 +1895,19 @@ w83781d_isa_device_add(unsigned short address) pdev =platform_device_alloc ("w83781d" , address);if (!pdev) { err = -ENOMEM ; -printk (KERN_ERR "w83781d: Device allocation failed\n" ); +pr_err ("Device allocation failed\n" ); goto exit; } err =platform_device_add_resources (pdev, &res,1 );if (err) { -printk (KERN_ERR "w83781d: Device resource addition failed " -"(%d)\n" , err); +pr_err ("Device resource addition failed (%d)\n" , err); goto exit_device_put; } err =platform_device_add (pdev);if (err) { -printk (KERN_ERR "w83781d: Device addition failed (%d)\n" , - err); +pr_err ("Device addition failed (%d)\n" , err); goto exit_device_put; }
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 11 lines · Joe Perches
Convert printks to pr_<level>
Coalesce long formats
Removed prefixes from formats
Added #definepr_fmtKBUILD_MODNAME": " fmt Standardized abitguru messages for reporting and finding MAINTAINERCompiled x86 allyesconfig only.
I inspected "stringsdrivers/hwmon/built-in.o",
but it's otherwise untested.Signed-off-by Joe Perches <[email protected]>
There are several lines longer than 80 characters. Does this rule no longer apply ?
Oddly enough, there are only four checkpatch warnings about long lines, even though there are many more.
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 10 lines · Guenter Roeck
Quoted 9 lines · Joe Perches
Convert printks to pr_<level>
Coalesce long formats
Removed prefixes from formats
Added #definepr_fmtKBUILD_MODNAME": " fmt Standardized abitguru messages for reporting and finding MAINTAINER Compiled x86 allyesconfig only.
I inspected "stringsdrivers/hwmon/built-in.o",
but it's otherwise untested.Signed-off-by Joe Perches <[email protected]>
Quoted 2 lines
There are several lines longer than 80 characters. Does this rule no longer apply ?
80 columns isn't checked for printk format strings.
A kernel general preference may be to keep formats as a single string without line breaks so that grep works better.
Quoted 2 lines
Oddly enough, there are only four checkpatch warnings about long lines, even though there are many more.
The version I use doesn't show any warnings.
cheers, Joe
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 11 lines · Joe Perches
Quoted 10 lines · Guenter Roeck
Quoted 9 lines · Joe Perches
Convert printks to pr_<level>
Coalesce long formats
Removed prefixes from formats
Added #definepr_fmtKBUILD_MODNAME": " fmt Standardized abitguru messages for reporting and finding MAINTAINER Compiled x86 allyesconfig only.
I inspected "stringsdrivers/hwmon/built-in.o",
but it's otherwise untested.Signed-off-by Joe Perches <[email protected]>
Quoted 5 lines
Quoted 2 lines
There are several lines longer than 80 characters. Does this rule no longer apply ?
80 columns isn't checked for printk format strings.
Interesting.
Quoted 9 lines
A kernel general preference may be to keep formats as a single string without line breaks so that grep works better.
Quoted 2 lines
Oddly enough, there are only four checkpatch warnings about long lines, even though there are many more.
The version I use doesn't show any warnings.
checkpatch.pl from both v2.6.36-rc7 and v2.6.36-rc6 do report warnings. Looks like those versions flag long lines for pr_warn. Is your version older or newer ?
Anyway, would it be possible to split the patch into one patch per file ?
I don't know how Jean thinks about it, but in my opinion it would be cleaner, permit revert on a single patch/file instead of having to revert the entire series, it would simplify review, and it would make it much easier to cherry-pick pieces into other releases if needed.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 9 lines · Guenter Roeck
Quoted 4 lines · Joe Perches
Quoted 2 lines · Guenter Roeck
There are several lines longer than 80 characters. Does this rule no longer apply ?
80 columns isn't checked for printk format strings.
Interesting.
Quoted 3 lines
A kernel general preference may be to keep formats as a single string without line breaks so that grep works better.
Quoted 6 lines
Quoted 3 lines
Quoted 2 lines
Oddly enough, there are only four checkpatch warnings about long lines, even though there are many more.
The version I use doesn't show any warnings.
checkpatch.pl from both v2.6.36-rc7 and v2.6.36-rc6 do report warnings. Looks like those versions flag long lines for
pr_warn. Is your version older or newer ?
Newer. It adds pr_warn to the exempted list, not just pr_warning.
Quoted 1 line
Anyway, would it be possible to split the patch into one patch per file ?
Oh sure. It's trivial to do that.
Quoted 4 lines
I don't know how Jean thinks about it, but in my opinion it would be cleaner, permit revert on a single patch/file instead of having to revert the entire series, it would simplify review, and it would make it much easier to cherry-pick pieces into other releases if needed.
Jean, do you have a preference?
I'll resubmit if you want it separated.
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 23 lines · Joe Perches
Quoted 9 lines · Guenter Roeck
Quoted 4 lines · Joe Perches
Quoted 2 lines · Guenter Roeck
There are several lines longer than 80 characters. Does this rule no longer apply ?
80 columns isn't checked for printk format strings.
Interesting.
Quoted 3 lines
A kernel general preference may be to keep formats as a single string without line breaks so that grep works better.
Quoted 6 lines
Quoted 3 lines
Quoted 2 lines
Oddly enough, there are only four checkpatch warnings about long lines, even though there are many more.
The version I use doesn't show any warnings.
checkpatch.pl from both v2.6.36-rc7 and v2.6.36-rc6 do report warnings. Looks like those versions flag long lines for
pr_warn. Is your version older or newer ?Newer. It adds
pr_warnto the exempted list, not justpr_warning.Quoted 1 line
Anyway, would it be possible to split the patch into one patch per file ?
Oh sure. It's trivial to do that.
Quoted 7 lines
Quoted 4 lines
I don't know how Jean thinks about it, but in my opinion it would be cleaner, permit revert on a single patch/file instead of having to revert the entire series, it would simplify review, and it would make it much easier to cherry-pick pieces into other releases if needed.
Jean, do you have a preference?
I'll resubmit if you want it separated.
Yes please, that would be nice.
Thanks,
Henrik
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 10 lines · Joe Perches
Quoted 9 lines · Guenter Roeck
Quoted 4 lines · Joe Perches
Quoted 2 lines · Guenter Roeck
There are several lines longer than 80 characters. Does this rule no longer apply ?
80 columns isn't checked for printk format strings.
Interesting.
Quoted 3 lines
A kernel general preference may be to keep formats as a single string without line breaks so that grep works better.
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Quoted 2 lines
Oddly enough, there are only four checkpatch warnings about long lines, even though there are many more.
The version I use doesn't show any warnings.
checkpatch.pl from both v2.6.36-rc7 and v2.6.36-rc6 do report warnings. Looks like those versions flag long lines for
pr_warn. Is your version older or newer ?Newer. It adds
pr_warnto the exempted list, not justpr_warning.
I hope there's a plan to get rid of one of these? Having two macros doing exactly the same thing will confuse everybody.
Quoted 11 lines
Quoted 1 line
Anyway, would it be possible to split the patch into one patch per file ?
Oh sure. It's trivial to do that.
Quoted 4 lines
I don't know how Jean thinks about it, but in my opinion it would be cleaner, permit revert on a single patch/file instead of having to revert the entire series, it would simplify review, and it would make it much easier to cherry-pick pieces into other releases if needed.
Jean, do you have a preference?
I'll resubmit if you want it separated.
Jean has no preference when sleeping.
Now Jean is awake and can express himself on the matter:
* This isn't the kind of fixes we want to cherry-pick from. We're not fixing any bug here, are we? I certainly hope that a real bug fix wouldn't be hidden within a larger patch, but would have the separate patch it deserves. At which point we no longer care if the rest is one large patch or one patch per driver.
* I don't see us reverting that kind of patch either. If we don't like the changes for whatever reason, we don't take them in the first place. Once in, we're not going to change our minds.
* 32 patches for a simple cleanup is actually a lot more work for me than a single large patch. It's cheaper for me to do minor adjustments to a large patch than to apply 32 patches individually.
* That being said, now that the hwmon subsystem maintainer is a shared duty between Guenter and myself, there's no single place where we can keep a patch touching many drivers and ensure it doesn't conflict
with the changes in the other tree. But I would think this is
something for Gunter and myself to sort out, not patch contributors.
I currently have pending patches to the following hwmon drivers in my
tree: adt7475, ams, asc7621, hdaps, it87, k8temp, lm75, lm85, lm90, pcf8591, s3c-hwmon, w83795. Two of these are affected by Joe's patch(es). Guenter, what about you?
Joe, would you mind providing a similar patch for the driver at:
http://khali.linux-fr.org/devel/misc/w83795/w83795.c
This driver will be added to kernel 2.6.37.
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
On Wed, Oct 20, 2010 at 03:34:38AM -0400, Jean Delvare wrote:
[ ... ]
Quoted 7 lines
* This isn't the kind of fixes we want to cherry-pick from. We're not fixing any bug here, are we? I certainly hope that a real bug fix wouldn't be hidden within a larger patch, but would have the separate patch it deserves. At which point we no longer care if the rest is one large patch or one patch per driver.
Actually, I do this kind of thing all the time when backporting. It is easier to apply all patches applied to a driver than skipping the cleanup patches, to avoid conflicts when cherry-picking functional patches. The tendency for large cleanup patches affecting several drivers and modules created trouble for me several times already.
Quoted 8 lines
* I don't see us reverting that kind of patch either. If we don't like the changes for whatever reason, we don't take them in the first place. Once in, we're not going to change our minds.
* 32 patches for a simple cleanup is actually a lot more work for me than a single large patch. It's cheaper for me to do minor adjustments to a large patch than to apply 32 patches individually.
Good point. I am using git all the time, so it isn't that much of a problem for me. Our mailer problems (the tabs replacing stuff) are much more annoying.
Quoted 11 lines
* That being said, now that the hwmon subsystem maintainer is a shared duty between Guenter and myself, there's no single place where we can keep a patch touching many drivers and ensure it doesn't conflict
with the changes in the other tree. But I would think this is
something for Gunter and myself to sort out, not patch contributors.I currently have pending patches to the following hwmon drivers in my
tree: adt7475, ams, asc7621, hdaps, it87, k8temp, lm75, lm85, lm90, pcf8591, s3c-hwmon, w83795. Two of these are affected by Joe's patch(es). Guenter, what about you?
coretemp, pkgtemp, via-cputemp, ltc4261 (new), lis3, hp_accel
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 5 lines · Guenter Roeck
Quoted 5 lines
* That being said, now that the hwmon subsystem maintainer is a shared duty between Guenter and myself, there's no single place where we can keep a patch touching many drivers and ensure it doesn't conflict
with the changes in the other tree. But I would think this is
something for Gunter and myself to sort out, not patch contributors.
Perhaps allow both maintainers read/write access to hwmon-next?
Quoted 6 lines
Quoted 5 lines
I currently have pending patches to the following hwmon drivers in my
tree: adt7475, ams, asc7621, hdaps, it87, k8temp, lm75, lm85, lm90, pcf8591, s3c-hwmon, w83795. Two of these are affected by Joe's patch(es). Guenter, what about you?coretemp, pkgtemp, via-cputemp, ltc4261 (new), lis3,
hp_accel
I did these against next which includes 'hwmon-staging/hwmon-next'.
Shouldn't these patches apply without modification or do I need to do something else?
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Hi Joe,
Quoted 8 lines · Joe Perches
Quoted 5 lines · Guenter Roeck
Quoted 5 lines
* That being said, now that the hwmon subsystem maintainer is a shared duty between Guenter and myself, there's no single place where we can keep a patch touching many drivers and ensure it doesn't conflict
with the changes in the other tree. But I would think this is
something for Gunter and myself to sort out, not patch contributors.Perhaps allow both maintainers read/write access to hwmon-next?
Guenter and myself are collaborating on the hwmon tree since a relatively recent date. We still have to find the best method. For now we have separate trees because it seemed easier that way, but we may change our minds later.
Quoted 11 lines
Quoted 6 lines
Quoted 4 lines
I currently have pending patches to the following hwmon drivers in my
tree: adt7475, ams, asc7621, hdaps, it87, k8temp, lm75, lm85, lm90, pcf8591, s3c-hwmon, w83795. Two of these are affected by Joe's patch(es). Guenter, what about you?coretemp, pkgtemp, via-cputemp, ltc4261 (new), lis3,
hp_accelI did these against next which includes 'hwmon-staging/hwmon-next'.
Shouldn't these patches apply without modification or do I need to do something else?
If you based your patches on linux-next then you're all set. I was asking Guenter about his affected drivers only to decide who, of him and me, should take which patch.
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Hi Guenter,
Quoted 9 lines · Guenter Roeck
On Wed, Oct 20, 2010 at 03:34:38AM -0400, Jean Delvare wrote:
[ ... ]Quoted 6 lines
* This isn't the kind of fixes we want to cherry-pick from. We're not fixing any bug here, are we? I certainly hope that a real bug fix wouldn't be hidden within a larger patch, but would have the separate patch it deserves. At which point we no longer care if the rest is one large patch or one patch per driver.
Quoted 5 lines
Actually, I do this kind of thing all the time when backporting. It is easier to apply all patches applied to a driver than skipping the cleanup patches, to avoid conflicts when cherry-picking functional patches. The tendency for large cleanup patches affecting several drivers and modules created trouble for me several times already.
I see. I had stable kernel series in mind when you mentioned backporting - obviously this was too restrictive and you have different needs.
I didn't expect it to be difficult to limit the scope of a cherry-picked patch to a single file. Is it?
Quoted 11 lines
Quoted 7 lines
* I don't see us reverting that kind of patch either. If we don't like the changes for whatever reason, we don't take them in the first place. Once in, we're not going to change our minds.
* 32 patches for a simple cleanup is actually a lot more work for me than a single large patch. It's cheaper for me to do minor adjustments to a large patch than to apply 32 patches individually.
Good point. I am using git all the time, so it isn't that much of a problem for me. Our mailer problems (the tabs replacing stuff) are much more annoying.
I'm still using quilt so it means quite some manual work for me. Probably I could automate part of it, and I would if it was happening frequently. But as it stands it's rather rare.
Quoted 5 lines
Quoted 5 lines
* That being said, now that the hwmon subsystem maintainer is a shared duty between Guenter and myself, there's no single place where we can keep a patch touching many drivers and ensure it doesn't conflict
with the changes in the other tree. But I would think this is
something for Gunter and myself to sort out, not patch contributors.
Another point in favor of splitting, which I didn't mention earlier: it makes the Cc list way shorter :)
Quoted 6 lines
Quoted 4 lines
I currently have pending patches to the following hwmon drivers in my
tree: adt7475, ams, asc7621, hdaps, it87, k8temp, lm75, lm85, lm90, pcf8591, s3c-hwmon, w83795. Two of these are affected by Joe's patch(es). Guenter, what about you?coretemp, pkgtemp, via-cputemp, ltc4261 (new), lis3,
hp_accel
OK. Well, only two of "my" drivers are affected by Joe's patch (it87 and pcf8591), so if you prefer the split variant, you could pick all the individual patches except these two, and I take these two.
But first of all, I really would like the pr_fmt issue do be sorted out. I don't like the idea of having to redefine it in every driver, when it seems easy to avoid that. Joe?
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Hi Jean,
On Wed, Oct 20, 2010 at 12:38:35PM -0400, Jean Delvare wrote:
[ ... ]
Quoted 5 lines
I'm still using quilt so it means quite some manual work for me. Probably I could automate part of it, and I would if it was happening frequently. But as it stands it's rather rare.
I tried quilt, but dumped it in favor of git. Personal preference, maybe, but I seem to get along with git much better than with quilt.
Quoted 4 lines
OK. Well, only two of "my" drivers are affected by Joe's patch (it87 and pcf8591), so if you prefer the split variant, you could pick all the individual patches except these two, and I take these two.
Ok, let's do that.
Quoted 4 lines
But first of all, I really would like the
pr_fmtissue do be sorted out. I don't like the idea of having to redefine it in every driver, when it seems easy to avoid that. Joe?
Agreed, especially since it doesn't seem to be used in many of the drivers.
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 6 lines · Guenter Roeck
Quoted 3 lines · Jean Delvare
But first of all, I really would like the
pr_fmtissue do be sorted out. I don't like the idea of having to redefine it in every driver, when it seems easy to avoid that. Joe?Agreed, especially since it doesn't seem to be used in many of the drivers.
As I understand it, it's used silently by all pr_*() calls.
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 9 lines · Jean Delvare
Quoted 6 lines · Guenter Roeck
Quoted 3 lines · Jean Delvare
But first of all, I really would like the
pr_fmtissue do be sorted out. I don't like the idea of having to redefine it in every driver, when it seems easy to avoid that. Joe?Agreed, especially since it doesn't seem to be used in many of the drivers.
As I understand it, it's used silently by all pr_*() calls.
I don't really understand the resistance to add the module name to the default pr_fmt in kernel.h, and I really don't like the idea to spread pr_fmt defines throughout the code instead.
Maybe I am missing something, but to me the result of this cleanup is less clean code than before.
What is your take ?
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 3 lines · Jean Delvare
Joe, would you mind providing a similar patch for the driver at:
http://khali.linux-fr.org/devel/misc/w83795/w83795.c
This driver will be added to kernel 2.6.37.
This file doesn't use printk and doesn't need any similar patch.
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 6 lines · Joe Perches
Quoted 3 lines · Jean Delvare
Joe, would you mind providing a similar patch for the driver at:
http://khali.linux-fr.org/devel/misc/w83795/w83795.c
This driver will be added to kernel 2.6.37.This file doesn't use printk and doesn't need any similar patch.
OK, thanks for checking!
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
cover drivers/hwmon: Use pr_fmt and pr_<level>
In reply to Guenter RoeckJust some message logging cleanups, now separated by file
Joe Perches (32):
drivers/hwmon/abituguru.c: Use pr_fmt and pr_<level> drivers/hwmon/abituguru3.c: Use pr_fmt and pr_<level> drivers/hwmon/adt7470.c: Use pr_fmt and pr_<level> drivers/hwmon/applesmc.c: Use pr_fmt and pr_<level> drivers/hwmon/asb100.c: Use pr_fmt and pr_<level> drivers/hwmon/asus_atk0110.c: Use pr_fmt and pr_<level> drivers/hwmon/coretemp.c: Use pr_fmt and pr_<level> drivers/hwmon/dme1737.c: Use pr_fmt and pr_<level> drivers/hwmon/f71805f.c: Use pr_fmt and pr_<level> drivers/hwmon/f71882fg.c: Use pr_fmt and pr_<level> drivers/hwmon/hp_accel.c: Use pr_fmt and pr_<level> drivers/hwmon/hwmon-vid.c: Use pr_fmt and pr_<level> drivers/hwmon/hwmon.c: Use pr_fmt and pr_<level> drivers/hwmon/ibmaem.c: Use pr_fmt and pr_<level> drivers/hwmon/it87.c: Use pr_fmt and pr_<level> drivers/hwmon/lis3lv02d.c: Use pr_fmt and pr_<level> drivers/hwmon/lm70.c: Use pr_fmt and pr_<level> drivers/hwmon/lm78.c: Use pr_fmt and pr_<level> drivers/hwmon/pc87360.c: Use pr_fmt and pr_<level> drivers/hwmon/pc87427.c: Use pr_fmt and pr_<level> drivers/hwmon/pcf8591.c: Use pr_fmt and pr_<level> drivers/hwmon/pkgtemp.c: Use pr_fmt and pr_<level> drivers/hwmon/sis5595.c: Use pr_fmt and pr_<level> drivers/hwmon/smsc47b397.c: Use pr_fmt and pr_<level> drivers/hwmon/smsc47m1.c: Use pr_fmt and pr_<level> drivers/hwmon/via-cputemp.c: Use pr_fmt and pr_<level> drivers/hwmon/via686a.c: Use pr_fmt and pr_<level> drivers/hwmon/vt1211.c: Use pr_fmt and pr_<level> drivers/hwmon/vt8231.c: Use pr_fmt and pr_<level> drivers/hwmon/w83627ehf.c: Use pr_fmt and pr_<level> drivers/hwmon/w83627hf.c: Use pr_fmt and pr_<level> drivers/hwmon/w83781d.c: Use pr_fmt and pr_<level>
drivers/hwmon/abituguru.c | 36 ++++++++++++------------- drivers/hwmon/abituguru3.c | 45 +++++++++++++------------------ drivers/hwmon/adt7470.c | 4 ++- drivers/hwmon/applesmc.c | 60 +++++++++++++++++++----------------------- drivers/hwmon/asb100.c | 9 +++--- drivers/hwmon/asus_atk0110.c | 7 +++-- drivers/hwmon/coretemp.c | 11 ++++--- drivers/hwmon/dme1737.c | 12 ++++---- drivers/hwmon/f71805f.c | 29 +++++++++----------- drivers/hwmon/f71882fg.c | 23 ++++++++------- drivers/hwmon/hp_accel.c | 13 +++++---- drivers/hwmon/hwmon-vid.c | 11 ++++--- drivers/hwmon/hwmon.c | 4 ++- drivers/hwmon/ibmaem.c | 4 ++- drivers/hwmon/it87.c | 30 ++++++++++----------- drivers/hwmon/lis3lv02d.c | 23 +++++++-------- drivers/hwmon/lm70.c | 5 ++- drivers/hwmon/lm78.c | 14 +++++----- drivers/hwmon/pc87360.c | 32 +++++++++------------- drivers/hwmon/pc87427.c | 26 +++++++++--------- drivers/hwmon/pcf8591.c | 5 ++- drivers/hwmon/pkgtemp.c | 7 +++-- drivers/hwmon/sis5595.c | 10 +++--- drivers/hwmon/smsc47b397.c | 13 ++++----- drivers/hwmon/smsc47m1.c | 31 ++++++++++----------- drivers/hwmon/via-cputemp.c | 10 +++--- drivers/hwmon/via686a.c | 10 +++--- drivers/hwmon/vt1211.c | 30 +++++++++------------ drivers/hwmon/vt8231.c | 10 +++--- drivers/hwmon/w83627ehf.c | 23 +++++++--------- drivers/hwmon/w83627hf.c | 17 +++++------ drivers/hwmon/w83781d.c | 29 ++++++++++---------- 32 files changed, 285 insertions(+), 308 deletions(-)
Signature · 7 lines
1.7.3.1.g432b3.dirty _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
PATCH 1/32 drivers/hwmon/abituguru.c: Use pr_fmt and pr_<level>
In reply to Guenter RoeckAdded #define pr_fmt KBUILD_MODNAME ": " fmt Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats
Added a few static strings to standardize logging messages.
--- drivers/hwmon/abituguru.c | 36 +++++++++++++++++------------------- 1 files changed, 17 insertions(+), 19 deletions(-)
drivers/hwmon/abituguru.c +16 -19
@@ -20,6 +20,9 @@the custom Abit uGuru chip found on Abit uGuru motherboards. Note: because of lack of specs the CPU/RAM voltage & frequency control is not supported! */ + +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/sched.h> #include <linux/init.h>
@@ -220,6 +223,10 @@ struct abituguru_data {u8 pwm_settings[ABIT_UGURU_MAX_PWMS ][5 ]; }; +static const char *never_happen ="This should never happen." ; +static const char *report_this + "Please report this to the abituguru maintainer (see MAINTAINERS)"; +/* wait till the uguru is in the specified state */ static int abituguru_wait (struct abituguru_data *data,u8 state) {
@@ -438,8 +445,7 @@ abituguru_detect_bank1_sensor_type(struct abituguru_data *data,/* Test val is sane / usable for sensor type detection. */ if ((val <10u ) || (val >250u )) { - printk(KERN_WARNING ABIT_UGURU_NAME -": bank1-sensor: %d reading (%d) too close to limits, " +pr_warn ("bank1-sensor: %d reading (%d) too close to limits, " "unable to determine sensor type, skipping sensor\n" , (int )sensor_addr, (int )val);/* assume no sensor is there for sensors for which we can't
@@ -535,10 +541,8 @@ abituguru_detect_bank1_sensor_type_exit: 3) = 3)break ;if (i =3 ) { - printk(KERN_ERR ABIT_UGURU_NAME -": Fatal error could not restore original settings. " -"This should never happen please report this to the " - "abituguru maintainer (see MAINTAINERS)\n"); +pr_err ("Fatal error could not restore original settings. %s %s\n" , + never_happen, report_this);return -ENODEV ; }return ret;
@@ -1268,14 +1272,12 @@ static int __devinit abituguru_probe(struct platform_device *pdev) }/* Fail safe check, this should never happen! */ if (sysfs_names_free <0 ) { - printk(KERN_ERR ABIT_UGURU_NAME ": Fatal error ran out of " -"space for sysfs attr names. This should never " -"happen please report to the abituguru maintainer " - "(see MAINTAINERS)\n"); +pr_err ("Fatal error ran out of space for sysfs attr names. %s %s" , + never_happen, report_this); res = -ENAMETOOLONG ; goto abituguru_probe_error; } - printk(KERN_INFO ABIT_UGURU_NAME ": found Abit uGuru\n"); +pr_info ("found Abit uGuru\n" );/* Register sysfs hooks */ for (i =0 ; i < sysfs_attr_i; i++)
@@ -1432,8 +1434,7 @@ static int __init abituguru_detect(void) "0x%02X\n", (unsigned int)data_val, (unsigned int)cmd_val);if (force) { - printk(KERN_INFO ABIT_UGURU_NAME ": Assuming Abit uGuru is " - "present because of \"force\" parameter\n"); +pr_info ("Assuming Abit uGuru is present because of \"force\" parameter\n" );return ABIT_UGURU_BASE ; }
@@ -1467,8 +1468,7 @@ static int __init abituguru_init(void) abituguru_pdev =platform_device_alloc (ABIT_UGURU_NAME , address);if (!abituguru_pdev) { - printk(KERN_ERR ABIT_UGURU_NAME - ": Device allocation failed\n"); +pr_err ("Device allocation failed\n" ); err = -ENOMEM ; goto exit_driver_unregister; }
@@ -1479,15 +1479,13 @@ static int __init abituguru_init(void) err =platform_device_add_resources (abituguru_pdev, &res,1 );if (err) { - printk(KERN_ERR ABIT_UGURU_NAME - ": Device resource addition failed (%d)\n", err); +pr_err ("Device resource addition failed (%d)\n" , err); goto exit_device_put; } err =platform_device_add (abituguru_pdev);if (err) { - printk(KERN_ERR ABIT_UGURU_NAME - ": Device addition failed (%d)\n", err); +pr_err ("Device addition failed (%d)\n" , err); goto exit_device_put; }
Signature · 7 lines
1.7.3.1.g432b3.dirty _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Guenter Roeck
AppliedRe: [01/32] drivers/hwmon/abituguru.c: Use pr_fmt and pr_<level>
Quoted 8 lines · Joe Perches
Added #define
pr_fmtKBUILD_MODNAME": " fmt Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats
Added a few static strings to standardize logging messages.Signed-off-by Joe Perches <[email protected]>
Applied.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
PATCH 2/32 drivers/hwmon/abituguru3.c: Use pr_fmt and pr_<level>
In reply to Guenter RoeckAdded #define pr_fmt KBUILD_MODNAME ": " fmt Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats
Added a few static strings to standardize logging messages.
--- drivers/hwmon/abituguru3.c | 45 ++++++++++++++++++------------------------- 1 files changed, 19 insertions(+), 26 deletions(-)
drivers/hwmon/abituguru3.c +18 -26
@@ -23,6 +23,9 @@chip found on newer Abit uGuru motherboards. Note: because of lack of specs only reading the sensors and their settings is supported. */ + +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h>
@@ -608,6 +611,9 @@ static int verbose = 1;module_param (verbose, bool,0644 );MODULE_PARM_DESC (verbose,"Enable/disable verbose error reporting" ); +static const char *never_happen ="This should never happen." ; +static const char *report_this + "Please report this to the abituguru3 maintainer (see MAINTAINERS)";/* wait while the uguru is busy (usually after a write) */ static int abituguru3_wait_while_busy (struct abituguru3_data *data)
@@ -940,15 +946,13 @@ static int __devinit abituguru3_probe(struct platform_device *pdev)if (abituguru3_motherboards[i].id = id)break ;if (!abituguru3_motherboards[i].id) { - printk(KERN_ERR ABIT_UGURU3_NAME ": error unknown motherboard " -"ID: %04X. Please report this to the abituguru3 " - "maintainer (see MAINTAINERS)\n", (unsigned int)id); +pr_err ("error unknown motherboard ID: %04X. %s\n" , + (unsigned int )id, report_this); goto abituguru3_probe_error; } data->sensors = abituguru3_motherboards[i].sensors; - printk(KERN_INFO ABIT_UGURU3_NAME ": found Abit uGuru3, motherboard " - "ID: %04X\n", (unsigned int)id); +pr_info ("found Abit uGuru3, motherboard ID: %04X\n" , (unsigned int )id);/* Fill the sysfs attr array */ sysfs_attr_i =0 ;
@@ -957,11 +961,8 @@ static int __devinit abituguru3_probe(struct platform_device *pdev)for (i =0 ; data->sensors[i].name; i++) {/* Fail safe check, this should never happen! */ if (i >=ABIT_UGURU3_MAX_NO_SENSORS ) { - printk(KERN_ERR ABIT_UGURU3_NAME -": Fatal error motherboard has more sensors " -"then ABIT_UGURU3_MAX_NO_SENSORS. This should " -"never happen please report to the abituguru3 " - "maintainer (see MAINTAINERS)\n"); +pr_err ("Fatal error motherboard has more sensors then ABIT_UGURU3_MAX_NO_SENSORS. %s %s\n" , + never_happen, report_this); res = -ENAMETOOLONG ; goto abituguru3_probe_error; }
@@ -983,10 +984,8 @@ static int __devinit abituguru3_probe(struct platform_device *pdev) }/* Fail safe check, this should never happen! */ if (sysfs_names_free <0 ) { - printk(KERN_ERR ABIT_UGURU3_NAME -": Fatal error ran out of space for sysfs attr names. " -"This should never happen please report to the " - "abituguru3 maintainer (see MAINTAINERS)\n"); +pr_err ("Fatal error ran out of space for sysfs attr names. %s %s\n" , + never_happen, report_this); res = -ENAMETOOLONG ; goto abituguru3_probe_error; }
@@ -1189,8 +1188,7 @@ static int __init abituguru3_detect(void) "0x%02X\n", (unsigned int)data_val, (unsigned int)cmd_val);if (force) { - printk(KERN_INFO ABIT_UGURU3_NAME ": Assuming Abit uGuru3 is " - "present because of \"force\" parameter\n"); +pr_info ("Assuming Abit uGuru3 is present because of \"force\" parameter\n" );return 0 ; }
@@ -1219,10 +1217,8 @@ static int __init abituguru3_init(void)return err;#ifdef CONFIG_DMI - printk(KERN_WARNING ABIT_UGURU3_NAME ": this motherboard was " -"not detected using DMI. Please send the output of " -"\"dmidecode\" to the abituguru3 maintainer " - "(see MAINTAINERS)\n"); +pr_warn ("this motherboard was not detected using DMI. " +"Please send the output of \"dmidecode\" to the abituguru3 maintainer (see MAINTAINERS)\n" );#endif }
@@ -1233,8 +1229,7 @@ static int __init abituguru3_init(void) abituguru3_pdev =platform_device_alloc (ABIT_UGURU3_NAME ,ABIT_UGURU3_BASE );if (!abituguru3_pdev) { - printk(KERN_ERR ABIT_UGURU3_NAME - ": Device allocation failed\n"); +pr_err ("Device allocation failed\n" ); err = -ENOMEM ; goto exit_driver_unregister; }
@@ -1245,15 +1240,13 @@ static int __init abituguru3_init(void) err =platform_device_add_resources (abituguru3_pdev, &res,1 );if (err) { - printk(KERN_ERR ABIT_UGURU3_NAME - ": Device resource addition failed (%d)\n", err); +pr_err ("Device resource addition failed (%d)\n" , err); goto exit_device_put; } err =platform_device_add (abituguru3_pdev);if (err) { - printk(KERN_ERR ABIT_UGURU3_NAME - ": Device addition failed (%d)\n", err); +pr_err ("Device addition failed (%d)\n" , err); goto exit_device_put; }
Signature · 7 lines
1.7.3.1.g432b3.dirty _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Guenter Roeck
AppliedRe: [02/32] drivers/hwmon/abituguru3.c: Use pr_fmt and pr_<level>
Quoted 8 lines · Joe Perches
Added #define
pr_fmtKBUILD_MODNAME": " fmt Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats
Added a few static strings to standardize logging messages.Signed-off-by Joe Perches <[email protected]>
Applied.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
PATCH 3/32 drivers/hwmon/adt7470.c: Use pr_fmt and pr_<level>
In reply to Guenter RoeckAdded #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats
--- drivers/hwmon/adt7470.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/hwmon/adt7470.c +3 -1
@@ -19,6 +19,8 @@* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/jiffies.h> #include <linux/i2c.h>
@@ -274,7 +276,7 @@ static int adt7470_read_temperatures(struct i2c_client *client,i2c_smbus_write_byte_data (client,ADT7470_REG_PWM_CFG (2 ), pwm_cfg[1 ]);if (res) { -printk (KERN_ERR "ha ha, interrupted" ); +pr_err ("ha ha, interrupted\n" );return -EAGAIN ; }
Signature · 7 lines
1.7.3.1.g432b3.dirty _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Guenter Roeck
AppliedRe: [03/32] drivers/hwmon/adt7470.c: Use pr_fmt and pr_<level>
Quoted 7 lines · Joe Perches
Added #define
pr_fmtKBUILD_MODNAME": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formatsSigned-off-by Joe Perches <[email protected]>
Applied.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
PATCH 4/32 drivers/hwmon/applesmc.c: Use pr_fmt and pr_<level>
In reply to Guenter RoeckAdded #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats
--- drivers/hwmon/applesmc.c | 60 ++++++++++++++++++++------------------------- 1 files changed, 27 insertions(+), 33 deletions(-)
drivers/hwmon/applesmc.c +27 -33
@@ -26,6 +26,8 @@* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/delay.h> #include <linux/platform_device.h> #include <linux/input-polldev.h>
@@ -247,8 +249,7 @@ static int __wait_status(u8 val) } } -printk (KERN_WARNING "applesmc: wait status failed: %x != %x\n" , - val,inb (APPLESMC_CMD_PORT )); +pr_warn ("wait status failed: %x != %x\n" , val,inb (APPLESMC_CMD_PORT ));return -EIO ; }
@@ -267,8 +268,7 @@ static int send_command(u8 cmd)if ((inb (APPLESMC_CMD_PORT ) &APPLESMC_STATUS_MASK ) =0x0c )return 0 ; } -printk (KERN_WARNING "applesmc: command failed: %x -> %x\n" , - cmd,inb (APPLESMC_CMD_PORT )); +pr_warn ("command failed: %x -> %x\n" , cmd,inb (APPLESMC_CMD_PORT ));return -EIO ; }
@@ -282,8 +282,8 @@ static int applesmc_read_key(const char* key, u8* buffer, u8 len)int i;if (len >APPLESMC_MAX_DATA_LENGTH ) { -printk (KERN_ERR "applesmc_read_key: cannot read more than " -"%d bytes\n" ,APPLESMC_MAX_DATA_LENGTH ); +pr_err ("%s(): cannot read more than %d bytes\n" , + __func__,APPLESMC_MAX_DATA_LENGTH );return -EINVAL ; }
@@ -325,8 +325,8 @@ static int applesmc_write_key(const char* key, u8* buffer, u8 len)int i;if (len >APPLESMC_MAX_DATA_LENGTH ) { -printk (KERN_ERR "applesmc_write_key: cannot write more than " -"%d bytes\n" ,APPLESMC_MAX_DATA_LENGTH ); +pr_err ("%s(): cannot write more than %d bytes\n" , + __func__,APPLESMC_MAX_DATA_LENGTH );return -EINVAL ; }
@@ -482,7 +482,7 @@ static int applesmc_device_init(void)msleep (INIT_WAIT_MSECS ); } -printk (KERN_WARNING "applesmc: failed to init the device\n" ); +pr_warn ("failed to init the device\n" ); out:mutex_unlock (&applesmc_lock);
@@ -518,7 +518,7 @@ static int applesmc_probe(struct platform_device *dev)if (ret)return ret; -printk (KERN_INFO "applesmc: device successfully initialized.\n" ); +pr_info ("device successfully initialized\n" );return 0 ; }
@@ -636,8 +636,7 @@ static ssize_t applesmc_light_show(struct device *dev,if (ret) goto out; data_length =clamp_val (query[0 ],0 ,10 ); -printk (KERN_INFO "applesmc: light sensor data length set to " -"%d\n" , data_length); +pr_info ("light sensor data length set to %d\n" , data_length); } ret =applesmc_read_key (LIGHT_SENSOR_LEFT_KEY , buffer, data_length);
@@ -1403,18 +1402,18 @@ static int applesmc_dmi_match(const struct dmi_system_id *id) {int i =0 ;struct dmi_match_data * dmi_data = id->driver_data; -printk (KERN_INFO "applesmc: %s detected:\n" , id->ident); +pr_info ("%s detected:\n" , id->ident); applesmc_accelerometer = dmi_data->accelerometer; -printk (KERN_INFO "applesmc: - Model %s accelerometer\n" , - applesmc_accelerometer ?"with" :"without" ); +pr_info (" - Model %s accelerometer\n" , + applesmc_accelerometer ?"with" :"without" ); applesmc_light = dmi_data->light; -printk (KERN_INFO "applesmc: - Model %s light sensors and backlight\n" , - applesmc_light ?"with" :"without" ); +pr_info (" - Model %s light sensors and backlight\n" , + applesmc_light ?"with" :"without" ); applesmc_temperature_set = dmi_data->temperature_set;while (temperature_sensors_sets[applesmc_temperature_set][i] !=NULL ) i++; -printk (KERN_INFO "applesmc: - Model with %d temperature sensors\n" , i); +pr_info (" - Model with %d temperature sensors\n" , i);return 1 ; }
@@ -1465,7 +1464,7 @@ out_sysfs:sysfs_remove_group (&pdev->dev.kobj, &accelerometer_attributes_group); out: -printk (KERN_WARNING "applesmc: driver init failed (ret=%d)!\n" , ret); +pr_warn ("driver init failed (ret=%d)!\n" , ret);return ret; }
@@ -1639,7 +1638,7 @@ static int __init applesmc_init(void)int i;if (!dmi_check_system (applesmc_whitelist)) { -printk (KERN_WARNING "applesmc: supported laptop not found!\n" ); +pr_warn ("supported laptop not found!\n" ); ret = -ENODEV ; goto out; }
@@ -1673,15 +1672,13 @@ static int __init applesmc_init(void)/* create fan files */ count =applesmc_get_fan_count ();if (count <0 ) -printk (KERN_ERR "applesmc: Cannot get the number of fans.\n" ); +pr_err ("Cannot get the number of fans\n" );else -printk (KERN_INFO "applesmc: %d fans found.\n" , count); +pr_info ("%d fans found\n" , count);if (count >4 ) { count =4 ; -printk (KERN_WARNING "applesmc: More than 4 fans found," -" but at most 4 fans are supported" -" by the driver.\n" ); +pr_warn ("A maximum of 4 fans are supported by this driver\n" ); }while (fans_handled < count) {
@@ -1697,11 +1694,8 @@ static int __init applesmc_init(void) i++) {if (temperature_attributes[i] =NULL || label_attributes[i] =NULL ) { -printk (KERN_ERR "applesmc: More temperature sensors " -"in temperature_sensors_sets (at least %i)" -"than available sysfs files in " -"temperature_attributes (%i), please report " -"this bug.\n" , i, i-1 ); +pr_err ("More temperature sensors in temperature_sensors_sets (at least %i) than available sysfs files in temperature_attributes (%i), please report this bug\n" , + i, i-1 ); goto out_temperature; } ret = sysfs_create_file(&pdev->dev.kobj,
@@ -1745,7 +1739,7 @@ static int __init applesmc_init(void) goto out_light_ledclass; } -printk (KERN_INFO "applesmc: driver successfully loaded.\n" ); +pr_info ("driver successfully loaded\n" );return 0 ;
@@ -1778,7 +1772,7 @@ out_driver: out_region:release_region (APPLESMC_DATA_PORT ,APPLESMC_NR_PORTS ); out: -printk (KERN_WARNING "applesmc: driver init failed (ret=%d)!\n" , ret); +pr_warn ("driver init failed (ret=%d)!\n" , ret);return ret; }
@@ -1803,7 +1797,7 @@ static void __exit applesmc_exit(void)platform_driver_unregister (&applesmc_driver);release_region (APPLESMC_DATA_PORT ,APPLESMC_NR_PORTS ); -printk (KERN_INFO "applesmc: driver unloaded.\n" ); +pr_info ("driver unloaded\n" ); }module_init (applesmc_init);
Signature · 7 lines
1.7.3.1.g432b3.dirty _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Re: [PATCH 04/32] drivers/hwmon/applesmc.c: Use pr_fmt and pr_<level>
Quoted 9 lines · Joe Perches
Added #define
pr_fmtKBUILD_MODNAME": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formatsSigned-off-by Joe Perches <[email protected]>--- drivers/hwmon/applesmc.c | 60 ++++++++++++++++++++------------------------- 1 files changed, 27 insertions(+), 33 deletions(-)
Minus the comments already provided, all good.
Thanks,
Henrik
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Guenter Roeck
AppliedRe: [04/32] drivers/hwmon/applesmc.c: Use pr_fmt and pr_<level>
In reply to Joe PerchesQuoted 7 lines · Joe Perches
Added #define
pr_fmtKBUILD_MODNAME": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formatsSigned-off-by Joe Perches <[email protected]>
Applied, with Henrik's Ack as discussed earlier.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
PATCH 5/32 drivers/hwmon/asb100.c: Use pr_fmt and pr_<level>
In reply to Guenter RoeckAdded #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats
--- drivers/hwmon/asb100.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-)
drivers/hwmon/asb100.c +5 -4
@@ -36,6 +36,8 @@asb100 7 3 1 4 0x31 0x0694 yes no */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/slab.h> #include <linux/i2c.h>
@@ -701,8 +703,7 @@ static int asb100_detect(struct i2c_client *client,int val1, val2;if (!i2c_check_functionality (adapter,I2C_FUNC_SMBUS_BYTE_DATA )) { -pr_debug ("asb100.o: detect failed, " -"smbus byte data not supported!\n" ); +pr_debug ("detect failed, smbus byte data not supported!\n" );return -ENODEV ; }
@@ -715,7 +716,7 @@ static int asb100_detect(struct i2c_client *client, (((!(val1 & 0x80)) && (val2 != 0x94)) || /* Check for ASB100 ID (high byte ) */ ((val1 & 0x80) && (val2 != 0x06)))) { -pr_debug ("asb100: detect failed, bad chip id 0x%02x!\n" , val2); +pr_debug ("detect failed, bad chip id 0x%02x!\n" , val2);return -ENODEV ; }
@@ -744,7 +745,7 @@ static int asb100_probe(struct i2c_client *client, data =kzalloc (sizeof (struct asb100_data ),GFP_KERNEL );if (!data) { -pr_debug ("asb100.o: probe failed, kzalloc failed!\n" ); +pr_debug ("probe failed, kzalloc failed!\n" ); err = -ENOMEM ; goto ERROR0; }
Signature · 7 lines
1.7.3.1.g432b3.dirty _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Guenter Roeck
AppliedRe: [05/32] drivers/hwmon/asb100.c: Use pr_fmt and pr_<level>
Quoted 7 lines · Joe Perches
Added #define
pr_fmtKBUILD_MODNAME": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formatsSigned-off-by Joe Perches <[email protected]>
Applied.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
PATCH 6/32 drivers/hwmon/asus_atk0110.c: Use pr_fmt and pr_<level>
In reply to Guenter RoeckAdded #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats
--- drivers/hwmon/asus_atk0110.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-)
drivers/hwmon/asus_atk0110.c +4 -3
@@ -5,6 +5,8 @@* See COPYING in the top level directory of the kernel tree. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/debugfs.h> #include <linux/kernel.h> #include <linux/hwmon.h>
@@ -1414,14 +1416,13 @@ static int __init atk0110_init(void)/* Make sure it's safe to access the device through ACPI */ if (!acpi_resources_are_enforced ()) { -pr_err ("atk: Resources not safely usable due to " -"acpi_enforce_resources kernel parameter\n" ); +pr_err ("Resources not safely usable due to acpi_enforce_resources kernel parameter\n" );return -EBUSY ; } ret =acpi_bus_register_driver (&atk_driver);if (ret) -pr_info ("atk: acpi_bus_register_driver failed: %d\n" , ret); +pr_info ("acpi_bus_register_driver failed: %d\n" , ret);return ret; }
Signature · 7 lines
1.7.3.1.g432b3.dirty _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Guenter Roeck
AppliedRe: [06/32] drivers/hwmon/asus_atk0110.c: Use pr_fmt and pr_<level>
Quoted 7 lines · Joe Perches
Added #define
pr_fmtKBUILD_MODNAME": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formatsSigned-off-by Joe Perches <[email protected]>
Applied.
On a side note, I let the long lines go through as long as checkpatch doesn't complain.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Luca Tettamanti
maintainerRe: [06/32] drivers/hwmon/asus_atk0110.c: Use pr_fmt and pr_<level>
Quoted 11 lines · Guenter Roeck
Quoted 7 lines · Joe Perches
Added #define
pr_fmtKBUILD_MODNAME": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formatsSigned-off-by Joe Perches <[email protected]>Applied.
On a side note, I let the long lines go through as long as checkpatch doesn't complain.
I lost sight of the discussion, but I thought that a better solution was to put the define for pr_fmt in a common header instead of scattering it in all the drivers.
Luca
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Re: [06/32] drivers/hwmon/asus_atk0110.c: Use pr_fmt and pr_<level>
Quoted 10 lines · Luca Tettamanti
Quoted 8 lines · Guenter Roeck
Quoted 7 lines · Joe Perches
Added #define
pr_fmtKBUILD_MODNAME": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formatsSigned-off-by Joe Perches <[email protected]>
Quoted 8 lines
Quoted 3 lines
Applied.
On a side note, I let the long lines go through as long as checkpatch doesn't complain.
I lost sight of the discussion, but I thought that a better solution was to put the define for
pr_fmtin a common header instead of scattering it in all the drivers.
We went back and forth on it, and concluded that Joe's current approach, while not optimal, is still the best - ie make the changes as he proposed and get rid of the pr_fmt defines at the very end, after all individual files have been changed. Everything else is just too intrusive.
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
PATCH 7/32 drivers/hwmon/coretemp.c: Use pr_fmt and pr_<level>
In reply to Guenter RoeckAdded #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats
--- drivers/hwmon/coretemp.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-)
drivers/hwmon/coretemp.c +6 -5
@@ -20,6 +20,8 @@* 02110-1301 USA. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h>
@@ -445,8 +447,8 @@ static int __cpuinit coretemp_device_add(unsigned int cpu)* without thermal sensors will be filtered out. */ if (!cpu_has (c,X86_FEATURE_DTS )) { - printk(KERN_INFO DRVNAME ": CPU (model=0x%x)" - " has no thermal sensor.\n", c->x86_model); +pr_info ("CPU (model=0x%x) has no thermal sensor\n" , + c->x86_model);return 0 ; }
@@ -466,7 +468,7 @@ static int __cpuinit coretemp_device_add(unsigned int cpu) pdev =platform_device_alloc (DRVNAME , cpu);if (!pdev) { err = -ENOMEM ; - printk(KERN_ERR DRVNAME ": Device allocation failed\n"); +pr_err ("Device allocation failed\n" ); goto exit; }
@@ -478,8 +480,7 @@ static int __cpuinit coretemp_device_add(unsigned int cpu) err =platform_device_add (pdev);if (err) { - printk(KERN_ERR DRVNAME ": Device addition failed (%d)\n", - err); +pr_err ("Device addition failed (%d)\n" , err); goto exit_device_free; }
Signature · 7 lines
1.7.3.1.g432b3.dirty _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Guenter Roeck
AppliedRe: [07/32] drivers/hwmon/coretemp.c: Use pr_fmt and pr_<level>
Quoted 7 lines · Joe Perches
Added #define
pr_fmtKBUILD_MODNAME": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formatsSigned-off-by Joe Perches <[email protected]>
Applied.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
PATCH 8/32 drivers/hwmon/dme1737.c: Use pr_fmt and pr_<level>
In reply to Guenter RoeckAdded #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats
--- drivers/hwmon/dme1737.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-)
drivers/hwmon/dme1737.c +6 -6
@@ -25,6 +25,8 @@* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h>
@@ -2446,7 +2448,7 @@ static int __init dme1737_isa_detect(int sio_cip, unsigned short *addr)/* Get the base address of the runtime registers */ if (!(base_addr = (dme1737_sio_inb (sio_cip,0x60 ) <<8 ) |dme1737_sio_inb (sio_cip,0x61 ))) { -printk (KERN_ERR "dme1737: Base address not set.\n" ); +pr_err ("Base address not set\n" ); err = -ENODEV ; goto exit; }
@@ -2475,20 +2477,18 @@ static int __init dme1737_isa_device_add(unsigned short addr) goto exit;if (!(pdev =platform_device_alloc ("dme1737" , addr))) { -printk (KERN_ERR "dme1737: Failed to allocate device.\n" ); +pr_err ("Failed to allocate device\n" ); err = -ENOMEM ; goto exit; }if ((err =platform_device_add_resources (pdev, &res,1 ))) { -printk (KERN_ERR "dme1737: Failed to add device resource " -"(err = %d).\n" , err); +pr_err ("Failed to add device resource (err = %d)\n" , err); goto exit_device_put; }if ((err =platform_device_add (pdev))) { -printk (KERN_ERR "dme1737: Failed to add device (err = %d).\n" , - err); +pr_err ("Failed to add device (err = %d)\n" , err); goto exit_device_put; }
Signature · 7 lines
1.7.3.1.g432b3.dirty _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Guenter Roeck
AppliedRe: [08/32] drivers/hwmon/dme1737.c: Use pr_fmt and pr_<level>
Quoted 7 lines · Joe Perches
Added #define
pr_fmtKBUILD_MODNAME": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formatsSigned-off-by Joe Perches <[email protected]>
Applied.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
PATCH 9/32 drivers/hwmon/f71805f.c: Use pr_fmt and pr_<level>
In reply to Guenter RoeckAdded #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats
--- drivers/hwmon/f71805f.c | 29 +++++++++++++---------------- 1 files changed, 13 insertions(+), 16 deletions(-)
drivers/hwmon/f71805f.c +13 -16
@@ -28,6 +28,8 @@* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h>
@@ -1309,7 +1311,7 @@ static int __devinit f71805f_probe(struct platform_device *pdev)if (!(data =kzalloc (sizeof (struct f71805f_data ),GFP_KERNEL ))) { err = -ENOMEM ; - printk(KERN_ERR DRVNAME ": Out of memory\n"); +pr_err ("Out of memory\n" ); goto exit; }
@@ -1451,7 +1453,7 @@ static int __init f71805f_device_add(unsigned short address, pdev =platform_device_alloc (DRVNAME , address);if (!pdev) { err = -ENOMEM ; - printk(KERN_ERR DRVNAME ": Device allocation failed\n"); +pr_err ("Device allocation failed\n" ); goto exit; }
@@ -1462,22 +1464,20 @@ static int __init f71805f_device_add(unsigned short address, err =platform_device_add_resources (pdev, &res,1 );if (err) { - printk(KERN_ERR DRVNAME ": Device resource addition failed " - "(%d)\n", err); +pr_err ("Device resource addition failed (%d)\n" , err); goto exit_device_put; } err =platform_device_add_data (pdev, sio_data,sizeof (struct f71805f_sio_data ));if (err) { - printk(KERN_ERR DRVNAME ": Platform data allocation failed\n"); +pr_err ("Platform data allocation failed\n" ); goto exit_device_put; } err =platform_device_add (pdev);if (err) { - printk(KERN_ERR DRVNAME ": Device addition failed (%d)\n", - err); +pr_err ("Device addition failed (%d)\n" , err); goto exit_device_put; }
@@ -1516,30 +1516,27 @@ static int __init f71805f_find(int sioaddr, unsigned short *address, sio_data->fnsel1 =superio_inb (sioaddr,SIO_REG_FNSEL1 );break ;default : - printk(KERN_INFO DRVNAME ": Unsupported Fintek device, " - "skipping\n"); +pr_info ("Unsupported Fintek device, skipping\n" ); goto exit; }superio_select (sioaddr,F71805F_LD_HWM );if (!(superio_inb (sioaddr,SIO_REG_ENABLE ) &0x01 )) { - printk(KERN_WARNING DRVNAME ": Device not activated, " - "skipping\n"); +pr_warn ("Device not activated, skipping\n" ); goto exit; } *address =superio_inw (sioaddr,SIO_REG_ADDR );if (*address =0 ) { - printk(KERN_WARNING DRVNAME ": Base address not set, " - "skipping\n"); +pr_warn ("Base address not set, skipping\n" ); goto exit; } *address &= ~(REGION_LENGTH -1 );/* Ignore 3 LSB */ err =0 ; - printk(KERN_INFO DRVNAME ": Found %s chip at %#x, revision %u\n", - names[sio_data->kind], *address, - superio_inb(sioaddr, SIO_REG_DEVREV)); +pr_info ("Found %s chip at %#x, revision %u\n" , + names[sio_data->kind], *address, +superio_inb (sioaddr,SIO_REG_DEVREV )); exit:superio_exit (sioaddr);
Signature · 7 lines
1.7.3.1.g432b3.dirty _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Guenter Roeck
AppliedRe: [09/32] drivers/hwmon/f71805f.c: Use pr_fmt and pr_<level>
Quoted 7 lines · Joe Perches
Added #define
pr_fmtKBUILD_MODNAME": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formatsSigned-off-by Joe Perches <[email protected]>
Applied.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
PATCH 10/32 drivers/hwmon/f71882fg.c: Use pr_fmt and pr_<level>
In reply to Guenter RoeckAdded #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats
--- drivers/hwmon/f71882fg.c | 23 ++++++++++++----------- 1 files changed, 12 insertions(+), 11 deletions(-)
drivers/hwmon/f71882fg.c +12 -11
@@ -18,6 +18,8 @@* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h>
@@ -865,8 +867,7 @@ static inline int superio_enter(int base) {/* Don't step on other drivers' I/O space by accident */ if (!request_muxed_region (base,2 ,DRVNAME )) { - printk(KERN_ERR DRVNAME ": I/O address 0x%04x already in use\n", - base); +pr_err ("I/O address 0x%04x already in use\n" , base);return -EBUSY ; }
@@ -2192,7 +2193,7 @@ static int __init f71882fg_find(int sioaddr, unsigned short *address, devid =superio_inw (sioaddr,SIO_REG_MANID );if (devid !=SIO_FINTEK_ID ) { -pr_debug (DRVNAME ": Not a Fintek device\n" ); +pr_debug ("Not a Fintek device\n" ); err = -ENODEV ; goto exit; }
@@ -2215,8 +2216,8 @@ static int __init f71882fg_find(int sioaddr, unsigned short *address, sio_data->type = f8000;break ;default : - printk(KERN_INFO DRVNAME ": Unsupported Fintek device: %04x\n", - (unsigned int)devid); +pr_info ("Unsupported Fintek device: %04x\n" , + (unsigned int )devid); err = -ENODEV ; goto exit; }
@@ -2227,21 +2228,21 @@ static int __init f71882fg_find(int sioaddr, unsigned short *address,superio_select (sioaddr,SIO_F71882FG_LD_HWM );if (!(superio_inb (sioaddr,SIO_REG_ENABLE ) &0x01 )) { - printk(KERN_WARNING DRVNAME ": Device not activated\n"); +pr_warn ("Device not activated\n" ); err = -ENODEV ; goto exit; } *address =superio_inw (sioaddr,SIO_REG_ADDR );if (*address =0 ) { - printk(KERN_WARNING DRVNAME ": Base address not set\n"); +pr_warn ("Base address not set\n" ); err = -ENODEV ; goto exit; } *address &= ~(REGION_LENGTH -1 );/* Ignore 3 LSB */ err =0 ; - printk(KERN_INFO DRVNAME ": Found %s chip at %#x, revision %d\n", +pr_info ("Found %s chip at %#x, revision %d\n" , f71882fg_names[sio_data->type], (unsigned int )*address, (int )superio_inb (sioaddr,SIO_REG_DEVREV )); exit:
@@ -2270,20 +2271,20 @@ static int __init f71882fg_device_add(unsigned short address, err =platform_device_add_resources (f71882fg_pdev, &res,1 );if (err) { - printk(KERN_ERR DRVNAME ": Device resource addition failed\n"); +pr_err ("Device resource addition failed\n" ); goto exit_device_put; } err =platform_device_add_data (f71882fg_pdev, sio_data,sizeof (struct f71882fg_sio_data ));if (err) { - printk(KERN_ERR DRVNAME ": Platform data allocation failed\n"); +pr_err ("Platform data allocation failed\n" ); goto exit_device_put; } err =platform_device_add (f71882fg_pdev);if (err) { - printk(KERN_ERR DRVNAME ": Device addition failed\n"); +pr_err ("Device addition failed\n" ); goto exit_device_put; }
Signature · 7 lines
1.7.3.1.g432b3.dirty _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Guenter Roeck
AppliedRe: [10/32] drivers/hwmon/f71882fg.c: Use pr_fmt and pr_<level>
Quoted 7 lines · Joe Perches
Added #define
pr_fmtKBUILD_MODNAME": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formatsSigned-off-by Joe Perches <[email protected]>
Applied.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
PATCH 11/32 drivers/hwmon/hp_accel.c: Use pr_fmt and pr_<level>
In reply to Guenter RoeckAdded #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats
--- drivers/hwmon/hp_accel.c | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-)
drivers/hwmon/hp_accel.c +7 -6
@@ -20,6 +20,8 @@* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/kernel.h> #include <linux/init.h> #include <linux/dmi.h>
@@ -147,7 +149,7 @@ int lis3lv02d_acpi_write(struct lis3lv02d *lis3, int reg, u8 val)static int lis3lv02d_dmi_matched (const struct dmi_system_id *dmi) { lis3_dev.ac = *((union axis_conversion *)dmi->driver_data); - printk(KERN_INFO DRIVER_NAME ": hardware type %s found.\n", dmi->ident); +pr_info ("hardware type %s found\n" , dmi->ident);return 1 ; }
@@ -303,11 +305,10 @@ static int lis3lv02d_add(struct acpi_device *device)/* If possible use a "standard" axes order */ if (lis3_dev.ac.x && lis3_dev.ac.y && lis3_dev.ac.z) { - printk(KERN_INFO DRIVER_NAME ": Using custom axes %d,%d,%d\n", - lis3_dev.ac.x, lis3_dev.ac.y, lis3_dev.ac.z); +pr_info ("Using custom axes %d,%d,%d\n" , + lis3_dev.ac.x, lis3_dev.ac.y, lis3_dev.ac.z); }else if (dmi_check_system (lis3lv02d_dmi_ids) =0 ) { - printk(KERN_INFO DRIVER_NAME ": laptop model unknown, " - "using default axes configuration\n"); +pr_info ("laptop model unknown, using default axes configuration\n" ); lis3_dev.ac = lis3lv02d_axis_normal; }
@@ -385,7 +386,7 @@ static int __init lis3lv02d_init_module(void)if (ret <0 )return ret; - printk(KERN_INFO DRIVER_NAME " driver loaded.\n"); +pr_info ("driver loaded\n" );return 0 ; }
Signature · 7 lines
1.7.3.1.g432b3.dirty _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Guenter Roeck
AppliedRe: [11/32] drivers/hwmon/hp_accel.c: Use pr_fmt and pr_<level>
Quoted 7 lines · Joe Perches
Added #define
pr_fmtKBUILD_MODNAME": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formatsSigned-off-by Joe Perches <[email protected]>
Applied.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
PATCH 12/32 drivers/hwmon/hwmon-vid.c: Use pr_fmt and pr_<level>
In reply to Guenter RoeckAdded #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats
--- drivers/hwmon/hwmon-vid.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-)
drivers/hwmon/hwmon-vid.c +6 -5
@@ -22,6 +22,8 @@* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/kernel.h> #include <linux/hwmon-vid.h>
@@ -146,8 +148,8 @@ int vid_from_reg(int val, u8 vrm)return (val >0x77 ?0 : (1500000 - (val *12500 ) +500 ) /1000 );default :/* report 0 for unknown */ if (vrm) -printk (KERN_WARNING "hwmon-vid: Requested unsupported " -"VRM version (%u)\n" , (unsigned int )vrm); +pr_warn ("Requested unsupported VRM version (%u)\n" , + (unsigned int )vrm);return 0 ; } }
@@ -246,8 +248,7 @@ u8 vid_which_vrm(void) } vrm_ret =find_vrm (eff_family, eff_model, eff_stepping, c->x86_vendor);if (vrm_ret =0 ) -printk (KERN_INFO "hwmon-vid: Unknown VRM version of your " -"x86 CPU\n" ); +pr_info ("Unknown VRM version of your x86 CPU\n" );return vrm_ret; }
@@ -255,7 +256,7 @@ u8 vid_which_vrm(void)#else u8 vid_which_vrm (void ) { -printk (KERN_INFO "hwmon-vid: Unknown VRM version of your CPU\n" ); +pr_info ("Unknown VRM version of your CPU\n" );return 0 ; }#endif
Signature · 7 lines
1.7.3.1.g432b3.dirty _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Guenter Roeck
AppliedRe: [12/32] drivers/hwmon/hwmon-vid.c: Use pr_fmt and pr_<level>
Quoted 7 lines · Joe Perches
Added #define
pr_fmtKBUILD_MODNAME": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formatsSigned-off-by Joe Perches <[email protected]>
Applied.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
PATCH 13/32 drivers/hwmon/hwmon.c: Use pr_fmt and pr_<level>
In reply to Guenter RoeckAdded #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats
--- drivers/hwmon/hwmon.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/hwmon/hwmon.c +3 -1
@@ -10,6 +10,8 @@the Free Software Foundation; version 2 of the License. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/device.h> #include <linux/err.h>
@@ -119,7 +121,7 @@ static int __init hwmon_init(void) hwmon_class =class_create (THIS_MODULE ,"hwmon" );if (IS_ERR (hwmon_class)) { -printk (KERN_ERR "hwmon.c: couldn't create sysfs class\n" ); +pr_err ("couldn't create sysfs class\n" );return PTR_ERR (hwmon_class); }return 0 ;
Signature · 7 lines
1.7.3.1.g432b3.dirty _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Guenter Roeck
AppliedRe: [13/32] drivers/hwmon/hwmon.c: Use pr_fmt and pr_<level>
Quoted 7 lines · Joe Perches
Added #define
pr_fmtKBUILD_MODNAME": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formatsSigned-off-by Joe Perches <[email protected]>
Applied.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
PATCH 14/32 drivers/hwmon/ibmaem.c: Use pr_fmt and pr_<level>
In reply to Guenter RoeckAdded #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats
--- drivers/hwmon/ibmaem.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/hwmon/ibmaem.c +3 -1
@@ -20,6 +20,8 @@* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/ipmi.h> #include <linux/module.h> #include <linux/hwmon.h>
@@ -1090,7 +1092,7 @@ static int __init aem_init(void) res =driver_register (&aem_driver.driver);if (res) { -printk (KERN_ERR "Can't register aem driver\n" ); +pr_err ("Can't register aem driver\n" );return res; }
Signature · 7 lines
1.7.3.1.g432b3.dirty _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Guenter Roeck
AppliedRe: [14/32] drivers/hwmon/ibmaem.c: Use pr_fmt and pr_<level>
Quoted 7 lines · Joe Perches
Added #define
pr_fmtKBUILD_MODNAME": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formatsSigned-off-by Joe Perches <[email protected]>
Applied.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
PATCH 15/32 drivers/hwmon/it87.c: Use pr_fmt and pr_<level>
In reply to Guenter RoeckAdded #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats
--- drivers/hwmon/it87.c | 30 ++++++++++++++---------------- 1 files changed, 14 insertions(+), 16 deletions(-)
drivers/hwmon/it87.c +14 -16
@@ -36,6 +36,8 @@* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h>
@@ -1493,26 +1495,25 @@ static int __init it87_find(unsigned short *address,case 0xffff :/* No device at all */ goto exit;default : -pr_debug (DRVNAME ": Unsupported chip (DEVID=0x%x)\n" , - chip_type); +pr_debug ("Unsupported chip (DEVID=0x%x)\n" , chip_type); goto exit; }superio_select (PME );if (!(superio_inb (IT87_ACT_REG ) &0x01 )) { -pr_info ("it87: Device not activated, skipping\n" ); +pr_info ("Device not activated, skipping\n" ); goto exit; } *address =superio_inw (IT87_BASE_REG ) & ~(IT87_EXTENT -1 );if (*address =0 ) { -pr_info ("it87: Base address not set, skipping\n" ); +pr_info ("Base address not set, skipping\n" ); goto exit; } err =0 ; sio_data->revision =superio_inb (DEVREV ) &0x0f ; -pr_info ("it87: Found IT%04xF chip at 0x%x, revision %d\n" , +pr_info ("Found IT%04xF chip at 0x%x, revision %d\n" , chip_type, *address, sio_data->revision);/* in8 (Vbat) is always internal */
@@ -1533,7 +1534,7 @@ static int __init it87_find(unsigned short *address,/* We need at least 4 VID pins */ reg =superio_inb (IT87_SIO_GPIO3_REG );if (reg &0x0f ) { -pr_info ("it87: VID is disabled (pins used for GPIO)\n" ); +pr_info ("VID is disabled (pins used for GPIO)\n" ); sio_data->skip_vid =1 ; }
@@ -1568,7 +1569,7 @@ static int __init it87_find(unsigned short *address,if (sio_data->type = it8720 && !(reg & (1 <<1 ))) { reg |= (1 <<1 );superio_outb (IT87_SIO_PINX2_REG , reg); -pr_notice ("it87: Routing internal VCCH to in7\n" ); +pr_notice ("Routing internal VCCH to in7\n" ); }if (reg & (1 <<0 )) sio_data->internal |= (1 <<0 );
@@ -1578,7 +1579,7 @@ static int __init it87_find(unsigned short *address, sio_data->beep_pin =superio_inb (IT87_SIO_BEEP_PIN_REG ) &0x3f ; }if (sio_data->beep_pin) -pr_info ("it87: Beeping is supported\n" ); +pr_info ("Beeping is supported\n" );/* Disable specific features based on DMI strings */ board_vendor =dmi_get_system_info (DMI_BOARD_VENDOR );
@@ -1592,8 +1593,7 @@ static int __init it87_find(unsigned short *address,the PWM2 duty cycle, so we disable it. I use the board name string as the trigger in case the same board is ever used in other systems. */ -pr_info ("it87: Disabling pwm2 due to " -"hardware constraints\n" ); +pr_info ("Disabling pwm2 due to hardware constraints\n" ); sio_data->skip_pwm = (1 <<1 ); } }
@@ -2086,28 +2086,26 @@ static int __init it87_device_add(unsigned short address, pdev =platform_device_alloc (DRVNAME , address);if (!pdev) { err = -ENOMEM ; - printk(KERN_ERR DRVNAME ": Device allocation failed\n"); +pr_err ("Device allocation failed\n" ); goto exit; } err =platform_device_add_resources (pdev, &res,1 );if (err) { - printk(KERN_ERR DRVNAME ": Device resource addition failed " - "(%d)\n", err); +pr_err ("Device resource addition failed (%d)\n" , err); goto exit_device_put; } err =platform_device_add_data (pdev, sio_data,sizeof (struct it87_sio_data ));if (err) { - printk(KERN_ERR DRVNAME ": Platform data allocation failed\n"); +pr_err ("Platform data allocation failed\n" ); goto exit_device_put; } err =platform_device_add (pdev);if (err) { - printk(KERN_ERR DRVNAME ": Device addition failed (%d)\n", - err); +pr_err ("Device addition failed (%d)\n" , err); goto exit_device_put; }
Signature · 7 lines
1.7.3.1.g432b3.dirty _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Jean Delvare
AppliedRe: [PATCH 15/32] drivers/hwmon/it87.c: Use pr_fmt and pr_<level>
Quoted 9 lines · Joe Perches
Added #define
pr_fmtKBUILD_MODNAME": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formatsSigned-off-by Joe Perches <[email protected]>--- drivers/hwmon/it87.c | 30 ++++++++++++++---------------- 1 files changed, 14 insertions(+), 16 deletions(-)
Applied, thanks.
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
PATCH 16/32 drivers/hwmon/lis3lv02d.c: Use pr_fmt and pr_<level>
In reply to Guenter RoeckAdded #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats
--- drivers/hwmon/lis3lv02d.c | 23 +++++++++++------------ 1 files changed, 11 insertions(+), 12 deletions(-)
drivers/hwmon/lis3lv02d.c +11 -12
@@ -20,6 +20,8 @@* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/kernel.h> #include <linux/init.h> #include <linux/dmi.h>
@@ -673,8 +675,7 @@ static void lis3lv02d_8b_configure(struct lis3lv02d *dev,IRQF_ONESHOT , DRIVER_NAME, &lis3_dev);if (err <0 ) - printk(KERN_ERR DRIVER_NAME -"No second IRQ. Limited functionality\n" ); +pr_err ("No second IRQ. Limited functionality\n" ); } }
@@ -691,7 +692,7 @@ int lis3lv02d_init_device(struct lis3lv02d *dev)switch (dev->whoami) {case WAI_12B : - printk(KERN_INFO DRIVER_NAME ": 12 bits sensor found\n"); +pr_info ("12 bits sensor found\n" ); dev->read_data = lis3lv02d_read_12; dev->mdps_max_val =2048 ; dev->pwron_delay =LIS3_PWRON_DELAY_WAI_12B ;
@@ -700,7 +701,7 @@ int lis3lv02d_init_device(struct lis3lv02d *dev) dev->scale =LIS3_SENSITIVITY_12B ;break ;case WAI_8B : - printk(KERN_INFO DRIVER_NAME ": 8 bits sensor found\n"); +pr_info ("8 bits sensor found\n" ); dev->read_data = lis3lv02d_read_8; dev->mdps_max_val =128 ; dev->pwron_delay =LIS3_PWRON_DELAY_WAI_8B ;
@@ -709,7 +710,7 @@ int lis3lv02d_init_device(struct lis3lv02d *dev) dev->scale =LIS3_SENSITIVITY_8B ;break ;case WAI_3DC : - printk(KERN_INFO DRIVER_NAME ": 8 bits 3DC sensor found\n"); +pr_info ("8 bits 3DC sensor found\n" ); dev->read_data = lis3lv02d_read_8; dev->mdps_max_val =128 ; dev->pwron_delay =LIS3_PWRON_DELAY_WAI_8B ;
@@ -718,8 +719,7 @@ int lis3lv02d_init_device(struct lis3lv02d *dev) dev->scale =LIS3_SENSITIVITY_8B ;break ;default : - printk(KERN_ERR DRIVER_NAME - ": unknown sensor type 0x%X\n", dev->whoami); +pr_err ("unknown sensor type 0x%X\n" , dev->whoami);return -EINVAL ; }
@@ -729,7 +729,7 @@ int lis3lv02d_init_device(struct lis3lv02d *dev)lis3lv02d_poweron (dev);if (lis3lv02d_joystick_enable ()) - printk(KERN_ERR DRIVER_NAME ": joystick initialization failed\n"); +pr_err ("joystick initialization failed\n" );/* passing in platform specific data is purely optional and only * used by the SPI transport layer at the moment */
@@ -745,8 +745,7 @@ int lis3lv02d_init_device(struct lis3lv02d *dev)/* bail if we did not get an IRQ from the bus layer */ if (!dev->irq) { - printk(KERN_ERR DRIVER_NAME - ": No IRQ. Disabling /dev/freefall\n"); +pr_err ("No IRQ. Disabling /dev/freefall\n" ); goto out; }
@@ -772,12 +771,12 @@ int lis3lv02d_init_device(struct lis3lv02d *dev) DRIVER_NAME, &lis3_dev);if (err <0 ) { - printk(KERN_ERR DRIVER_NAME "Cannot get IRQ\n"); +pr_err ("Cannot get IRQ\n" ); goto out; }if (misc_register (&lis3lv02d_misc_device)) - printk(KERN_ERR DRIVER_NAME ": misc_register failed\n"); +pr_err ("misc_register failed\n" ); out:return 0 ; }
Signature · 7 lines
1.7.3.1.g432b3.dirty _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Guenter Roeck
AppliedRe: [16/32] drivers/hwmon/lis3lv02d.c: Use pr_fmt and pr_<level>
Quoted 7 lines · Joe Perches
Added #define
pr_fmtKBUILD_MODNAME": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formatsSigned-off-by Joe Perches <[email protected]>
Applied.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
PATCH 17/32 drivers/hwmon/lm70.c: Use pr_fmt and pr_<level>
In reply to Guenter RoeckAdded #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats
--- drivers/hwmon/lm70.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
drivers/hwmon/lm70.c +3 -2
@@ -24,6 +24,8 @@* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/init.h> #include <linux/module.h> #include <linux/kernel.h>
@@ -67,8 +69,7 @@ static ssize_t lm70_sense_temp(struct device *dev,*/ status =spi_write_then_read (spi,NULL ,0 , &rxbuf[0 ],2 );if (status <0 ) { -printk (KERN_WARNING -"spi_write_then_read failed with status %d\n" , status); +pr_warn ("spi_write_then_read failed with status %d\n" , status); goto out; } raw = (rxbuf[0 ] <<8 ) + rxbuf[1 ];
Signature · 7 lines
1.7.3.1.g432b3.dirty _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Guenter Roeck
AppliedRe: [17/32] drivers/hwmon/lm70.c: Use pr_fmt and pr_<level>
Quoted 7 lines · Joe Perches
Added #define
pr_fmtKBUILD_MODNAME": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formatsSigned-off-by Joe Perches <[email protected]>
Applied.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
PATCH 18/32 drivers/hwmon/lm78.c: Use pr_fmt and pr_<level>
In reply to Guenter RoeckAdded #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats
--- drivers/hwmon/lm78.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-)
drivers/hwmon/lm78.c +7 -7
@@ -19,6 +19,8 @@Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h>
@@ -858,7 +860,7 @@ static int __init lm78_isa_found(unsigned short address)* individually for the probing phase. */ for (port = address; port < address +LM78_EXTENT ; port++) {if (!request_region (port,1 ,"lm78" )) { -pr_debug ("lm78: Failed to request port 0x%x\n" , port); +pr_debug ("Failed to request port 0x%x\n" , port); goto release; } }
@@ -920,7 +922,7 @@ static int __init lm78_isa_found(unsigned short address) found =1 ;if (found) -pr_info ("lm78: Found an %s chip at %#x\n" , +pr_info ("Found an %s chip at %#x\n" , val &0x80 ?"LM79" :"LM78" , (int )address); release:
@@ -942,21 +944,19 @@ static int __init lm78_isa_device_add(unsigned short address) pdev =platform_device_alloc ("lm78" , address);if (!pdev) { err = -ENOMEM ; -printk (KERN_ERR "lm78: Device allocation failed\n" ); +pr_err ("Device allocation failed\n" ); goto exit; } err =platform_device_add_resources (pdev, &res,1 );if (err) { -printk (KERN_ERR "lm78: Device resource addition failed " -"(%d)\n" , err); +pr_err ("Device resource addition failed (%d)\n" , err); goto exit_device_put; } err =platform_device_add (pdev);if (err) { -printk (KERN_ERR "lm78: Device addition failed (%d)\n" , - err); +pr_err ("Device addition failed (%d)\n" , err); goto exit_device_put; }
Signature · 7 lines
1.7.3.1.g432b3.dirty _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Jean Delvare
AppliedRe: [PATCH 18/32] drivers/hwmon/lm78.c: Use pr_fmt and pr_<level>
Quoted 9 lines · Joe Perches
Added #define
pr_fmtKBUILD_MODNAME": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formatsSigned-off-by Joe Perches <[email protected]>--- drivers/hwmon/lm78.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-)
Applied, thanks.
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
PATCH 19/32 drivers/hwmon/pc87360.c: Use pr_fmt and pr_<level>
In reply to Guenter RoeckAdded #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats
--- drivers/hwmon/pc87360.c | 32 +++++++++++++------------------- 1 files changed, 13 insertions(+), 19 deletions(-)
drivers/hwmon/pc87360.c +13 -19
@@ -33,6 +33,8 @@* the standard Super-I/O addresses is used (0x2E/0x2F or 0x4E/0x4F). */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h>
@@ -1031,16 +1033,15 @@ static int __init pc87360_find(int sioaddr, u8 *devid, unsigned short *addresses val =superio_inb (sioaddr,ACT );if (!(val &0x01 )) { -printk (KERN_INFO "pc87360: Device 0x%02x not " -"activated\n" , logdev[i]); +pr_info ("Device 0x%02x not activated\n" , logdev[i]);continue ; } val = (superio_inb (sioaddr,BASE ) <<8 ) |superio_inb (sioaddr,BASE +1 );if (!val) { -printk (KERN_INFO "pc87360: Base address not set for " -"device 0x%02x\n" , logdev[i]); +pr_info ("Base address not set for device 0x%02x\n" , + logdev[i]);continue ; }
@@ -1071,14 +1072,11 @@ static int __init pc87360_find(int sioaddr, u8 *devid, unsigned short *addresses confreg[3 ] =superio_inb (sioaddr,0x25 );if (confreg[2 ] &0x40 ) { -printk (KERN_INFO "pc87360: Using " -"thermistors for temperature " -"monitoring\n" ); +pr_info ("Using thermistors for temperature monitoring\n" ); }if (confreg[3 ] &0xE0 ) { -printk (KERN_INFO "pc87360: VID " -"inputs routed (mode %u)\n" , - confreg[3 ] >>5 ); +pr_info ("VID inputs routed (mode %u)\n" , + confreg[3 ] >>5 ); } } }
@@ -1616,7 +1614,7 @@ static int __init pc87360_device_add(unsigned short address) pdev =platform_device_alloc ("pc87360" , address);if (!pdev) { err = -ENOMEM ; -printk (KERN_ERR "pc87360: Device allocation failed\n" ); +pr_err ("Device allocation failed\n" ); goto exit; }
@@ -1639,15 +1637,13 @@ static int __init pc87360_device_add(unsigned short address) err =platform_device_add_resources (pdev, res, res_count);if (err) { -printk (KERN_ERR "pc87360: Device resources addition failed " -"(%d)\n" , err); +pr_err ("Device resources addition failed (%d)\n" , err); goto exit_device_put; } err =platform_device_add (pdev);if (err) { -printk (KERN_ERR "pc87360: Device addition failed (%d)\n" , - err); +pr_err ("Device addition failed (%d)\n" , err); goto exit_device_put; }
@@ -1666,8 +1662,7 @@ static int __init pc87360_init(void)if (pc87360_find (0x2e , &devid, extra_isa) &&pc87360_find (0x4e , &devid, extra_isa)) { -printk (KERN_WARNING "pc87360: PC8736x not detected, " -"module not inserted.\n" ); +pr_warn ("PC8736x not detected, module not inserted\n" );return -ENODEV ; }
@@ -1680,8 +1675,7 @@ static int __init pc87360_init(void) }if (address =0x0000 ) { -printk (KERN_WARNING "pc87360: No active logical device, " -"module not inserted.\n" ); +pr_warn ("No active logical device, module not inserted\n" );return -ENODEV ; }
Signature · 7 lines
1.7.3.1.g432b3.dirty _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Re: [PATCH 19/32] drivers/hwmon/pc87360.c: Use pr_fmt and pr_<level>
Hi Joe,
Quoted 9 lines · Joe Perches
Added #define
pr_fmtKBUILD_MODNAME": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formatsSigned-off-by Joe Perches <[email protected]>--- drivers/hwmon/pc87360.c | 32 +++++++++++++------------------- 1 files changed, 13 insertions(+), 19 deletions(-)
The following is left in the driver:
#ifdef DEBUG printk(KERN_DEBUG "pc87360: Fan 1: mon=%d " "ctrl=%d inv=%d\n", (confreg[0]>>2)&1, (confreg[0]>>3)&1, (confreg[0]>>4)&1); printk(KERN_DEBUG "pc87360: Fan 2: mon=%d " "ctrl=%d inv=%d\n", (confreg[0]>>5)&1, (confreg[0]>>6)&1, (confreg[0]>>7)&1); printk(KERN_DEBUG "pc87360: Fan 3: mon=%d " "ctrl=%d inv=%d\n", confreg[1]&1, (confreg[1]>>1)&1, (confreg[1]>>2)&1);
#endif
Is there any reason why you didn't convert these to pr_debug()?
Quoted 35 lines
drivers/hwmon/pc87360.c +5
-4@@ -33,6 +33,8 @@* the standard Super-I/O addresses is used (0x2E/0x2F or 0x4E/0x4F). */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h> @@ -1031,16 +1033,15 @@ static int __init pc87360_find(int sioaddr, u8 *devid, unsigned short *addresses val =superio_inb (sioaddr,ACT );if (!(val &0x01 )) { -printk (KERN_INFO "pc87360: Device 0x%02x not " -"activated\n" , logdev[i]); +pr_info ("Device 0x%02x not activated\n" , logdev[i]);continue ; } val = (superio_inb (sioaddr,BASE ) <<8 ) |superio_inb (sioaddr,BASE +1 );if (!val) { -printk (KERN_INFO "pc87360: Base address not set for " -"device 0x%02x\n" , logdev[i]); +pr_info ("Base address not set for device 0x%02x\n" , + logdev[i]);continue ; }
drivers/hwmon/pc87360.c static int __init pc87360_find(int sioaddr, u8 *devid, unsigned short *addresses · line 1075
Quoted 7 lines
drivers/hwmon/pc87360.c +1
-3@@ -1071,14 +1072,11 @@ static int __init pc87360_find(int sioaddr, u8 *devid, unsigned short *addresses confreg[3 ] =superio_inb (sioaddr,0x25 );if (confreg[2 ] &0x40 ) { -printk (KERN_INFO "pc87360: Using " -"thermistors for temperature " -"monitoring\n" ); +pr_info ("Using thermistors for temperature monitoring\n" );
I know checkpatch.pl no longer complains about long lines when they include a string, but 98 columns seems excessive to me. It would be easy enough to spread over two lines.
Quoted 57 lines
drivers/hwmon/pc87360.c +7
-12}if (confreg[3 ] &0xE0 ) { -printk (KERN_INFO "pc87360: VID " -"inputs routed (mode %u)\n" , - confreg[3 ] >>5 ); +pr_info ("VID inputs routed (mode %u)\n" , + confreg[3 ] >>5 ); } } }@@ -1616,7 +1614,7 @@ static int __init pc87360_device_add(unsigned short address) pdev =platform_device_alloc ("pc87360" , address);if (!pdev) { err = -ENOMEM ; -printk (KERN_ERR "pc87360: Device allocation failed\n" ); +pr_err ("Device allocation failed\n" ); goto exit; }@@ -1639,15 +1637,13 @@ static int __init pc87360_device_add(unsigned short address) err =platform_device_add_resources (pdev, res, res_count);if (err) { -printk (KERN_ERR "pc87360: Device resources addition failed " -"(%d)\n" , err); +pr_err ("Device resources addition failed (%d)\n" , err); goto exit_device_put; } err =platform_device_add (pdev);if (err) { -printk (KERN_ERR "pc87360: Device addition failed (%d)\n" , - err); +pr_err ("Device addition failed (%d)\n" , err); goto exit_device_put; }@@ -1666,8 +1662,7 @@ static int __init pc87360_init(void)if (pc87360_find (0x2e , &devid, extra_isa) &&pc87360_find (0x4e , &devid, extra_isa)) { -printk (KERN_WARNING "pc87360: PC8736x not detected, " -"module not inserted.\n" ); +pr_warn ("PC8736x not detected, module not inserted\n" );return -ENODEV ; }@@ -1680,8 +1675,7 @@ static int __init pc87360_init(void) }if (address =0x0000 ) { -printk (KERN_WARNING "pc87360: No active logical device, " -"module not inserted.\n" ); +pr_warn ("No active logical device, module not inserted\n" );return -ENODEV ; }
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Re: [PATCH 19/32] drivers/hwmon/pc87360.c: Use pr_fmt and pr_<level>
Quoted 21 lines · Jean Delvare
Quoted 9 lines · Joe Perches
Added #define
pr_fmtKBUILD_MODNAME": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formatsSigned-off-by Joe Perches <[email protected]>--- drivers/hwmon/pc87360.c | 32 +++++++++++++------------------- 1 files changed, 13 insertions(+), 19 deletions(-)The following is left in the driver:
#ifdef DEBUG printk(KERN_DEBUG "pc87360: Fan 1: mon=%d " "ctrl=%d inv=%d\n", (confreg[0]>>2)&1, (confreg[0]>>3)&1, (confreg[0]>>4)&1); printk(KERN_DEBUG "pc87360: Fan 2: mon=%d " "ctrl=%d inv=%d\n", (confreg[0]>>5)&1, (confreg[0]>>6)&1, (confreg[0]>>7)&1); printk(KERN_DEBUG "pc87360: Fan 3: mon=%d " "ctrl=%d inv=%d\n", confreg[1]&1, (confreg[1]>>1)&1, (confreg[1]>>2)&1);
Quoted 3 lines
#endif
Is there any reason why you didn't convert these to
pr_debug()?
No. These should be converted to pr_debug as well.
The conversion was done via script and the script doesn't convert printk(KERN_DEBUG to pr_debug to avoid changing output.
Let me know if you want another patch.
Quoted 12 lines
drivers/hwmon/pc87360.c static int __init pc87360_find(int sioaddr, u8 *devid, unsigned short *addresses · line 1075
Quoted 8 lines
drivers/hwmon/pc87360.c +1
-3@@ -1071,14 +1072,11 @@ static int __init pc87360_find(int sioaddr, u8 *devid, unsigned short *addresses confreg[3 ] =superio_inb (sioaddr,0x25 );if (confreg[2 ] &0x40 ) { -printk (KERN_INFO "pc87360: Using " -"thermistors for temperature " -"monitoring\n" ); +pr_info ("Using thermistors for temperature monitoring\n" );I know checkpatch.pl no longer complains about long lines when they include a string, but 98 columns seems excessive to me. It would be easy enough to spread over two lines.
Also converted via a script.
If the string is split, it doesn't matter where it's split. The split just makes it harder to use grep.
Personally, I think it's better to ignore the line length of format strings completely. Once it wraps in an editor, it really doesn't matter how long the line is.
Of course, there are multiple strings in this file that use dev_<level> that are split across lines that could be converted as well so it's up to you if you want to leave those as is. Let me know if you want another patch to integrate those dev_<level> format strings.
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Re: [PATCH 19/32] drivers/hwmon/pc87360.c: Use pr_fmt and pr_<level>
Hi Joe,
Quoted 24 lines · Joe Perches
Quoted 23 lines · Jean Delvare
Quoted 9 lines · Joe Perches
Added #define
pr_fmtKBUILD_MODNAME": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formatsSigned-off-by Joe Perches <[email protected]>--- drivers/hwmon/pc87360.c | 32 +++++++++++++------------------- 1 files changed, 13 insertions(+), 19 deletions(-)The following is left in the driver:
#ifdef DEBUG printk(KERN_DEBUG "pc87360: Fan 1: mon=%d " "ctrl=%d inv=%d\n", (confreg[0]>>2)&1, (confreg[0]>>3)&1, (confreg[0]>>4)&1); printk(KERN_DEBUG "pc87360: Fan 2: mon=%d " "ctrl=%d inv=%d\n", (confreg[0]>>5)&1, (confreg[0]>>6)&1, (confreg[0]>>7)&1); printk(KERN_DEBUG "pc87360: Fan 3: mon=%d " "ctrl=%d inv=%d\n", confreg[1]&1, (confreg[1]>>1)&1, (confreg[1]>>2)&1);#endif
Quoted 8 lines
Quoted 1 line
Is there any reason why you didn't convert these to
pr_debug()?No. These should be converted to
pr_debugas well.The conversion was done via script and the script doesn't convert printk(KERN_DEBUG to
pr_debugto avoid changing output.Let me know if you want another patch.
I'll fix these myself, no problem.
Quoted 14 lines
Quoted 4 lines
Quoted 4 lines
drivers/hwmon/pc87360.c +0
-0@@ -1071,14 +1072,11 @@ static int __init pc87360_find(int sioaddr, u8 *devid, unsigned short *addresses confreg[3 ] =superio_inb (sioaddr,0x25 );Quoted 9 lines
drivers/hwmon/pc87360.c static int __init pc87360_find(int sioaddr, u8 *devid, unsigned short *addresses · line 1075
Quoted 5 lines
drivers/hwmon/pc87360.c +1
-3if (confreg[2 ] &0x40 ) { -printk (KERN_INFO "pc87360: Using " -"thermistors for temperature " -"monitoring\n" ); +pr_info ("Using thermistors for temperature monitoring\n" );I know checkpatch.pl no longer complains about long lines when they include a string, but 98 columns seems excessive to me. It would be easy enough to spread over two lines.
Quoted 4 lines
Also converted via a script.
If the string is split, it doesn't matter where it's split. The split just makes it harder to use grep.
I've heard this argument many times, but it doesn't really hold examination, I'm afraid. If nothing else, your patches are enforcing the use of the module name as the log message prefix. So there's no reason to grep for the message itself, when you can use "find" and search for the module name 80 times faster.
Secondly, grep will find strings in binaries, and there it doesn't matter if the string was split in the source file or not. If you consider that grepping the whole kernel tree is acceptable performance-wise, you probably don't mind processing the binary files as well. The only drawback of this approach, I concede, is that it assumes that the module in question has already been build locally. But I doubt this is a problem in practice.
Thirdly, log messages aren't raw messages, they are format strings, so grepping the sources for the output is never guaranteed to work in the first place, split strings or not.
Fourthly, log messages aren't guaranteed to be unique over the kernel tree, and as the tree grows, duplicates are more frequent.
And for completeness: if you really want to use grep, then yes, the point at which the strings are split does matter. If you choose carefully the split point, then it doesn't prevent grepping for the message. If you split right before or after a % format specification, the effect is zero with regards to grepping.
Quoted 3 lines
Personally, I think it's better to ignore the line length of format strings completely. Once it wraps in an editor, it really doesn't matter how long the line is.
Except that not all editors are configured to wrap. Mine in particular isn't - I find it very difficult to read source code when long lines are wrapped. So the extra characters are simply not displayed - and there it matters somewhat if this is just the trailing "); that I don't see, or half of the message.
Quoted 6 lines
Of course, there are multiple strings in this file that use dev_<level> that are split across lines that could be converted as well so it's up to you if you want to leave those as is. Let me know if you want another patch to integrate those dev_<level> format strings.
I'll do things the way I like them, I think it will be more efficient for everyone than discussing the costs and benefits of split strings for the rest of the day ;)
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
PATCH 20/32 drivers/hwmon/pc87427.c: Use pr_fmt and pr_<level>
In reply to Guenter RoeckAdded #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats
--- drivers/hwmon/pc87427.c | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-)
drivers/hwmon/pc87427.c +13 -13
@@ -22,6 +22,8 @@* mode, and voltages aren't supported at all. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h>
@@ -1077,7 +1079,7 @@ static int __devinit pc87427_probe(struct platform_device *pdev) data =kzalloc (sizeof (struct pc87427_data ),GFP_KERNEL );if (!data) { err = -ENOMEM ; - printk(KERN_ERR DRVNAME ": Out of memory\n"); +pr_err ("Out of memory\n" ); goto exit; }
@@ -1196,28 +1198,26 @@ static int __init pc87427_device_add(const struct pc87427_sio_data *sio_data) pdev =platform_device_alloc (DRVNAME , res[0 ].start);if (!pdev) { err = -ENOMEM ; - printk(KERN_ERR DRVNAME ": Device allocation failed\n"); +pr_err ("Device allocation failed\n" ); goto exit; } err =platform_device_add_resources (pdev, res, res_count);if (err) { - printk(KERN_ERR DRVNAME ": Device resource addition failed " - "(%d)\n", err); +pr_err ("Device resource addition failed (%d)\n" , err); goto exit_device_put; } err =platform_device_add_data (pdev, sio_data,sizeof (struct pc87427_sio_data ));if (err) { - printk(KERN_ERR DRVNAME ": Platform data allocation failed\n"); +pr_err ("Platform data allocation failed\n" ); goto exit_device_put; } err =platform_device_add (pdev);if (err) { - printk(KERN_ERR DRVNAME ": Device addition failed (%d)\n", - err); +pr_err ("Device addition failed (%d)\n" , err); goto exit_device_put; }
@@ -1249,23 +1249,23 @@ static int __init pc87427_find(int sioaddr, struct pc87427_sio_data *sio_data) val =superio_inb (sioaddr,SIOREG_ACT );if (!(val &0x01 )) { - printk(KERN_INFO DRVNAME ": Logical device 0x%02x " - "not activated\n", logdev[i]); +pr_info ("Logical device 0x%02x not activated\n" , + logdev[i]);continue ; } val =superio_inb (sioaddr,SIOREG_MAP );if (val &0x01 ) { - printk(KERN_WARNING DRVNAME ": Logical device 0x%02x " - "is memory-mapped, can't use\n", logdev[i]); +pr_warn ("Logical device 0x%02x is memory-mapped, can't use\n" , + logdev[i]);continue ; } val = (superio_inb (sioaddr,SIOREG_IOBASE ) <<8 ) |superio_inb (sioaddr,SIOREG_IOBASE +1 );if (!val) { - printk(KERN_INFO DRVNAME ": I/O base address not set " - "for logical device 0x%02x\n", logdev[i]); +pr_info ("I/O base address not set for logical device 0x%02x\n" , + logdev[i]);continue ; } sio_data->address[i] = val;
Signature · 7 lines
1.7.3.1.g432b3.dirty _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Jean Delvare
AppliedRe: [PATCH 20/32] drivers/hwmon/pc87427.c: Use pr_fmt and pr_<level>
Quoted 9 lines · Joe Perches
Added #define
pr_fmtKBUILD_MODNAME": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formatsSigned-off-by Joe Perches <[email protected]>--- drivers/hwmon/pc87427.c | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-)
Applied, thanks.
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
PATCH 21/32 drivers/hwmon/pcf8591.c: Use pr_fmt and pr_<level>
In reply to Guenter RoeckAdded #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats
--- drivers/hwmon/pcf8591.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
drivers/hwmon/pcf8591.c +3 -2
@@ -18,6 +18,8 @@Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h>
@@ -290,8 +292,7 @@ static struct i2c_driver pcf8591_driver = {static int __init pcf8591_init (void ) {if (input_mode <0 || input_mode >3 ) { -printk (KERN_WARNING "pcf8591: invalid input_mode (%d)\n" , - input_mode); +pr_warn ("invalid input_mode (%d)\n" , input_mode); input_mode =0 ; }return i2c_add_driver (&pcf8591_driver);
Signature · 7 lines
1.7.3.1.g432b3.dirty _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Guenter Roeck
AppliedRe: [21/32] drivers/hwmon/pcf8591.c: Use pr_fmt and pr_<level>
Quoted 7 lines · Joe Perches
Added #define
pr_fmtKBUILD_MODNAME": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formatsSigned-off-by Joe Perches <[email protected]>
Applied.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
PATCH 22/32 drivers/hwmon/pkgtemp.c: Use pr_fmt and pr_<level>
In reply to Guenter RoeckAdded #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats
--- drivers/hwmon/pkgtemp.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-)
drivers/hwmon/pkgtemp.c +4 -3
@@ -20,6 +20,8 @@* 02110-1301 USA. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h>
@@ -303,7 +305,7 @@ static int __cpuinit pkgtemp_device_add(unsigned int cpu) pdev =platform_device_alloc (DRVNAME , cpu);if (!pdev) { err = -ENOMEM ; - printk(KERN_ERR DRVNAME ": Device allocation failed\n"); +pr_err ("Device allocation failed\n" ); goto exit; }
@@ -315,8 +317,7 @@ static int __cpuinit pkgtemp_device_add(unsigned int cpu) err =platform_device_add (pdev);if (err) { - printk(KERN_ERR DRVNAME ": Device addition failed (%d)\n", - err); +pr_err ("Device addition failed (%d)\n" , err); goto exit_device_free; }
Signature · 7 lines
1.7.3.1.g432b3.dirty _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Guenter Roeck
AppliedRe: [22/32] drivers/hwmon/pkgtemp.c: Use pr_fmt and pr_<level>
Quoted 7 lines · Joe Perches
Added #define
pr_fmtKBUILD_MODNAME": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formatsSigned-off-by Joe Perches <[email protected]>
Applied.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
PATCH 23/32 drivers/hwmon/sis5595.c: Use pr_fmt and pr_<level>
In reply to Guenter RoeckAdded #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats
--- drivers/hwmon/sis5595.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)
drivers/hwmon/sis5595.c +5 -5
@@ -50,6 +50,8 @@735 0008 0735 */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/slab.h> #include <linux/ioport.h>
@@ -735,21 +737,19 @@ static int __devinit sis5595_device_add(unsigned short address) pdev =platform_device_alloc ("sis5595" , address);if (!pdev) { err = -ENOMEM ; -printk (KERN_ERR "sis5595: Device allocation failed\n" ); +pr_err ("Device allocation failed\n" ); goto exit; } err =platform_device_add_resources (pdev, &res,1 );if (err) { -printk (KERN_ERR "sis5595: Device resource addition failed " -"(%d)\n" , err); +pr_err ("Device resource addition failed (%d)\n" , err); goto exit_device_put; } err =platform_device_add (pdev);if (err) { -printk (KERN_ERR "sis5595: Device addition failed (%d)\n" , - err); +pr_err ("Device addition failed (%d)\n" , err); goto exit_device_put; }
Signature · 7 lines
1.7.3.1.g432b3.dirty _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Guenter Roeck
AppliedRe: [23/32] drivers/hwmon/sis5595.c: Use pr_fmt and pr_<level>
Quoted 7 lines · Joe Perches
Added #define
pr_fmtKBUILD_MODNAME": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formatsSigned-off-by Joe Perches <[email protected]>
Applied.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
PATCH 24/32 drivers/hwmon/smsc47b397.c: Use pr_fmt and pr_<level>
In reply to Guenter RoeckAdded #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats
--- drivers/hwmon/smsc47b397.c | 13 ++++++------- 1 files changed, 6 insertions(+), 7 deletions(-)
drivers/hwmon/smsc47b397.c +6 -7
@@ -26,6 +26,8 @@Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/slab.h> #include <linux/ioport.h>
@@ -311,21 +313,19 @@ static int __init smsc47b397_device_add(unsigned short address) pdev =platform_device_alloc (DRVNAME , address);if (!pdev) { err = -ENOMEM ; - printk(KERN_ERR DRVNAME ": Device allocation failed\n"); +pr_err ("Device allocation failed\n" ); goto exit; } err =platform_device_add_resources (pdev, &res,1 );if (err) { - printk(KERN_ERR DRVNAME ": Device resource addition failed " - "(%d)\n", err); +pr_err ("Device resource addition failed (%d)\n" , err); goto exit_device_put; } err =platform_device_add (pdev);if (err) { - printk(KERN_ERR DRVNAME ": Device addition failed (%d)\n", - err); +pr_err ("Device addition failed (%d)\n" , err); goto exit_device_put; }
@@ -367,8 +367,7 @@ static int __init smsc47b397_find(unsigned short *addr) *addr = (superio_inb (SUPERIO_REG_BASE_MSB ) <<8 ) |superio_inb (SUPERIO_REG_BASE_LSB ); - printk(KERN_INFO DRVNAME ": found SMSC %s " -"(base address 0x%04x, revision %u)\n" , +pr_info ("found SMSC %s (base address 0x%04x, revision %u)\n" , name, *addr, rev);superio_exit ();
Signature · 7 lines
1.7.3.1.g432b3.dirty _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Guenter Roeck
AppliedRe: [24/32] drivers/hwmon/smsc47b397.c: Use pr_fmt and pr_<level>
Quoted 7 lines · Joe Perches
Added #define
pr_fmtKBUILD_MODNAME": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formatsSigned-off-by Joe Perches <[email protected]>
Applied.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
PATCH 25/32 drivers/hwmon/smsc47m1.c: Use pr_fmt and pr_<level>
In reply to Guenter RoeckAdded #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats
--- drivers/hwmon/smsc47m1.c | 31 +++++++++++++++---------------- 1 files changed, 15 insertions(+), 16 deletions(-)
drivers/hwmon/smsc47m1.c +15 -16
@@ -26,6 +26,8 @@Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/slab.h> #include <linux/ioport.h>
@@ -435,30 +437,29 @@ static int __init smsc47m1_find(unsigned short *addr,*/ switch (val) {case 0x51 : -pr_info (DRVNAME ": Found SMSC LPC47B27x\n" ); +pr_info ("Found SMSC LPC47B27x\n" ); sio_data->type = smsc47m1;break ;case 0x59 : -pr_info (DRVNAME ": Found SMSC LPC47M10x/LPC47M112/LPC47M13x\n" ); +pr_info ("Found SMSC LPC47M10x/LPC47M112/LPC47M13x\n" ); sio_data->type = smsc47m1;break ;case 0x5F : -pr_info (DRVNAME ": Found SMSC LPC47M14x\n" ); +pr_info ("Found SMSC LPC47M14x\n" ); sio_data->type = smsc47m1;break ;case 0x60 : -pr_info (DRVNAME ": Found SMSC LPC47M15x/LPC47M192/LPC47M997\n" ); +pr_info ("Found SMSC LPC47M15x/LPC47M192/LPC47M997\n" ); sio_data->type = smsc47m1;break ;case 0x6B :if (superio_inb (SUPERIO_REG_DEVREV ) &0x80 ) { -pr_debug (DRVNAME ": " -"Found SMSC LPC47M233, unsupported\n" ); +pr_debug ("Found SMSC LPC47M233, unsupported\n" );superio_exit ();return -ENODEV ; } -pr_info (DRVNAME ": Found SMSC LPC47M292\n" ); +pr_info ("Found SMSC LPC47M292\n" ); sio_data->type = smsc47m2;break ;default :
@@ -470,7 +471,7 @@ static int __init smsc47m1_find(unsigned short *addr, *addr = (superio_inb (SUPERIO_REG_BASE ) <<8 ) |superio_inb (SUPERIO_REG_BASE +1 );if (*addr =0 ) { -pr_info (DRVNAME ": Device address not set, will not use\n" ); +pr_info ("Device address not set, will not use\n" );superio_exit ();return -ENODEV ; }
@@ -479,7 +480,7 @@ static int __init smsc47m1_find(unsigned short *addr,* Compaq Presario S4000NX) */ sio_data->activate =superio_inb (SUPERIO_REG_ACT );if ((sio_data->activate &0x01 ) =0 ) { -pr_info (DRVNAME ": Enabling device\n" ); +pr_info ("Enabling device\n" );superio_outb (SUPERIO_REG_ACT , sio_data->activate |0x01 ); }
@@ -494,7 +495,7 @@ static void smsc47m1_restore(const struct smsc47m1_sio_data *sio_data)superio_enter ();superio_select (); -pr_info (DRVNAME ": Disabling device\n" ); +pr_info ("Disabling device\n" );superio_outb (SUPERIO_REG_ACT , sio_data->activate);superio_exit ();
@@ -823,28 +824,26 @@ static int __init smsc47m1_device_add(unsigned short address, pdev =platform_device_alloc (DRVNAME , address);if (!pdev) { err = -ENOMEM ; - printk(KERN_ERR DRVNAME ": Device allocation failed\n"); +pr_err ("Device allocation failed\n" ); goto exit; } err =platform_device_add_resources (pdev, &res,1 );if (err) { - printk(KERN_ERR DRVNAME ": Device resource addition failed " - "(%d)\n", err); +pr_err ("Device resource addition failed (%d)\n" , err); goto exit_device_put; } err =platform_device_add_data (pdev, sio_data,sizeof (struct smsc47m1_sio_data ));if (err) { - printk(KERN_ERR DRVNAME ": Platform data allocation failed\n"); +pr_err ("Platform data allocation failed\n" ); goto exit_device_put; } err =platform_device_add (pdev);if (err) { - printk(KERN_ERR DRVNAME ": Device addition failed (%d)\n", - err); +pr_err ("Device addition failed (%d)\n" , err); goto exit_device_put; }
Signature · 7 lines
1.7.3.1.g432b3.dirty _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Guenter Roeck
AppliedRe: [25/32] drivers/hwmon/smsc47m1.c: Use pr_fmt and pr_<level>
Quoted 7 lines · Joe Perches
Added #define
pr_fmtKBUILD_MODNAME": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formatsSigned-off-by Joe Perches <[email protected]>
Applied.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
PATCH 26/32 drivers/hwmon/via-cputemp.c: Use pr_fmt and pr_<level>
In reply to Guenter RoeckAdded #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats
--- drivers/hwmon/via-cputemp.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)
drivers/hwmon/via-cputemp.c +5 -5
@@ -21,6 +21,8 @@* 02110-1301 USA. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h>
@@ -202,7 +204,7 @@ static int __cpuinit via_cputemp_device_add(unsigned int cpu) pdev =platform_device_alloc (DRVNAME , cpu);if (!pdev) { err = -ENOMEM ; - printk(KERN_ERR DRVNAME ": Device allocation failed\n"); +pr_err ("Device allocation failed\n" ); goto exit; }
@@ -214,8 +216,7 @@ static int __cpuinit via_cputemp_device_add(unsigned int cpu) err =platform_device_add (pdev);if (err) { - printk(KERN_ERR DRVNAME ": Device addition failed (%d)\n", - err); +pr_err ("Device addition failed (%d)\n" , err); goto exit_device_free; }
@@ -295,8 +296,7 @@ static int __init via_cputemp_init(void)continue ;if (c->x86_model >0x0f ) { - printk(KERN_WARNING DRVNAME ": Unknown CPU " - "model 0x%x\n", c->x86_model); +pr_warn ("Unknown CPU model 0x%x\n" , c->x86_model);continue ; }
Signature · 7 lines
1.7.3.1.g432b3.dirty _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Guenter Roeck
AppliedRe: [26/32] drivers/hwmon/via-cputemp.c: Use pr_fmt and pr_<level>
Quoted 7 lines · Joe Perches
Added #define
pr_fmtKBUILD_MODNAME": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formatsSigned-off-by Joe Perches <[email protected]>
Applied.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
PATCH 27/32 drivers/hwmon/via686a.c: Use pr_fmt and pr_<level>
In reply to Guenter RoeckAdded #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats
--- drivers/hwmon/via686a.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)
drivers/hwmon/via686a.c +5 -5
@@ -30,6 +30,8 @@Warning - only supports a single device. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/slab.h> #include <linux/pci.h>
@@ -791,21 +793,19 @@ static int __devinit via686a_device_add(unsigned short address) pdev =platform_device_alloc ("via686a" , address);if (!pdev) { err = -ENOMEM ; -printk (KERN_ERR "via686a: Device allocation failed\n" ); +pr_err ("Device allocation failed\n" ); goto exit; } err =platform_device_add_resources (pdev, &res,1 );if (err) { -printk (KERN_ERR "via686a: Device resource addition failed " -"(%d)\n" , err); +pr_err ("Device resource addition failed (%d)\n" , err); goto exit_device_put; } err =platform_device_add (pdev);if (err) { -printk (KERN_ERR "via686a: Device addition failed (%d)\n" , - err); +pr_err ("Device addition failed (%d)\n" , err); goto exit_device_put; }
Signature · 7 lines
1.7.3.1.g432b3.dirty _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Guenter Roeck
AppliedRe: [27/32] drivers/hwmon/via686a.c: Use pr_fmt and pr_<level>
Quoted 7 lines · Joe Perches
Added #define
pr_fmtKBUILD_MODNAME": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formatsSigned-off-by Joe Perches <[email protected]>
Applied.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
PATCH 28/32 drivers/hwmon/vt1211.c: Use pr_fmt and pr_<level>
In reply to Guenter RoeckAdded #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats
--- drivers/hwmon/vt1211.c | 30 +++++++++++++----------------- 1 files changed, 13 insertions(+), 17 deletions(-)
drivers/hwmon/vt1211.c +13 -17
@@ -21,6 +21,8 @@* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h>
@@ -1254,8 +1256,7 @@ static int __init vt1211_device_add(unsigned short address) pdev =platform_device_alloc (DRVNAME , address);if (!pdev) { err = -ENOMEM ; - printk(KERN_ERR DRVNAME ": Device allocation failed (%d)\n", - err); +pr_err ("Device allocation failed (%d)\n" , err); goto EXIT; }
@@ -1266,15 +1267,13 @@ static int __init vt1211_device_add(unsigned short address) err =platform_device_add_resources (pdev, &res,1 );if (err) { - printk(KERN_ERR DRVNAME ": Device resource addition failed " - "(%d)\n", err); +pr_err ("Device resource addition failed (%d)\n" , err); goto EXIT_DEV_PUT; } err =platform_device_add (pdev);if (err) { - printk(KERN_ERR DRVNAME ": Device addition failed (%d)\n", - err); +pr_err ("Device addition failed (%d)\n" , err); goto EXIT_DEV_PUT; }
@@ -1301,23 +1300,20 @@ static int __init vt1211_find(int sio_cip, unsigned short *address)superio_select (sio_cip,SIO_VT1211_LDN_HWMON );if ((superio_inb (sio_cip,SIO_VT1211_ACTIVE ) &1 ) =0 ) { - printk(KERN_WARNING DRVNAME ": HW monitor is disabled, " - "skipping\n"); +pr_warn ("HW monitor is disabled, skipping\n" ); goto EXIT; } *address = ((superio_inb (sio_cip,SIO_VT1211_BADDR ) <<8 ) | (superio_inb (sio_cip,SIO_VT1211_BADDR +1 ))) &0xff00 ;if (*address =0 ) { - printk(KERN_WARNING DRVNAME ": Base address is not set, " - "skipping\n"); +pr_warn ("Base address is not set, skipping\n" ); goto EXIT; } err =0 ; - printk(KERN_INFO DRVNAME ": Found VT1211 chip at 0x%04x, " -"revision %u\n" , *address, - superio_inb(sio_cip, SIO_VT1211_DEVREV)); +pr_info ("Found VT1211 chip at 0x%04x, revision %u\n" , + *address,superio_inb (sio_cip,SIO_VT1211_DEVREV )); EXIT:superio_exit (sio_cip);
@@ -1336,15 +1332,15 @@ static int __init vt1211_init(void)if ((uch_config <-1 ) || (uch_config >31 )) { err = -EINVAL ; - printk(KERN_WARNING DRVNAME ": Invalid UCH configuration %d. " - "Choose a value between 0 and 31.\n", uch_config); +pr_warn ("Invalid UCH configuration %d. Choose a value between 0 and 31.\n" , + uch_config); goto EXIT; }if ((int_mode <-1 ) || (int_mode >0 )) { err = -EINVAL ; - printk(KERN_WARNING DRVNAME ": Invalid interrupt mode %d. " - "Only mode 0 is supported.\n", int_mode); +pr_warn ("Invalid interrupt mode %d. Only mode 0 is supported.\n" , + int_mode); goto EXIT; }
Signature · 7 lines
1.7.3.1.g432b3.dirty _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Guenter Roeck
AppliedRe: [28/32] drivers/hwmon/vt1211.c: Use pr_fmt and pr_<level>
Quoted 7 lines · Joe Perches
Added #define
pr_fmtKBUILD_MODNAME": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formatsSigned-off-by Joe Perches <[email protected]>
Applied, with a minor change. checkpatch.pl complains about line lengths around lines 1336 and 1342. I used the original split instead of the one-line text.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
PATCH 29/32 drivers/hwmon/vt8231.c: Use pr_fmt and pr_<level>
In reply to Guenter RoeckAdded #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats
--- drivers/hwmon/vt8231.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)
drivers/hwmon/vt8231.c +5 -5
@@ -24,6 +24,8 @@/* Supports VIA VT8231 South Bridge embedded sensors */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h>
@@ -902,21 +904,19 @@ static int __devinit vt8231_device_add(unsigned short address) pdev =platform_device_alloc ("vt8231" , address);if (!pdev) { err = -ENOMEM ; -printk (KERN_ERR "vt8231: Device allocation failed\n" ); +pr_err ("Device allocation failed\n" ); goto exit; } err =platform_device_add_resources (pdev, &res,1 );if (err) { -printk (KERN_ERR "vt8231: Device resource addition failed " -"(%d)\n" , err); +pr_err ("Device resource addition failed (%d)\n" , err); goto exit_device_put; } err =platform_device_add (pdev);if (err) { -printk (KERN_ERR "vt8231: Device addition failed (%d)\n" , - err); +pr_err ("Device addition failed (%d)\n" , err); goto exit_device_put; }
Signature · 7 lines
1.7.3.1.g432b3.dirty _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Guenter Roeck
AppliedRe: [29/32] drivers/hwmon/vt8231.c: Use pr_fmt and pr_<level>
Quoted 7 lines · Joe Perches
Added #define
pr_fmtKBUILD_MODNAME": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formatsSigned-off-by Joe Perches <[email protected]>
Applied.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
PATCH 30/32 drivers/hwmon/w83627ehf.c: Use pr_fmt and pr_<level>
In reply to Guenter RoeckAdded #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats
--- drivers/hwmon/w83627ehf.c | 23 ++++++++++------------- 1 files changed, 10 insertions(+), 13 deletions(-)
drivers/hwmon/w83627ehf.c +10 -13
@@ -42,6 +42,8 @@w83667hg-b 9 5 3 3 0xb350 0xc1 0x5ca3 */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h>
@@ -1668,8 +1670,7 @@ static int __init w83627ehf_find(int sioaddr, unsigned short *addr,break ;default :if (val !=0xffff ) -pr_debug (DRVNAME ": unsupported chip ID: 0x%04x\n" , - val); +pr_debug ("unsupported chip ID: 0x%04x\n" , val);superio_exit (sioaddr);return -ENODEV ; }
@@ -1680,8 +1681,7 @@ static int __init w83627ehf_find(int sioaddr, unsigned short *addr, | superio_inb(sioaddr, SIO_REG_ADDR + 1); *addr = val &IOREGION_ALIGNMENT ;if (*addr =0 ) { - printk(KERN_ERR DRVNAME ": Refusing to enable a Super-I/O " - "device with a base I/O port 0.\n"); +pr_err ("Refusing to enable a Super-I/O device with a base I/O port 0\n" );superio_exit (sioaddr);return -ENODEV ; }
@@ -1689,13 +1689,12 @@ static int __init w83627ehf_find(int sioaddr, unsigned short *addr,/* Activate logical device if needed */ val =superio_inb (sioaddr,SIO_REG_ENABLE );if (!(val &0x01 )) { - printk(KERN_WARNING DRVNAME ": Forcibly enabling Super-I/O. " - "Sensor is probably unusable.\n"); +pr_warn ("Forcibly enabling Super-I/O. Sensor is probably unusable.\n" );superio_outb (sioaddr,SIO_REG_ENABLE , val |0x01 ); }superio_exit (sioaddr); -pr_info (DRVNAME ": Found %s chip at %#x\n" , sio_name, *addr); +pr_info ("Found %s chip at %#x\n" , sio_name, *addr); sio_data->sioreg = sioaddr;return 0 ;
@@ -1729,14 +1728,14 @@ static int __init sensors_w83627ehf_init(void)if (!(pdev =platform_device_alloc (DRVNAME , address))) { err = -ENOMEM ; - printk(KERN_ERR DRVNAME ": Device allocation failed\n"); +pr_err ("Device allocation failed\n" ); goto exit_unregister; } err =platform_device_add_data (pdev, &sio_data,sizeof (struct w83627ehf_sio_data ));if (err) { - printk(KERN_ERR DRVNAME ": Platform data allocation failed\n"); +pr_err ("Platform data allocation failed\n" ); goto exit_device_put; }
@@ -1752,16 +1751,14 @@ static int __init sensors_w83627ehf_init(void) err =platform_device_add_resources (pdev, &res,1 );if (err) { - printk(KERN_ERR DRVNAME ": Device resource addition failed " - "(%d)\n", err); +pr_err ("Device resource addition failed (%d)\n" , err); goto exit_device_put; }/* platform_device_add calls probe() */ err =platform_device_add (pdev);if (err) { - printk(KERN_ERR DRVNAME ": Device addition failed (%d)\n", - err); +pr_err ("Device addition failed (%d)\n" , err); goto exit_device_put; }
Signature · 7 lines
1.7.3.1.g432b3.dirty _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Guenter Roeck
AppliedRe: [30/32] drivers/hwmon/w83627ehf.c: Use pr_fmt and pr_<level>
Quoted 7 lines · Joe Perches
Added #define
pr_fmtKBUILD_MODNAME": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formatsSigned-off-by Joe Perches <[email protected]>
Applied.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
PATCH 31/32 drivers/hwmon/w83627hf.c: Use pr_fmt and pr_<level>
In reply to Guenter RoeckAdded #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats
--- drivers/hwmon/w83627hf.c | 17 ++++++++--------- 1 files changed, 8 insertions(+), 9 deletions(-)
drivers/hwmon/w83627hf.c +8 -9
@@ -39,6 +39,8 @@supported yet. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h>
@@ -1166,14 +1168,13 @@ static int __init w83627hf_find(int sioaddr, unsigned short *addr,superio_inb (sio_data,WINB_BASE_REG +1 ); *addr = val &WINB_ALIGNMENT ;if (*addr =0 ) { - printk(KERN_WARNING DRVNAME ": Base address not set, " - "skipping\n"); +pr_warn ("Base address not set, skipping\n" ); goto exit; } val =superio_inb (sio_data,WINB_ACT_REG );if (!(val &0x01 )) { - printk(KERN_WARNING DRVNAME ": Enabling HWM logical device\n"); +pr_warn ("Enabling HWM logical device\n" );superio_outb (sio_data,WINB_ACT_REG , val |0x01 ); }
@@ -1789,28 +1790,26 @@ static int __init w83627hf_device_add(unsigned short address, pdev =platform_device_alloc (DRVNAME , address);if (!pdev) { err = -ENOMEM ; - printk(KERN_ERR DRVNAME ": Device allocation failed\n"); +pr_err ("Device allocation failed\n" ); goto exit; } err =platform_device_add_resources (pdev, &res,1 );if (err) { - printk(KERN_ERR DRVNAME ": Device resource addition failed " - "(%d)\n", err); +pr_err ("Device resource addition failed (%d)\n" , err); goto exit_device_put; } err =platform_device_add_data (pdev, sio_data,sizeof (struct w83627hf_sio_data ));if (err) { - printk(KERN_ERR DRVNAME ": Platform data allocation failed\n"); +pr_err ("Platform data allocation failed\n" ); goto exit_device_put; } err =platform_device_add (pdev);if (err) { - printk(KERN_ERR DRVNAME ": Device addition failed (%d)\n", - err); +pr_err ("Device addition failed (%d)\n" , err); goto exit_device_put; }
Signature · 7 lines
1.7.3.1.g432b3.dirty _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Guenter Roeck
AppliedRe: [31/32] drivers/hwmon/w83627hf.c: Use pr_fmt and pr_<level>
Quoted 7 lines · Joe Perches
Added #define
pr_fmtKBUILD_MODNAME": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formatsSigned-off-by Joe Perches <[email protected]>
Applied.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
PATCH 32/32 drivers/hwmon/w83781d.c: Use pr_fmt and pr_<level>
In reply to Guenter RoeckAdded #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats
--- drivers/hwmon/w83781d.c | 29 ++++++++++++++--------------- 1 files changed, 14 insertions(+), 15 deletions(-)
drivers/hwmon/w83781d.c +14 -15
@@ -33,6 +33,8 @@*/ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h>
@@ -1798,8 +1800,7 @@ w83781d_isa_found(unsigned short address)* individually for the probing phase. */ for (port = address; port < address +W83781D_EXTENT ; port++) {if (!request_region (port,1 ,"w83781d" )) { -pr_debug ("w83781d: Failed to request port 0x%x\n" , - port); +pr_debug ("Failed to request port 0x%x\n" , port); goto release; } }
@@ -1811,7 +1812,7 @@ w83781d_isa_found(unsigned short address)if (inb_p (address +2 ) != val ||inb_p (address +3 ) != val ||inb_p (address +7 ) != val) { -pr_debug ("w83781d: Detection failed at step 1\n" ); +pr_debug ("Detection failed at step 1\n" ); goto release; }#undef REALLY_SLOW_IO
@@ -1820,14 +1821,14 @@ w83781d_isa_found(unsigned short address)MSB (busy flag) should be clear initially, set after the write. */ save =inb_p (address +W83781D_ADDR_REG_OFFSET );if (save &0x80 ) { -pr_debug ("w83781d: Detection failed at step 2\n" ); +pr_debug ("Detection failed at step 2\n" ); goto release; } val = ~save &0x7f ;outb_p (val, address +W83781D_ADDR_REG_OFFSET );if (inb_p (address +W83781D_ADDR_REG_OFFSET ) != (val |0x80 )) {outb_p (save, address +W83781D_ADDR_REG_OFFSET ); -pr_debug ("w83781d: Detection failed at step 3\n" ); +pr_debug ("Detection failed at step 3\n" ); goto release; }
@@ -1835,7 +1836,7 @@ w83781d_isa_found(unsigned short address)outb_p (W83781D_REG_CONFIG , address +W83781D_ADDR_REG_OFFSET ); val =inb_p (address +W83781D_DATA_REG_OFFSET );if (val &0x80 ) { -pr_debug ("w83781d: Detection failed at step 4\n" ); +pr_debug ("Detection failed at step 4\n" ); goto release; }outb_p (W83781D_REG_BANK , address +W83781D_ADDR_REG_OFFSET );
@@ -1844,19 +1845,19 @@ w83781d_isa_found(unsigned short address) val =inb_p (address +W83781D_DATA_REG_OFFSET );if ((!(save &0x80 ) && (val !=0xa3 )) || ((save &0x80 ) && (val !=0x5c ))) { -pr_debug ("w83781d: Detection failed at step 5\n" ); +pr_debug ("Detection failed at step 5\n" ); goto release; }outb_p (W83781D_REG_I2C_ADDR , address +W83781D_ADDR_REG_OFFSET ); val =inb_p (address +W83781D_DATA_REG_OFFSET );if (val <0x03 || val >0x77 ) {/* Not a valid I2C address */ -pr_debug ("w83781d: Detection failed at step 6\n" ); +pr_debug ("Detection failed at step 6\n" ); goto release; }/* The busy flag should be clear again */ if (inb_p (address +W83781D_ADDR_REG_OFFSET ) &0x80 ) { -pr_debug ("w83781d: Detection failed at step 7\n" ); +pr_debug ("Detection failed at step 7\n" ); goto release; }
@@ -1871,7 +1872,7 @@ w83781d_isa_found(unsigned short address) found =1 ;if (found) -pr_info ("w83781d: Found a %s chip at %#x\n" , +pr_info ("Found a %s chip at %#x\n" , val =0x30 ?"W83782D" :"W83781D" , (int )address); release:
@@ -1894,21 +1895,19 @@ w83781d_isa_device_add(unsigned short address) pdev =platform_device_alloc ("w83781d" , address);if (!pdev) { err = -ENOMEM ; -printk (KERN_ERR "w83781d: Device allocation failed\n" ); +pr_err ("Device allocation failed\n" ); goto exit; } err =platform_device_add_resources (pdev, &res,1 );if (err) { -printk (KERN_ERR "w83781d: Device resource addition failed " -"(%d)\n" , err); +pr_err ("Device resource addition failed (%d)\n" , err); goto exit_device_put; } err =platform_device_add (pdev);if (err) { -printk (KERN_ERR "w83781d: Device addition failed (%d)\n" , - err); +pr_err ("Device addition failed (%d)\n" , err); goto exit_device_put; }
Signature · 7 lines
1.7.3.1.g432b3.dirty _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Re: [PATCH 32/32] drivers/hwmon/w83781d.c: Use pr_fmt and pr_<level>
Hi Joe,
Quoted 34 lines · Joe Perches
Added #define
pr_fmtKBUILD_MODNAME": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formatsSigned-off-by Joe Perches <[email protected]>--- drivers/hwmon/w83781d.c | 29 ++++++++++++++--------------- 1 files changed, 14 insertions(+), 15 deletions(-)drivers/hwmon/w83781d.c +3
-2@@ -33,6 +33,8 @@*/ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h> @@ -1798,8 +1800,7 @@ w83781d_isa_found(unsigned short address)* individually for the probing phase. */ for (port = address; port < address +W83781D_EXTENT ; port++) {if (!request_region (port,1 ,"w83781d" )) { -pr_debug ("w83781d: Failed to request port 0x%x\n" , - port); +pr_debug ("Failed to request port 0x%x\n" , port); goto release; } }
drivers/hwmon/w83781d.c w83781d_isa_found(unsigned short address) · line 1815
Quoted 5 lines
drivers/hwmon/w83781d.c +1
-1@@ -1811,7 +1812,7 @@ w83781d_isa_found(unsigned short address)if (inb_p (address +2 ) != val ||inb_p (address +3 ) != val ||inb_p (address +7 ) != val) { -pr_debug ("w83781d: Detection failed at step 1\n" ); +pr_debug ("Detection failed at step 1\n" );
I think this would be the right time to change this to:
pr_debug("Detection failed at step %d\n", 1);and do the same for all 6 messages below, so that the compiler can store the string only once in the binary.
Quoted 86 lines
drivers/hwmon/w83781d.c +10
-12goto release; }#undef REALLY_SLOW_IO@@ -1820,14 +1821,14 @@ w83781d_isa_found(unsigned short address)MSB (busy flag) should be clear initially, set after the write. */ save =inb_p (address +W83781D_ADDR_REG_OFFSET );if (save &0x80 ) { -pr_debug ("w83781d: Detection failed at step 2\n" ); +pr_debug ("Detection failed at step 2\n" ); goto release; } val = ~save &0x7f ;outb_p (val, address +W83781D_ADDR_REG_OFFSET );if (inb_p (address +W83781D_ADDR_REG_OFFSET ) != (val |0x80 )) {outb_p (save, address +W83781D_ADDR_REG_OFFSET ); -pr_debug ("w83781d: Detection failed at step 3\n" ); +pr_debug ("Detection failed at step 3\n" ); goto release; }@@ -1835,7 +1836,7 @@ w83781d_isa_found(unsigned short address)outb_p (W83781D_REG_CONFIG , address +W83781D_ADDR_REG_OFFSET ); val =inb_p (address +W83781D_DATA_REG_OFFSET );if (val &0x80 ) { -pr_debug ("w83781d: Detection failed at step 4\n" ); +pr_debug ("Detection failed at step 4\n" ); goto release; }outb_p (W83781D_REG_BANK , address +W83781D_ADDR_REG_OFFSET );@@ -1844,19 +1845,19 @@ w83781d_isa_found(unsigned short address) val =inb_p (address +W83781D_DATA_REG_OFFSET );if ((!(save &0x80 ) && (val !=0xa3 )) || ((save &0x80 ) && (val !=0x5c ))) { -pr_debug ("w83781d: Detection failed at step 5\n" ); +pr_debug ("Detection failed at step 5\n" ); goto release; }outb_p (W83781D_REG_I2C_ADDR , address +W83781D_ADDR_REG_OFFSET ); val =inb_p (address +W83781D_DATA_REG_OFFSET );if (val <0x03 || val >0x77 ) {/* Not a valid I2C address */ -pr_debug ("w83781d: Detection failed at step 6\n" ); +pr_debug ("Detection failed at step 6\n" ); goto release; }/* The busy flag should be clear again */ if (inb_p (address +W83781D_ADDR_REG_OFFSET ) &0x80 ) { -pr_debug ("w83781d: Detection failed at step 7\n" ); +pr_debug ("Detection failed at step 7\n" ); goto release; }@@ -1871,7 +1872,7 @@ w83781d_isa_found(unsigned short address) found =1 ;if (found) -pr_info ("w83781d: Found a %s chip at %#x\n" , +pr_info ("Found a %s chip at %#x\n" , val =0x30 ?"W83782D" :"W83781D" , (int )address); release:@@ -1894,21 +1895,19 @@ w83781d_isa_device_add(unsigned short address) pdev =platform_device_alloc ("w83781d" , address);if (!pdev) { err = -ENOMEM ; -printk (KERN_ERR "w83781d: Device allocation failed\n" ); +pr_err ("Device allocation failed\n" ); goto exit; } err =platform_device_add_resources (pdev, &res,1 );if (err) { -printk (KERN_ERR "w83781d: Device resource addition failed " -"(%d)\n" , err); +pr_err ("Device resource addition failed (%d)\n" , err); goto exit_device_put; } err =platform_device_add (pdev);if (err) { -printk (KERN_ERR "w83781d: Device addition failed (%d)\n" , - err); +pr_err ("Device addition failed (%d)\n" , err); goto exit_device_put; }
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Re: [PATCH 32/32] drivers/hwmon/w83781d.c: Use pr_fmt and pr_<level>
Quoted 9 lines · Jean Delvare
Quoted 8 lines · Joe Perches
Added #define
pr_fmtKBUILD_MODNAME": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formatsSigned-off-by Joe Perches <[email protected]>--- drivers/hwmon/w83781d.c | 29 ++++++++++++++---------------
[]
Quoted 10 lines
drivers/hwmon/w83781d.c w83781d_isa_found(unsigned short address) · line 1815
Quoted 6 lines
drivers/hwmon/w83781d.c +1
-1@@ -1811,7 +1812,7 @@ w83781d_isa_found(unsigned short address)if (inb_p (address +2 ) != val ||inb_p (address +3 ) != val ||inb_p (address +7 ) != val) { -pr_debug ("w83781d: Detection failed at step 1\n" ); +pr_debug ("Detection failed at step 1\n" );I think this would be the right time to change this to:
pr_debug("Detection failed at step %d\n", 1);and do the same for all 6 messages below, so that the compiler can store the string only once in the binary.
Fine by me.
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Hi Joe,
Quoted 11 lines · Joe Perches
Convert printks to pr_<level>
Coalesce long formats
Removed prefixes from formats
Added #definepr_fmtKBUILD_MODNAME": " fmt Standardized abitguru messages for reporting and finding MAINTAINER (...)drivers/hwmon/abituguru.c +0
-0
drivers/hwmon/abituguru.c line 26
Quoted 7 lines
drivers/hwmon/abituguru.c +3
-0@@ -20,6 +20,9 @@the custom Abit uGuru chip found on Abit uGuru motherboards. Note: because of lack of specs the CPU/RAM voltage & frequency control is not supported! */ + +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h>
It looks odd that every driver would have to set this. Shouldn't this be the default set in <linux/kernel.h>? Something like:
#ifndef pr_fmt
#ifdef KBUILD_MODNAME
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#else
#define pr_fmt(fmt) fmt
#endif /* KBUILD_MODNAME */
#endif
Overall I like this cleanup patch, but the addition of #define pr_fmt to every driver looks plain wrong.
I'll review the rest of the patch(es) once this point is sorted out.
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 2 lines · Jean Delvare
It looks odd that every driver would have to set this. Shouldn't this be the default set in <
linux/kernel.h>?
http://lkml.org/lkml/2009/10/4/198
http://lkml.org/lkml/2009/10/5/215
I'd prefer something like that as well, and it is a long-term goal I have, but not yet, no.
There are many files that use pr_<level> without pr_fmt.
Those need to be sorted out first, perhaps by adding a new line to each of those files to "#define pr_fmt(fmt) fmt"
KBUILD_MODNAME is always #defined by the make system.
$ grep -rP --include=*.[ch] -lw "pr_(info|warn|warning|notice|debug|dbg|vdbg|crit|alert|err|emerg|cont)" * | \
while read file ; do \
grep -lwq pr_fmt $file ; \
echo "$?:$file"; \
done | \
cut -f1 -d":" | sort | uniq -c
335 0
1532 1Exit status 0 means a match for pr_fmt.
So there are ~1900 files that use pr_<level>
in the kernel tree, only 335 have pr_fmt.
This search does have some false negatives because some files use an #include that does a #define pr_fmt.
Anyway, I'd like to sort it out eventually.
For now, I just add the #define pr_fmt, with
a long term goal of removing them all and using
a different mechanism to remove the duplicated prefix string altogether from the formats and save some text.
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
On Wed, Oct 20, 2010 at 11:59:23AM -0400, Joe Perches wrote:
[ ... ]
Quoted 8 lines
Anyway, I'd like to sort it out eventually. For now, I just add the #define
pr_fmt, with a long term goal of removing them all and using a different mechanism to remove the duplicated prefix string altogether from the formats and save some text.
I don't mind individual pr_fmt defines as long as they are used. However, that is not the case in many of the patches.
Just adding a pr_fmt define to a file without using it doesn't make sense to me.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 9 lines · Guenter Roeck
On Wed, Oct 20, 2010 at 11:59:23AM -0400,
Joe Perches wrote:
[ ... ]Quoted 6 lines
Anyway, I'd like to sort it out eventually. For now, I just add the #define
pr_fmt, with a long term goal of removing them all and using a different mechanism to remove the duplicated prefix string altogether from the formats and save some text.
Quoted 3 lines
I don't mind individual
pr_fmtdefines as long as they are used. However, that is not the case in many of the patches.
Just adding apr_fmtdefine to a file without using it doesn't make sense to me.
kernel.h has the equivalent of:
#define pr_<level>(fmt, arg...) printk(KERN_<level> pr_fmt(fmt), ##arg)
so the added "#define pr_fmt(fmt)..."s are used
wherever pr_<level> is done.
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 10 lines · Joe Perches
Quoted 9 lines · Guenter Roeck
On Wed, Oct 20, 2010 at 11:59:23AM -0400,
Joe Perches wrote:
[ ... ]Quoted 6 lines
Anyway, I'd like to sort it out eventually. For now, I just add the #define
pr_fmt, with a long term goal of removing them all and using a different mechanism to remove the duplicated prefix string altogether from the formats and save some text.
Quoted 8 lines
Quoted 3 lines
I don't mind individual
pr_fmtdefines as long as they are used. However, that is not the case in many of the patches.
Just adding apr_fmtdefine to a file without using it doesn't make sense to me.
kernel.hhas the equivalent of:#define pr_<level>(fmt, arg...)
printk(KERN_<level> pr_fmt(fmt), ##arg)
And no one minds that there are literally hundreds of equivalent defines for pr_fmt in the code, and even more conflicting ones ? Odd.
Maybe the following in kernel.h would make more sense.
#ifndef pr_fmt
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#endif
At least it would make more sense than littering source files with pr_fmt definitions. If that doesn't fly, I would prefer to stick with the existing default definition in kernel.h. At least that would give people an incentive to fix the problem in kernel.h (or in some other central location) if they dislike the resulting missing module names.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 20 lines · Guenter Roeck
Quoted 10 lines · Joe Perches
Quoted 9 lines · Guenter Roeck
On Wed, Oct 20, 2010 at 11:59:23AM -0400,
Joe Perches wrote:
[ ... ]Quoted 6 lines
Anyway, I'd like to sort it out eventually. For now, I just add the #define
pr_fmt, with a long term goal of removing them all and using a different mechanism to remove the duplicated prefix string altogether from the formats and save some text.Quoted 6 lines
Quoted 3 lines
I don't mind individual
pr_fmtdefines as long as they are used. However, that is not the case in many of the patches.
Just adding apr_fmtdefine to a file without using it doesn't make sense to me.
kernel.hhas the equivalent of:
#define pr_<level>(fmt, arg...)printk(KERN_<level> pr_fmt(fmt), ##arg)And no one minds that there are literally hundreds of equivalent defines for
pr_fmtin the code, and even more conflicting ones ? Odd.
Quoted 8 lines
Maybe the following in
kernel.hwould make more sense.#ifndef
pr_fmt
#definepr_fmt(fmt)KBUILD_MODNAME": " fmt
#endifAt least it would make more sense than littering source files with
pr_fmtdefinitions. If that doesn't fly, I would prefer to stick with the existing default definition inkernel.h.
That would give you no prefix at all and make the
logging messages harder to distinguish.
Quoted 2 lines
At least that would give people an incentive to fix the problem in
kernel.h(or in some other central location) if they dislike the resulting missing module names.
I don't think it flies for another year or two.
$ grep -Prh --include=*.[ch] "define\s*pr_fmt" * | \
perl -p -e 's/[ \t]+/ /g' | \
sort | uniq -c | sort -rn
211 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
93 #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
16 #define pr_fmt(fmt) KBUILD_MODNAME ":%s(): " fmt, __func__
16 #define pr_fmt(fmt) KBUILD_MODNAME ":%s: " fmt, __func__
4 #define pr_fmt(fmt) "intc: " fmt
4 #define pr_fmt(fmt) "ep93xx " KBUILD_MODNAME ": " fmt
3 #define pr_fmt(fmt) "%s: " fmt, __func__
3 #define pr_fmt(fmt) DRV_MODULE_NAME ": " fmt
2 #define pr_fmt(fmt) "gcov: " fmt
2 #define pr_fmt(fmt) fmt
2 #define pr_fmt(fmt) DRV_NAME ": " fmt
1 #define pr_fmt(fmt) "viod: " fmt
1 #define pr_fmt(fmt) "tboot: " fmt
1 #define pr_fmt(fmt) "(stll) :" fmt
1 #define pr_fmt(fmt) "(stk) :" fmt
1 #define pr_fmt(fmt) "(stc): " fmt
1 #define pr_fmt(fmt) "PMU: " fmt
1 #define pr_fmt(fmt) "pit: " fmt
1 #define pr_fmt(fmt) "phram: " fmt
1 #define pr_fmt(fmt) "PCI: " fmt
1 #define pr_fmt(fmt) "module %s: " fmt
1 #define pr_fmt(fmt) "mmiotrace: " fmt
1 #define pr_fmt(fmt) KBUILD_MODNAME " WATCHDOG: " fmt
1 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt /* Append 'batman-adv: ' before
1 #define pr_fmt(fmt) KBUILD_MODNAME " " fmt
1 #define pr_fmt(fmt) KBUILD_BASENAME ": " fmt
1 #define pr_fmt(fmt) "isram: " fmt
1 #define pr_fmt(fmt) "hw perfevents: " fmt
1 #define pr_fmt(fmt) "hw-breakpoint: " fmt
1 #define pr_fmt(fmt) DRIVER_NAME ": " fmt
1 #define pr_fmt(fmt) "cxgb: " fmt
1 #define pr_fmt(fmt) "cn_test: " fmt
1 #define pr_fmt(fmt) "clock: " fmt
1 #define pr_fmt(fmt) "acerhdf: " fmt_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 27 lines · Joe Perches
Quoted 26 lines · Guenter Roeck
Quoted 10 lines · Joe Perches
Quoted 9 lines · Guenter Roeck
On Wed, Oct 20, 2010 at 11:59:23AM -0400,
Joe Perches wrote:
[ ... ]Quoted 6 lines
Anyway, I'd like to sort it out eventually. For now, I just add the #define
pr_fmt, with a long term goal of removing them all and using a different mechanism to remove the duplicated prefix string altogether from the formats and save some text.Quoted 6 lines
Quoted 3 lines
I don't mind individual
pr_fmtdefines as long as they are used. However, that is not the case in many of the patches.
Just adding apr_fmtdefine to a file without using it doesn't make sense to me.
kernel.hhas the equivalent of:
#define pr_<level>(fmt, arg...)printk(KERN_<level> pr_fmt(fmt), ##arg)And no one minds that there are literally hundreds of equivalent defines for
pr_fmtin the code, and even more conflicting ones ? Odd.Maybe the following in
kernel.hwould make more sense.#ifndef
pr_fmt
#definepr_fmt(fmt)KBUILD_MODNAME": " fmt
#endif
Quoted 6 lines
Quoted 2 lines
At least it would make more sense than littering source files with
pr_fmtdefinitions. If that doesn't fly, I would prefer to stick with the existing default definition inkernel.h.That would give you no prefix at all and make the
logging messages harder to distinguish.
Exactly my point.
Quoted 34 lines
Quoted 2 lines
At least that would give people an incentive to fix the problem in
kernel.h(or in some other central location) if they dislike the resulting missing module names.I don't think it flies for another year or two.
$ grep -Prh --include=*.[ch] "define\s*pr_fmt" * | \ perl -p -e 's/[ \t]+/ /g' | \ sort | uniq -c | sort -rn 211 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 93 #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt 16 #define pr_fmt(fmt) KBUILD_MODNAME ":%s(): " fmt, __func__ 16 #define pr_fmt(fmt) KBUILD_MODNAME ":%s: " fmt, __func__ 4 #define pr_fmt(fmt) "intc: " fmt 4 #define pr_fmt(fmt) "ep93xx " KBUILD_MODNAME ": " fmt 3 #define pr_fmt(fmt) "%s: " fmt, __func__ 3 #define pr_fmt(fmt) DRV_MODULE_NAME ": " fmt 2 #define pr_fmt(fmt) "gcov: " fmt 2 #define pr_fmt(fmt) fmt 2 #define pr_fmt(fmt) DRV_NAME ": " fmt 1 #define pr_fmt(fmt) "viod: " fmt 1 #define pr_fmt(fmt) "tboot: " fmt 1 #define pr_fmt(fmt) "(stll) :" fmt 1 #define pr_fmt(fmt) "(stk) :" fmt 1 #define pr_fmt(fmt) "(stc): " fmt 1 #define pr_fmt(fmt) "PMU: " fmt 1 #define pr_fmt(fmt) "pit: " fmt 1 #define pr_fmt(fmt) "phram: " fmt 1 #define pr_fmt(fmt) "PCI: " fmt 1 #define pr_fmt(fmt) "module %s: " fmt 1 #define pr_fmt(fmt) "mmiotrace: " fmt 1 #define pr_fmt(fmt) KBUILD_MODNAME " WATCHDOG: " fmt 1 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt /* Append 'batman-adv: ' before 1 #define pr_fmt(fmt) KBUILD_MODNAME " " fmt 1 #define pr_fmt(fmt) KBUILD_BASENAME ": " fmt
Quoted 9 lines
1 #define pr_fmt(fmt) "isram: " fmt
1 #define pr_fmt(fmt) "hw perfevents: " fmt
1 #define pr_fmt(fmt) "hw-breakpoint: " fmt
1 #define pr_fmt(fmt) DRIVER_NAME ": " fmt
1 #define pr_fmt(fmt) "cxgb: " fmt
1 #define pr_fmt(fmt) "cn_test: " fmt
1 #define pr_fmt(fmt) "clock: " fmt
1 #define pr_fmt(fmt) "acerhdf: " fmtThe modified define in kernel.org would only apply if pr_fmt isn't already defined, so that argument is not really correct. The real difference would be that you could then remove the individual pr_fmt defines from 211 files, and all users of pr_fmt without module name (ie those hard to read) would be easier to read/identify.
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 4 lines · Guenter Roeck
The modified define in kernel.org would only apply if
pr_fmtisn't already defined, so that argument is not really correct. The real difference would be that you could then remove the individualpr_fmtdefines from 211 files, and all users ofpr_fmtwithout module name (ie those hard to read) would be easier to read/identify.
I think that's not a good idea for now, though I agree with the general concept.
This is in kernel.h now.
#ifndef pr_fmt
#define pr_fmt(fmt) fmt
#endif
A lot of the pr_<level> calls already include some internal prefix.
Try:
$ grep -rP --include=*.[ch] -oh "\bpr_\w+\s*\(\s*\"\w+:" * | \
cut -f2- -d"(" | sort | uniq -c | sort -rnYou're suggesting modifying 100+ files to get the same output used now.
I think doing something like this after some more generally accepted agreement is reached on how best to do it would be better.
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 18 lines · Joe Perches
Quoted 4 lines · Guenter Roeck
The modified define in kernel.org would only apply if
pr_fmtisn't already defined, so that argument is not really correct. The real difference would be that you could then remove the individualpr_fmtdefines from 211 files, and all users ofpr_fmtwithout module name (ie those hard to read) would be easier to read/identify.I think that's not a good idea for now, though I agree with the general concept.
This is in
kernel.hnow.#ifndef
pr_fmt
#definepr_fmt(fmt)fmt
#endifA lot of the pr_<level> calls already include some internal prefix.
Quoted 7 lines
Try:
$ grep -rP --include=*.[ch] -oh "\bpr_\w+\s*\(\s*\"\w+:" * | \ cut -f2- -d"(" | sort | uniq -c | sort -rnYou're suggesting modifying 100+ files to get the same output used now.
Yes, plus another 200+ files to remove the then-unnecessary existing pr_fmt defines.
Quoted 4 lines
I think doing something like this after some more generally accepted agreement is reached on how best to do it would be better.
Sounds like the ~400 definitions of TRUE and FALSE in the code base I am working with here.
My take is that the time to reach such an agreement is now, to avoid cluttering more code with pr_fmt defines. The longer we wait, the more difficult it will get to reach an agreement, since more and more subsystems will be affected.
Personally, I think the pr_fmt cleanup should be more important than replacing printk with pr_<level>. But I'll defer to Jean's judgement on this one, and follow his lead.
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 3 lines · Guenter Roeck
My take is that the time to reach such an agreement is now, to avoid cluttering more code with
pr_fmtdefines. The longer we wait, the more difficult it will get to reach an agreement, since more and more subsystems will be affected.
I believe after some agreement is reached, the default will become some equivalent of KBUILD_MODNAME ": " and the actions required in files that already have that #define will allow leisurely removal of those now unnecessary defines.
I expect functions to replace the #defines for pr_<level> and those functions will emit the appropriate KBUILD_MODNAME equivalents.
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 19 lines · Guenter Roeck
Quoted 18 lines · Joe Perches
Quoted 4 lines · Guenter Roeck
The modified define in kernel.org would only apply if
pr_fmtisn't already defined, so that argument is not really correct. The real difference would be that you could then remove the individualpr_fmtdefines from 211 files, and all users ofpr_fmtwithout module name (ie those hard to read) would be easier to read/identify.I think that's not a good idea for now, though I agree with the general concept.
This is in
kernel.hnow.#ifndef
pr_fmt
#definepr_fmt(fmt)fmt
#endifA lot of the pr_<level> calls already include some internal prefix.
Quoted 8 lines
Quoted 7 lines
Try:
$ grep -rP --include=*.[ch] -oh "\bpr_\w+\s*\(\s*\"\w+:" * | \ cut -f2- -d"(" | sort | uniq -c | sort -rnYou're suggesting modifying 100+ files to get the same output used now.
Yes, plus another 200+ files to remove the then-unnecessary existing
pr_fmtdefines.
We're set to change a lot of files anyway, so we might as well do the right thing now and be done with it.
Quoted 4 lines
Quoted 4 lines
I think doing something like this after some more generally accepted agreement is reached on how best to do it would be better.
Quoted 8 lines
Sounds like the ~400 definitions of TRUE and FALSE in the code base I am working with here.
My take is that the time to reach such an agreement is now, to avoid cluttering more code with
pr_fmtdefines. The longer we wait, the more difficult it will get to reach an agreement, since more and more subsystems will be affected.Personally, I think the
pr_fmtcleanup should be more important than replacing printk with pr_<level>. But I'll defer to Jean's judgement on this one, and follow his lead.
I totally agree with you, Guenter. My initial reaction (which I did post!) was exactly the same as yours. Adding a define for pr_fmt to all drivers in the kernel tree is simply insane. If the default definition of pr_fmt is not good enough, let's just make it better. Now. The whole point of pr_*() and dev_*() message printing functions is to have standard message formats common to all drivers across the tree. Not providing a sane default value for pr_fmt goes against this goal.
As far as I can see, the only issue with defaulting to 'KBUILD_BASENAME ": " fmt' is that some drivers which include a hard-coded prefix in log message will now have a redundant prefix. Should be easy enough to spot and fix, right?
I would even go one step further and claim that making pr_fmt configurable per driver is pointless. But this can be discussed separately/later.
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 25 lines · Jean Delvare
Hi Joe,
Quoted 11 lines · Joe Perches
Convert printks to pr_<level>
Coalesce long formats
Removed prefixes from formats
Added #definepr_fmtKBUILD_MODNAME": " fmt Standardized abitguru messages for reporting and finding MAINTAINER (...)drivers/hwmon/abituguru.c +0
-0drivers/hwmon/abituguru.c line 26
Quoted 7 lines
drivers/hwmon/abituguru.c +3
-0@@ -20,6 +20,9 @@the custom Abit uGuru chip found on Abit uGuru motherboards. Note: because of lack of specs the CPU/RAM voltage & frequency control is not supported! */ + +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> It looks odd that every driver would have to set this. Shouldn't this be the default set in <
linux/kernel.h>? Something like:
Quoted 8 lines
#ifndef
pr_fmt
#ifdefKBUILD_MODNAME
#definepr_fmt(fmt)KBUILD_MODNAME": " fmt
#else
#definepr_fmt(fmt)fmt
#endif /*KBUILD_MODNAME*/
#endif
Well we do have this:
#ifndef pr_fmt
#define pr_fmt(fmt) fmt
#endif
Cheers,
Davidlohr
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 35 lines · Davidlohr Bueso
Quoted 25 lines · Jean Delvare
Hi Joe,
Quoted 11 lines · Joe Perches
Convert printks to pr_<level>
Coalesce long formats
Removed prefixes from formats
Added #definepr_fmtKBUILD_MODNAME": " fmt Standardized abitguru messages for reporting and finding MAINTAINER (...)drivers/hwmon/abituguru.c +0
-0drivers/hwmon/abituguru.c line 26
Quoted 7 lines
drivers/hwmon/abituguru.c +3
-0@@ -20,6 +20,9 @@the custom Abit uGuru chip found on Abit uGuru motherboards. Note: because of lack of specs the CPU/RAM voltage & frequency control is not supported! */ + +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> It looks odd that every driver would have to set this. Shouldn't this be the default set in <
linux/kernel.h>? Something like:Quoted 8 lines
#ifndef
pr_fmt
#ifdefKBUILD_MODNAME
#definepr_fmt(fmt)KBUILD_MODNAME": " fmt
#else
#definepr_fmt(fmt)fmt
#endif /*KBUILD_MODNAME*/
#endif
Quoted 4 lines
Well we do have this:
#ifndefpr_fmt
#definepr_fmt(fmt)fmt
#endif
I can read the code, thank you. My point is that what we have is insufficient, as Joe is proposing to use a different pr_fmt definition for pretty much all drivers in the kernel tree.
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 8 lines · Jean Delvare
Quoted 4 lines · Davidlohr Bueso
Well we do have this:
#ifndefpr_fmt
#definepr_fmt(fmt)fmt
#endifI can read the code, thank you. My point is that what we have is insufficient, as Joe is proposing to use a different
pr_fmtdefinition for pretty much all drivers in the kernel tree.
No, I'm proposing to use a uniform pr_fmt definition for files that want a prefix on their logging messages.
At some point, the files that do not want a prefix should be converted to use #define pr_fmt(fmt) fmt.
Repeating from another email, there are ~1500 files that use pr_<level> without using pr_fmt. There are 335 files that #define pr_fmt.
So I'm not saying that point in time is now.
Another way to do this would be to standardize hwmon.h so it would add:
"#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt"
in only 1 place.
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
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 5 lines · Joe Perches
So perhaps add this to
include/linux/hwmon.hinstead:
#if definedpr_fmt
#undefpr_fmt
#definepr_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>
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Jim Cromie
maintainerQuoted 9 lines · Joe Perches
Quoted 5 lines · Joe Perches
So perhaps add this to
include/linux/hwmon.hinstead:
#if definedpr_fmt
#undefpr_fmt
#definepr_fmt(fmt)KBUILD_MODNAME": " fmt #endifNope. That won't work as other non-hwmon files include it.
Quoted 12 lines
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 ?
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 6 lines · Joe Perches
Quoted 5 lines · Jean Delvare
Quoted 4 lines · Davidlohr Bueso
Well we do have this:
#ifndefpr_fmt
#definepr_fmt(fmt)fmt
#endif
Quoted 6 lines
Quoted 3 lines
I can read the code, thank you. My point is that what we have is insufficient, as Joe is proposing to use a different
pr_fmtdefinition for pretty much all drivers in the kernel tree.No, I'm proposing to use a uniform
pr_fmtdefinition for files that want a prefix on their logging messages.
Which files can legitimately not want a prefix on their logging messages? How many files does this represent?
Quoted 8 lines
At some point, the files that do not want a prefix should be converted to use #define
pr_fmt(fmt)fmt.Repeating from another email, there are ~1500 files that use pr_<level> without using
pr_fmt. There are 335 files that #definepr_fmt.So I'm not saying that point in time is now.
I am saying it is now.
Quoted 11 lines
Another way to do this would be to standardize
hwmon.hso it would add:
"#definepr_fmt(fmt)KBUILD_MODNAME": " fmt"
in only 1 place.So perhaps add this to
include/linux/hwmon.hinstead:#if defined
pr_fmt
#undefpr_fmt
#definepr_fmt(fmt)KBUILD_MODNAME": " fmt
#endif
And do the same in all other subsystems? What's the benefit over doing the same in <linux/kernel.h>.
As it stands, I simply don't want your patches. As Guenter rightly said, these are cleanup patches which don't make the code cleaner, so there's no point. If you want to clean this up, please do it correctly.
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors