From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [intel-lts:5.10/yocto 18516/20368] drivers/ptp/ptp-intel-pmc-tgpio.c:388:6: warning: variable 'new_start_ns' is used uninitialized whenever 'if' condition is false
Date: Sun, 16 Jan 2022 20:34:43 +0800 [thread overview]
Message-ID: <202201162006.UOLVb6S8-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4406 bytes --]
tree: https://github.com/intel/linux-intel-lts.git 5.10/yocto
head: 1941d4b82f36cc6ecc513f3e496ad62726d00514
commit: ba88170534041ab8213508ceddf96c012d9d9e7e [18516/20368] Add support for PMC Time-Aware GPIO (TGPIO) hardware that is present on upcoming Intel platforms. The hardware logic is driven by the ART clock. The current hardware has two GPIO pins. Input interrupts are not implemented in hardware.
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20220116/202201162006.UOLVb6S8-lkp(a)intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 650fc40b6d8d9a5869b4fca525d5f237b0ee2803)
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
# https://github.com/intel/linux-intel-lts/commit/ba88170534041ab8213508ceddf96c012d9d9e7e
git remote add intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-lts 5.10/yocto
git checkout ba88170534041ab8213508ceddf96c012d9d9e7e
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/gpio/ drivers/gpu/drm/i915/ drivers/ptp/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/ptp/ptp-intel-pmc-tgpio.c:388:6: warning: variable 'new_start_ns' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (on || perout->flags & PTP_PEROUT_ONE_SHOT) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/ptp/ptp-intel-pmc-tgpio.c:396:26: note: uninitialized use occurs here
(tgpio, perout->index, new_start_ns, new_period_ns,
^~~~~~~~~~~~
drivers/ptp/ptp-intel-pmc-tgpio.c:388:2: note: remove the 'if' if its condition is always true
if (on || perout->flags & PTP_PEROUT_ONE_SHOT) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/ptp/ptp-intel-pmc-tgpio.c:385:2: note: variable 'new_start_ns' is declared here
struct timespec64 new_start_ns;
^
>> drivers/ptp/ptp-intel-pmc-tgpio.c:388:6: warning: variable 'new_period_ns' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (on || perout->flags & PTP_PEROUT_ONE_SHOT) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/ptp/ptp-intel-pmc-tgpio.c:396:40: note: uninitialized use occurs here
(tgpio, perout->index, new_start_ns, new_period_ns,
^~~~~~~~~~~~~
drivers/ptp/ptp-intel-pmc-tgpio.c:388:2: note: remove the 'if' if its condition is always true
if (on || perout->flags & PTP_PEROUT_ONE_SHOT) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/ptp/ptp-intel-pmc-tgpio.c:386:2: note: variable 'new_period_ns' is declared here
struct timespec64 new_period_ns;
^
>> drivers/ptp/ptp-intel-pmc-tgpio.c:738:36: warning: unused variable 'intel_pmc_acpi_match' [-Wunused-const-variable]
static const struct acpi_device_id intel_pmc_acpi_match[] = {
^
3 warnings generated.
vim +388 drivers/ptp/ptp-intel-pmc-tgpio.c
381
382 static int intel_pmc_tgpio_config_output
383 (struct intel_pmc_tgpio_t *tgpio, struct ptp_perout_request *perout, int on)
384 {
385 struct timespec64 new_start_ns;
386 struct timespec64 new_period_ns;
387
> 388 if (on || perout->flags & PTP_PEROUT_ONE_SHOT) {
389 new_start_ns = ptp_clock_time_to_ts64(perout->start);
390 new_period_ns = ptp_clock_time_to_ts64(perout->period);
391 new_period_ns = ktime_to_timespec64
392 (ktime_divns(timespec64_to_ktime(new_period_ns), 2));
393 }
394
395 return _intel_pmc_tgpio_config_output
396 (tgpio, perout->index, new_start_ns, new_period_ns,
397 perout->flags, on);
398 }
399
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
reply other threads:[~2022-01-16 12:34 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=202201162006.UOLVb6S8-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.