1. 21 Jul, 2014 1 commit
    • Lee Jones's avatar
      mfd: ab8500-debugfs: BIG clean-up · 4362175d
      Lee Jones authored
      When checkpatch is run on ab8500-debugfs.c it screamed blue murder!
      
      This patch fixes up all of the errors/warnings reported:
      
      WARNING: line over 80 characters
      +		err = seq_printf(s, "  [0x%02X/0x%02X]: 0x%02X\n",
      
      WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(...  to printk(KERN_INFO ...
      +		printk(KERN_INFO" [0x%02X/0x%02X]: 0x%02X\n",
      
      WARNING: Prefer seq_puts to seq_printf
      +	seq_printf(s, AB8500_NAME_STRING " register values:\n");
      
      WARNING: Prefer seq_puts to seq_printf
      +	seq_printf(s, AB8500_NAME_STRING " register values:\n");
      
      WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(...  to printk(KERN_INFO ...
      +	printk(KERN_INFO"ab8500 register values:\n");
      
      WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(...  to printk(KERN_INFO ...
      +		printk(KERN_INFO" bank 0x%02X:\n", i);
      
      WARNING: externs should be avoided in .c files
      +extern int prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size);
      
      WARNING: quoted string split across lines
      +	pr_info("Saving all ABB registers at \"ab8500_complete_register_dump\" "
      +		"for crash analyze.\n");
      
      WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...
      +		printk(KERN_ERR "abx500_set_reg failed %d, %d", err, __LINE__);
      
      WARNING: Prefer seq_puts to seq_printf
      +	seq_printf(s, "name: number:  number of: wake:\n");
      
      WARNING: line over 80 characters
      +	return single_open(file, ab8500_print_modem_registers, inode->i_private);
      
      WARNING: line over 80 characters
      +	return single_open(file, ab8500_gpadc_btemp_ball_print, inode->i_private);
      
      WARNING: line over 80 characters
      +	return single_open(file, ab8500_gpadc_main_bat_v_print, inode->i_private);
      
      WARNING: line over 80 characters
      +	vbat_true_meas_convert = ab8500_gpadc_ad_to_voltage(gpadc, VBAT_TRUE_MEAS,
      
      WARNING: line over 80 characters
      +static int ab8540_gpadc_vbat_true_meas_and_ibat_print(struct seq_file *s, void *p)
      
      WARNING: line over 80 characters
      +static const struct file_operations ab8540_gpadc_vbat_true_meas_and_ibat_fops = {
      
      WARNING: line over 80 characters
      +		vmain_l, vmain_h, btemp_l, btemp_h, vbat_l, vbat_h, ibat_l, ibat_h);
      
      WARNING: quoted string split across lines
      +		dev_err(dev, "debugfs error input: "
      +			"should be egal to 1, 4, 8 or 16\n");
      
      WARNING: Missing a blank line after declarations
      +	char *s = b;
      +	if ((*s == '0') && ((*(s+1) == 'x') || (*(s+1) == 'X'))) {
      
      WARNING: simple_strtoul is obsolete, use kstrtoul instead
      +			loc.mask = simple_strtoul(b, &b, 0);
      
      WARNING: simple_strtol is obsolete, use kstrtol instead
      +			loc.shift = simple_strtol(b, &b, 0);
      
      WARNING: simple_strtoul is obsolete, use kstrtoul instead
      +	loc.bank = simple_strtoul(b, &b, 0);
      
      WARNING: simple_strtoul is obsolete, use kstrtoul instead
      +	loc.addr = simple_strtoul(b, &b, 0);
      
      WARNING: simple_strtoul is obsolete, use kstrtoul instead
      +		val = simple_strtoul(b, &b, 0);
      
      WARNING: quoted string split across lines
      +	pr_warn("HWREG request: %s, %s, addr=0x%08X, mask=0x%X, shift=%d"
      +			"value=0x%X\n", (write) ? "write" : "read",
      
      WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...
      +		printk(KERN_ERR "sysfs_create_file failed %d\n", err);
      
      WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...
      +		printk(KERN_ERR "request_threaded_irq failed %d, %lu\n",
      
      ERROR: code indent should use tabs where possible
      +                       err, user_val);$
      
      WARNING: please, no spaces at the start of a line
      +                       err, user_val);$
      
      WARNING: Missing a blank line after declarations
      +	struct resource *res;
      +	debug_bank = AB8500_MISC;
      
      ERROR: space required after that ',' (ctx:VxV)
      +		sizeof(*dev_attr)*num_irqs,GFP_KERNEL);
       		                          ^
      
      WARNING: return of an errno should typically be -ve (return -ENXIO)
      +		return ENXIO;
      
      WARNING: line over 80 characters
      +	file = debugfs_create_file("register-bank", (S_IRUGO | S_IWUSR | S_IWGRP),
      
      WARNING: line over 80 characters
      +	file = debugfs_create_file("register-address", (S_IRUGO | S_IWUSR | S_IWGRP),
      
      WARNING: line over 80 characters
      +	file = debugfs_create_file("register-value", (S_IRUGO | S_IWUSR | S_IWGRP),
      
      WARNING: line over 80 characters
      +	file = debugfs_create_file("irq-subscribe", (S_IRUGO | S_IWUSR | S_IWGRP),
      
      WARNING: line over 80 characters
      +	file = debugfs_create_file("irq-unsubscribe", (S_IRUGO | S_IWUSR | S_IWGRP),
      
      WARNING: line over 80 characters
      +	file = debugfs_create_file("all-modem-registers", (S_IRUGO | S_IWUSR | S_IWGRP),
      
      WARNING: line over 80 characters
      +	file = debugfs_create_file("main_charger_v", (S_IRUGO | S_IWUSR | S_IWGRP),
      
      WARNING: line over 80 characters
      +	file = debugfs_create_file("main_charger_c", (S_IRUGO | S_IWUSR | S_IWGRP),
      
      WARNING: line over 80 characters
      +	file = debugfs_create_file("usb_charger_c", (S_IRUGO | S_IWUSR | S_IWGRP),
      
      WARNING: line over 80 characters
      +		file = debugfs_create_file("xtal_temp", (S_IRUGO | S_IWUSR | S_IWGRP),
      
      WARNING: line over 80 characters
      +			ab8500_gpadc_dir, &plf->dev, &ab8540_gpadc_xtal_temp_fops);
      
      WARNING: line over 80 characters
      +		file = debugfs_create_file("vbattruemeas", (S_IRUGO | S_IWUSR | S_IWGRP),
      
      WARNING: line over 80 characters
      +		file = debugfs_create_file("otp_calib", (S_IRUGO | S_IWUSR | S_IWGRP),
      
      WARNING: line over 80 characters
      +			ab8500_gpadc_dir, &plf->dev, &ab8540_gpadc_otp_calib_fops);
      
      total: 2 errors, 44 warnings, 3230 lines checked
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      4362175d
  2. 11 Jul, 2014 2 commits
  3. 09 Jul, 2014 37 commits