diff mbox

[1/2] pwm: Remove pwm_can_sleep()

Message ID 20170104091348.31277-1-thierry.reding@gmail.com
State Accepted
Headers show

Commit Message

Thierry Reding Jan. 4, 2017, 9:13 a.m. UTC
The last user of this function has been removed, so it is no longer
needed.

Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
---
 drivers/pwm/core.c  | 12 ------------
 include/linux/pwm.h |  7 -------
 2 files changed, 19 deletions(-)

Comments

kernel test robot Jan. 4, 2017, 3:20 p.m. UTC | #1
Hi Thierry,

[auto build test ERROR on pwm/for-next]
[also build test ERROR on v4.10-rc2 next-20170104]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Thierry-Reding/pwm-Remove-pwm_can_sleep/20170104-222234
base:   https://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm.git for-next
config: x86_64-randconfig-i0-201701 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/leds/leds-pwm.c: In function 'led_pwm_add':
>> drivers/leds/leds-pwm.c:115:2: error: implicit declaration of function 'pwm_can_sleep' [-Werror=implicit-function-declaration]
     led_data->can_sleep = pwm_can_sleep(led_data->pwm);
     ^
   cc1: some warnings being treated as errors

vim +/pwm_can_sleep +115 drivers/leds/leds-pwm.c

5f7b03dc Russell King     2014-04-06  109  		ret = PTR_ERR(led_data->pwm);
5f7b03dc Russell King     2014-04-06  110  		dev_err(dev, "unable to request PWM for %s: %d\n",
5f7b03dc Russell King     2014-04-06  111  			led->name, ret);
5f7b03dc Russell King     2014-04-06  112  		return ret;
5f7b03dc Russell King     2014-04-06  113  	}
5f7b03dc Russell King     2014-04-06  114  
5f7b03dc Russell King     2014-04-06 @115  	led_data->can_sleep = pwm_can_sleep(led_data->pwm);
9aa07625 Jacek Anaszewski 2015-08-20  116  	if (!led_data->can_sleep)
9aa07625 Jacek Anaszewski 2015-08-20  117  		led_data->cdev.brightness_set = led_pwm_set;
9aa07625 Jacek Anaszewski 2015-08-20  118  	else

:::::: The code at line 115 was first introduced by commit
:::::: 5f7b03dc2ab5f4ca16e5d6bc3e6dcd2953c6fede leds: leds-pwm: provide a common function to setup a single led-pwm device

:::::: TO: Russell King <rmk+kernel@arm.linux.org.uk>
:::::: CC: Bryan Wu <cooloney@gmail.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
diff mbox

Patch

diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
index 172ef8245811..78e114a11c4f 100644
--- a/drivers/pwm/core.c
+++ b/drivers/pwm/core.c
@@ -960,18 +960,6 @@  void devm_pwm_put(struct device *dev, struct pwm_device *pwm)
 }
 EXPORT_SYMBOL_GPL(devm_pwm_put);
 
-/**
-  * pwm_can_sleep() - report whether PWM access will sleep
-  * @pwm: PWM device
-  *
-  * Returns: True if accessing the PWM can sleep, false otherwise.
-  */
-bool pwm_can_sleep(struct pwm_device *pwm)
-{
-	return true;
-}
-EXPORT_SYMBOL_GPL(pwm_can_sleep);
-
 #ifdef CONFIG_DEBUG_FS
 static void pwm_dbg_show(struct pwm_chip *chip, struct seq_file *s)
 {
diff --git a/include/linux/pwm.h b/include/linux/pwm.h
index 2c6c5114c089..e15fd3ce6502 100644
--- a/include/linux/pwm.h
+++ b/include/linux/pwm.h
@@ -451,8 +451,6 @@  struct pwm_device *devm_pwm_get(struct device *dev, const char *con_id);
 struct pwm_device *devm_of_pwm_get(struct device *dev, struct device_node *np,
 				   const char *con_id);
 void devm_pwm_put(struct device *dev, struct pwm_device *pwm);
-
-bool pwm_can_sleep(struct pwm_device *pwm);
 #else
 static inline struct pwm_device *pwm_request(int pwm_id, const char *label)
 {
@@ -566,11 +564,6 @@  static inline struct pwm_device *devm_of_pwm_get(struct device *dev,
 static inline void devm_pwm_put(struct device *dev, struct pwm_device *pwm)
 {
 }
-
-static inline bool pwm_can_sleep(struct pwm_device *pwm)
-{
-	return false;
-}
 #endif
 
 static inline void pwm_apply_args(struct pwm_device *pwm)