[tobetter-linux:odroid-5.14.y 46/67] drivers/pwm/pwm-gpio.c:60:22: warning: no previous prototype for function 'gpio_pwm_timer'

From: kernel test robot
Date: Tue Aug 31 2021 - 06:40:59 EST


tree: https://github.com/tobetter/linux odroid-5.14.y
head: 813dade16c755c4aeff738df4e8e5ebe6da4c515
commit: ff1b7a8bf5d8b3a3d651b84400c26be888b9335e [46/67] ODROID-COMMON: pwm: gpio: Add a generic gpio based PWM driver
config: arm64-randconfig-r024-20210831 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 4b1fde8a2b681dad2ce0c082a5d6422caa06b0bc)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://github.com/tobetter/linux/commit/ff1b7a8bf5d8b3a3d651b84400c26be888b9335e
git remote add tobetter-linux https://github.com/tobetter/linux
git fetch --no-tags tobetter-linux odroid-5.14.y
git checkout ff1b7a8bf5d8b3a3d651b84400c26be888b9335e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

>> drivers/pwm/pwm-gpio.c:60:22: warning: no previous prototype for function 'gpio_pwm_timer' [-Wmissing-prototypes]
enum hrtimer_restart gpio_pwm_timer(struct hrtimer *timer)
^
drivers/pwm/pwm-gpio.c:60:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
enum hrtimer_restart gpio_pwm_timer(struct hrtimer *timer)
^
static
1 warning generated.


vim +/gpio_pwm_timer +60 drivers/pwm/pwm-gpio.c

59
> 60 enum hrtimer_restart gpio_pwm_timer(struct hrtimer *timer)
61 {
62 struct gpio_pwm_data *gpio_data = container_of(timer,
63 struct gpio_pwm_data,
64 timer);
65 if (!gpio_data->run) {
66 gpio_pwm_off(gpio_data);
67 gpio_data->pin_on = false;
68 return HRTIMER_NORESTART;
69 }
70
71 if (!gpio_data->pin_on) {
72 hrtimer_forward_now(&gpio_data->timer,
73 ns_to_ktime(gpio_data->on_time));
74 gpio_pwm_on(gpio_data);
75 gpio_data->pin_on = true;
76 } else {
77 hrtimer_forward_now(&gpio_data->timer,
78 ns_to_ktime(gpio_data->off_time));
79 gpio_pwm_off(gpio_data);
80 gpio_data->pin_on = false;
81 }
82
83 return HRTIMER_RESTART;
84 }
85

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip