From: kernel test robot <lkp@intel.com>
To: Kevin Kim <ckkim@hardkernel.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Dongjin Kim <tobetter@gmail.com>,
Olliver Schinagl <oliver@schinagl.nl>
Subject: [tobetter:odroid-6.1.y 20/91] drivers/pwm/pwm-gpio.c:60:22: warning: no previous prototype for function 'gpio_pwm_timer'
Date: Sun, 21 Jan 2024 06:55:22 +0800 [thread overview]
Message-ID: <202401210628.5lKKsZ7A-lkp@intel.com> (raw)
tree: https://github.com/tobetter/linux odroid-6.1.y
head: 4abe38fb1d55e2c5f10582404c5ff88505060b73
commit: 459931baf254b27d2ec9a732b41bf2bff9e1c1d2 [20/91] ODROID-COMMON: pwm: gpio: Add a generic gpio based PWM driver
config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20240121/202401210628.5lKKsZ7A-lkp@intel.com/config)
compiler: clang version 18.0.0git (https://github.com/llvm/llvm-project d92ce344bf641e6bb025b41b3f1a77dd25e2b3e9)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240121/202401210628.5lKKsZ7A-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202401210628.5lKKsZ7A-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/pwm/pwm-gpio.c:60:22: warning: no previous prototype for function 'gpio_pwm_timer' [-Wmissing-prototypes]
60 | 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
60 | enum hrtimer_restart gpio_pwm_timer(struct hrtimer *timer)
| ^
| static
drivers/pwm/pwm-gpio.c:138:3: error: field designator 'config' does not refer to any field in type 'const struct pwm_ops'
138 | .config = gpio_pwm_config,
| ~^~~~~~~~~~~~~~~~~~~~~~~~
drivers/pwm/pwm-gpio.c:139:3: error: field designator 'set_polarity' does not refer to any field in type 'const struct pwm_ops'
139 | .set_polarity = gpio_pwm_set_polarity,
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/pwm/pwm-gpio.c:140:3: error: field designator 'enable' does not refer to any field in type 'const struct pwm_ops'
140 | .enable = gpio_pwm_enable,
| ~^~~~~~~~~~~~~~~~~~~~~~~~
drivers/pwm/pwm-gpio.c:141:3: error: field designator 'disable' does not refer to any field in type 'const struct pwm_ops'
141 | .disable = gpio_pwm_disable,
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning and 4 errors 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
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-01-20 22:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202401210628.5lKKsZ7A-lkp@intel.com \
--to=lkp@intel.com \
--cc=ckkim@hardkernel.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oliver@schinagl.nl \
--cc=tobetter@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox