1. 02 3月, 2016 1 次提交
  2. 14 1月, 2016 29 次提交
    • L
      mfd: davinci_voicecodec: Remove pointless 'out of memory' error message · 9fb41166
      Lee Jones 提交于
      WARNING: Possible unnecessary 'out of memory' message
      +       if (!davinci_vc) {
      +               dev_dbg(&pdev->dev,
      
      total: 0 errors, 1 warnings, 154 lines checked
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      9fb41166
    • L
      mfd: da9052-irq: Fix trivial 'space before comma' error · 997eea46
      Lee Jones 提交于
      ERROR: space prohibited before that ',' (ctx:WxW)
      +       da9052_free_irq(da9052, DA9052_IRQ_ADC_EOM , da9052);
      
      total: 1 errors, 0 warnings, 290 lines checked
      
      Cc: Support Opensource <support.opensource@diasemi.com>
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      997eea46
    • L
      mfd: da9052-i2c: Fix tabbing/whitespace issue · 5b7b2ac1
      Lee Jones 提交于
      WARNING: suspect code indent for conditional statements (8, 24)
      +       if (!i2c_safe_reg(reg))
      +                       return regmap_read(da9052->regmap,
      
      total: 0 errors, 1 warnings, 226 lines checked
      
      Cc: Support Opensource <support.opensource@diasemi.com>
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      5b7b2ac1
    • L
      mfd: da903x: Fix white space and split string issues · 8b277578
      Lee Jones 提交于
      While we're at it, let's also match the MODULE_LICENSE with the header.
      
      WARNING: please, no space before tabs
      + * ^IMike Rapoport <mike@compulab.co.il>$
      
      WARNING: please, no space before tabs
      + * ^IEric Miao <eric.miao@marvell.com>$
      
      WARNING: quoted string split across lines
      +MODULE_AUTHOR("Eric Miao <eric.miao@marvell.com>"
      +             "Mike Rapoport <mike@compulab.co.il>");
      
      total: 0 errors, 3 warnings, 574 lines checked
      
      Cc: Support Opensource <support.opensource@diasemi.com>
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      8b277578
    • L
      mfd: cs5535-mfd: Add missing line spacing and make local array static · 740c1989
      Lee Jones 提交于
      WARNING: Missing a blank line after declarations
      +       struct resource *res;
      +       res = platform_get_resource(pdev, IORESOURCE_IO, 0);
      
      WARNING: char * array declaration might be better as static const
      +       const char *acpi_clones[] = { "olpc-xo1-pm-acpi", "olpc-xo1-sci-acpi" };
      
      total: 0 errors, 2 warnings, 192 lines checked
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      740c1989
    • L
      mfd: cros_ec_spi: Repair comparison ordering issue · 8827a642
      Lee Jones 提交于
      WARNING: Comparisons should place the constant on the right side of the test
      +       BUG_ON(EC_MSG_PREAMBLE_COUNT > ec_dev->din_size);
      
      WARNING: Comparisons should place the constant on the right side of the test
      +       BUG_ON(EC_MSG_PREAMBLE_COUNT > ec_dev->din_size);
      
      total: 0 errors, 2 warnings, 731 lines checked
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      8827a642
    • L
      mfd: cros_ec_i2c: Fix trivial 'tabs before spaces' whitespace issue. · 2756db6c
      Lee Jones 提交于
      ERROR: code indent should use tabs where possible
      + ^Iec_dev = devm_kzalloc(dev, sizeof(*ec_dev), GFP_KERNEL);$
      
      WARNING: please, no space before tabs
      + ^Iec_dev = devm_kzalloc(dev, sizeof(*ec_dev), GFP_KERNEL);$
      
      WARNING: please, no spaces at the start of a line
      + ^Iec_dev = devm_kzalloc(dev, sizeof(*ec_dev), GFP_KERNEL);$
      
      total: 1 errors, 2 warnings, 366 lines checked
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      2756db6c
    • L
      mfd: asic3: Fix a plethora of Checkpatch errors and warnings · d43c4290
      Lee Jones 提交于
      ERROR: Macros with complex values should be enclosed in parentheses
      +#define INIT_CDEX(_name, _rate)        \
      +       [ASIC3_CLOCK_##_name] = {               \
      +               .cdex = CLOCK_CDEX_##_name,     \
      +               .rate = _rate,                  \
      +       }
      
      WARNING: line over 80 characters
      +                                                           ASIC3_GPIO_INT_STATUS);
      
      WARNING: void function return statements are not generally useful
      +       return;
      +}
      
      WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
      +       msleep(1);
      
      WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
      +       msleep(1);
      
      WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
      +       msleep(1);
      
      WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
      +       msleep(1);
      
      WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
      +       msleep(1);
      
      WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
      +       msleep(1);
      
      WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
      +               msleep(1);
      WARNING: line over 80 characters
      +               asic->tmio_cnf = ioremap((ASIC3_SD_CONFIG_BASE >> asic->bus_shift) +
      
      WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then dev_err(dev, ... then p
      r_err(...  to printk(KERN_ERR ...
      +               printk(KERN_ERR "kzalloc failed\n");
      
      WARNING: Possible unnecessary 'out of memory' message
      +       if (asic == NULL) {
      +               printk(KERN_ERR "kzalloc failed\n");
      
      WARNING: Missing a blank line after declarations
      +       int retval = 0;
      +       retval = platform_driver_probe(&asic3_device_driver, asic3_probe);
      
      total: 1 errors, 13 warnings, 1081 lines checked
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      d43c4290
    • L
      mfd: as3711: Repair OOM and 'line over 80 chars' formatting warnings · ae487ae2
      Lee Jones 提交于
      WARNING: Possible unnecessary 'out of memory' message
      +               if (!pdata) {
      +                       dev_err(&client->dev, "Failed to allocate pdata\n");
      
      WARNING: Possible unnecessary 'out of memory' message
      +       if (!as3711) {
      +               dev_err(&client->dev, "Memory allocation failed\n");
      
      WARNING: line over 80 characters
      +               dev_err(&client->dev, "regmap initialization failed: %d\n", ret);
      
      WARNING: line over 80 characters
      +       /* We can reuse as3711_subdevs[], it will be copied in mfd_add_devices() */
      
      WARNING: line over 80 characters
      +               as3711_subdevs[AS3711_REGULATOR].platform_data = &pdata->regulator;
      
      WARNING: line over 80 characters
      +               as3711_subdevs[AS3711_REGULATOR].pdata_size = sizeof(pdata->regulator);
      
      WARNING: line over 80 characters
      +               as3711_subdevs[AS3711_BACKLIGHT].platform_data = &pdata->backlight;
      
      WARNING: line over 80 characters
      +               as3711_subdevs[AS3711_BACKLIGHT].pdata_size = sizeof(pdata->backlight);
      
      total: 0 errors, 8 warnings, 236 lines checked
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      ae487ae2
    • L
      mfd: arizona-i2c: Add blank line formatting after declaration · 9f6e872a
      Lee Jones 提交于
      WARNING: Missing a blank line after declarations
      +       struct arizona *arizona = dev_get_drvdata(&i2c->dev);
      +       arizona_dev_exit(arizona);
      
      total: 0 errors, 1 warnings, 120 lines checked
      
      Cc: patches@opensource.wolfsonmicro.com
      Acked-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      9f6e872a
    • L
      mfd: arizona-core: msleep() is unreliable for anything <20ms use usleep_range() instead · b79a980f
      Lee Jones 提交于
      WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
      +               msleep(1);
      
      WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
      +                       msleep(5);
      
      WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
      +               msleep(1);
      
      WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
      +               msleep(1);
      
      total: 0 errors, 4 warnings, 1407 lines checked
      
      Cc: patches@opensource.wolfsonmicro.com
      Acked-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      b79a980f
    • L
      mfd: adp5520: Some trivial 'no space before tab' fixes · 3103d44e
      Lee Jones 提交于
      WARNING: please, no space before tabs
      + * ^IMike Rapoport <mike@compulab.co.il>$
      
      WARNING: please, no space before tabs
      + * ^IEric Miao <eric.miao@marvell.com>$
      
      WARNING: please, no space before tabs
      +^I.id_table ^I= adp5520_id,$
      
      total: 0 errors, 3 warnings, 365 lines checked
      
      Cc: Michael Hennerich <michael.hennerich@analog.com>
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      3103d44e
    • L
      mfd: ab8500-sysctrl: Fix Constify, printk => pr_info and formatting issues · 63b4fd75
      Lee Jones 提交于
      WARNING: char * array declaration might be better as static const
      +       static char *pss[] = {"ab8500_ac", "pm2301", "ab8500_usb"};
      
      WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then
       pr_info(...  to printk(KERN_INFO ...
      +                       printk(KERN_INFO
      
      WARNING: quoted string split across lines
      +                              "Charger \"%s\" is connected with known battery."
      +                              " Rebooting.\n",
      
      WARNING: quoted string split across lines
      +                                       "unable to set sysClkReq%dRfClkBuf: "
      +                                       "%d\n", j + 1, ret);
      
      total: 0 errors, 4 warnings, 199 lines checked
      
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      63b4fd75
    • L
      mfd: ab8500-gpadc: Squash a whole bunch of Checkpatch warnings and one error · df36442c
      Lee Jones 提交于
      WARNING: line over 80 characters
      +#define ADC_CH_IBAT_MIN                        (-6000) /* mA range measured by ADC for ib
      t*/
      
      WARNING: line over 80 characters
      +#define ADC_CH_IBAT_MIN_V              (-60)   /* mV range measured by ADC for ibat*/
      
      WARNING: suspect code indent for conditional statements (16, 20)
      +               if (!strcmp(name, dev_name(gpadc->dev)))
      +                   return gpadc;
      
      WARNING: suspect code indent for conditional statements (0, 16)
      +if (ad_value < 0) {
      +               dev_err(gpadc->dev, "GPADC raw value failed ch: %d\n",
      
      WARNING: quoted string split across lines
      +               dev_err(gpadc->dev, "GPADC to voltage conversion failed ch:"
      +                       " %d AD: 0x%x\n", channel, ad_value);
      
      WARNING: Missing a blank line after declarations
      +       int raw_data;
      +       raw_data = ab8500_gpadc_double_read_raw(gpadc, channel,
      
      WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
      +               msleep(10);
      
      ERROR: else should follow close brace '}'
      +       }
      +       else
      
      WARNING: line over 80 characters
      +                       delay_max = 10000; /* large range to optimise sleep mode */
      
      WARNING: line over 80 characters
      +                       gpadc->cal_data[ADC_INPUT_IBAT].gain = V_gain * V2A_gain;
      
      WARNING: line over 80 characters
      +       gpadc = devm_kzalloc(&pdev->dev, sizeof(struct ab8500_gpadc), GFP_KERNEL);
      
      WARNING: Possible unnecessary 'out of memory' message
      +       if (!gpadc) {
      +               dev_err(&pdev->dev, "Error: No memory\n");
      
      WARNING: space prohibited before semicolon
      +       return ;
      
      WARNING: void function return statements are not generally useful
      +       return ;
      +}
      
      WARNING: quoted string split across lines
      +MODULE_AUTHOR("Arun R Murthy, Daniel Willerud, Johan Palsson,"
      +               "M'boumba Cedric Madianga");
      
      total: 1 errors, 14 warnings, 1089 lines checked
      
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      df36442c
    • L
      mfd: ab8500-debugfs: Clean-up non-conforming commenting and print formatting · de6a7693
      Lee Jones 提交于
      WARNING: Block comments use a trailing */ on a separate line
      +                        * not be accessed from here */
      
      WARNING: Block comments use a trailing */ on a separate line
      +                        * not be accessed from here */
      
      WARNING: Block comments use a trailing */ on a separate line
      +                                * the output is wanted in any case */
      
      WARNING: Consecutive strings are generally better as a single string
      +               "  addr=0x%08X, mask=0x%X, shift=%d" "value=0x%X\n",
      
      total: 0 errors, 4 warnings, 3331 lines checked
      
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      de6a7693
    • L
      mfd: ab8500-core: Fix many warnings reported by Checkpatch · 500e69a1
      Lee Jones 提交于
      WARNING: Block comments use a trailing */ on a separate line
      +        * */
      
      WARNING: Block comments use a trailing */ on a separate line
      +        * bank on higher 8 bits and reg in lower */
      
      WARNING: Block comments use a trailing */ on a separate line
      +        * bank on higher 8 bits and reg in lower */
      
      WARNING: suspect code indent for conditional statements (8, 24)
      +       if (unlikely(*offset == 17))
      +                       *offset = 24;
      
      WARNING: suspect code indent for conditional statements (8, 24)
      +       if (unlikely(*offset == 16))
      +                       *offset = 25;
      
      WARNING: suspect code indent for conditional statements (8, 24)
      +       if ((i == 3) && (*offset >= 24))
      +                       *offset += 2;
      
      WARNING: ENOSYS means 'invalid syscall nr' and nothing else
      +               return -ENOSYS;
      
      WARNING: static const char * array should probably be static const char * const
      +       static const char *switch_off_status[] = {
      
      WARNING: static const char * array should probably be static const char * const
      +       static const char *turn_on_status[] = {
      
      total: 0 errors, 9 warnings, 1867 lines checked
      
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      500e69a1
    • L
      mfd: ab2100-otp: Remove pointless 'out of memory' error message · 845b76f8
      Lee Jones 提交于
      WARNING: Possible unnecessary 'out of memory' message
      +       if (!otp) {
      +               dev_err(&pdev->dev, "could not allocate AB3100 OTP device\n");
      
      total: 0 errors, 1 warnings, 250 lines checked
      
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      845b76f8
    • L
      mfd: ab3100-core.c: Fix multiple warnings reported by Checkpatch · 15544cab
      Lee Jones 提交于
      WARNING: Missing a blank line after declarations
      +       struct ab3100 *ab3100 = dev_get_drvdata(dev->parent);
      +       if (!ab3100->startup_events_read)
      
      WARNING: Possible unnecessary 'out of memory' message
      +       if (!ab3100) {
      +               dev_err(&client->dev, "could not allocate AB3100 device\n");
      
      WARNING: else is not generally useful after a break or return
      +                               break;
      +                       } else {
      
      total: 0 errors, 3 warnings, 996 lines checked
      
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      15544cab
    • L
      mfd: aat2870-core: Remove unnecessary 'out of memory' message · 4374b20c
      Lee Jones 提交于
      WARNING: Possible unnecessary 'out of memory' message
      +       if (!aat2870) {
      +               dev_err(&client->dev,
      
      total: 0 errors, 1 warnings, 524 lines checked
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      4374b20c
    • L
      mfd: 88pm860x-core: Fix commenting and declaration spacing · f90dff44
      Lee Jones 提交于
      Checkpatch output:
      
      WARNING: Block comments use a trailing */ on a separate line
      +        * - turn off */
      
      WARNING: Missing a blank line after declarations
      +       int ret;
      +       ret = i2c_add_driver(&pm860x_driver);
      
      total: 0 errors, 2 warnings, 1283 lines checked
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      f90dff44
    • G
      1b5420e1
    • L
      mfd: asic3: Be sure to clamp return value · f8e3a514
      Linus Walleij 提交于
      As we want gpio_chip .get() calls to be able to return negative
      error codes and propagate to drivers, we need to go over all
      drivers and make sure their return values are clamped to [0,1].
      We do this by using the ret = !!(val) design pattern.
      
      Cc: Paul Parsons <lost.distance@yahoo.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      f8e3a514
    • L
      mfd: dm355evm_mps: Be sure to clamp return value · fe0b4867
      Linus Walleij 提交于
      As we want gpio_chip .get() calls to be able to return negative
      error codes and propagate to drivers, we need to go over all
      drivers and make sure their return values are clamped to [0,1].
      We do this by using the ret = !!(val) design pattern.
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      fe0b4867
    • L
      mfd: htc-egpio: Be sure to clamp return value · f7d62366
      Linus Walleij 提交于
      As we want gpio_chip .get() calls to be able to return negative
      error codes and propagate to drivers, we need to go over all
      drivers and make sure their return values are clamped to [0,1].
      We do this by using the ret = !!(val) design pattern.
      
      Cc: Philipp Zabel <philipp.zabel@gmail.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      f7d62366
    • L
      mfd: tc6393xb: Be sure to clamp return value · 2d5f72b8
      Linus Walleij 提交于
      As we want gpio_chip .get() calls to be able to return negative
      error codes and propagate to drivers, we need to go over all
      drivers and make sure their return values are clamped to [0,1].
      We do this by using the ret = !!(val) design pattern.
      
      Cc: Dmitry Baryshkov <dbaryshkov@gmail.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      2d5f72b8
    • L
      mfd: tps65010: Be sure to clamp return value · bf3de47f
      Linus Walleij 提交于
      As we want gpio_chip .get() calls to be able to return negative
      error codes and propagate to drivers, we need to go over all
      drivers and make sure their return values are clamped to [0,1].
      We do this by using the ret = !!(val) design pattern.
      
      This also start to propagate the negative error code from the
      smbus call if there is one, as the last commit of this series
      will make the gpiolib core deal with that properly.
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      bf3de47f
    • L
      power: bq27xxx_battery: Fix bq27541 AveragePower register address · 265b6049
      Liu Xiang 提交于
      Currently in bq27541 driver, the average power register address is
      incorrectly set to 0x76, which would result in an error:
      bq27xxx-battery 2-0055: error reading average power register  10: -11
      According to the bq27541 datasheet, fix this problem by setting
      the average power register address to 0x24.
      
      Fixes: d74534c2 ("power: bq27xxx_battery: Add support for additional bq27xxx family devices")
      Signed-off-by: NLiu Xiang <liu.xiang6@zte.com.cn>
      Acked-by: NAndrew F. Davis <afd@ti.com>
      Signed-off-by: NSebastian Reichel <sre@kernel.org>
      265b6049
    • G
      drivers/of: Export OF changeset functions · 18322377
      Gavin Shan 提交于
      The PowerNV PCI hotplug driver is going to use the OF changeset
      to manage the changed device sub-tree. This exports those OF
      changeset functions for that.
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Acked-by: NWolfram Sang <wsa+renesas@sang-engineering.com>
      Tested-by: NWolfram Sang <wsa+renesas@sang-engineering.com>
      Signed-off-by: NRob Herring <robh@kernel.org>
      18322377
    • A
      efi: include asm/early_ioremap.h not asm/efi.h to get early_memremap · 0f7f2f0c
      Ard Biesheuvel 提交于
      The code in efi.c uses early_memremap(), but relies on a transitive
      include rather than including asm/early_ioremap.h directly, since
      this header did not exist on ia64.
      
      Commit f7d92489 ("arm64/efi: refactor EFI init and runtime code
      for reuse by 32-bit ARM") attempted to work around this by including
      asm/efi.h, which transitively includes asm/early_ioremap.h on most
      architectures. However, since asm/efi.h does not exist on ia64 either,
      this is not much of an improvement.
      
      Now that we have created an asm/early_ioremap.h for ia64, we can just
      include it directly.
      Reported-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      0f7f2f0c
  3. 13 1月, 2016 9 次提交
  4. 12 1月, 2016 1 次提交
    • R
      lguest: Map switcher text R/O · e27d90e8
      Rusty Russell 提交于
      Pavel noted that lguest maps the switcher code executable and
      read-write.  This is a bad idea for any kernel text, but
      particularly for text mapped at a fixed address.
      
      Create two vmas, one for the text (PAGE_KERNEL_RX) and another
      for the stacks (PAGE_KERNEL).  Use VM_NO_GUARD to map them
      adjacent (as expected by the rest of the code).
      Reported-by: NPavel Machek <pavel@ucw.cz>
      Tested-by: NPavel Machek <pavel@ucw.cz>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      e27d90e8