* [intel-lts:5.4/yocto 17077/20394] drivers/ptp/ptp-intel-pmc-tgpio.c:484:44: warning: missing braces around initializer
@ 2022-01-22 20:15 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-01-22 20:15 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 4593 bytes --]
Hi Lakshmi,
FYI, the error/warning still remains.
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: 36f93ff941f127f4137ab369aecbdd995fb58c66
commit: 2948bbdc34f98909857c23acd79584143ea9e0b3 [17077/20394] ptp: S/W workaround for PMC TGPIO h/w bug
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20220123/202201230247.DwSekzkf-lkp(a)intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/intel/linux-intel-lts/commit/2948bbdc34f98909857c23acd79584143ea9e0b3
git remote add intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-lts 5.4/yocto
git checkout 2948bbdc34f98909857c23acd79584143ea9e0b3
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash 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: In function 'intel_pmc_tgpio_counttstamp':
>> drivers/ptp/ptp-intel-pmc-tgpio.c:484:44: warning: missing braces around initializer [-Wmissing-braces]
484 | static struct timespec64 dt_ts_prev[2] = {0, 0};
| ^
| { }
At top level:
drivers/ptp/ptp-intel-pmc-tgpio.c:754:36: warning: 'intel_pmc_acpi_match' defined but not used [-Wunused-const-variable=]
754 | static const struct acpi_device_id intel_pmc_acpi_match[] = {
| ^~~~~~~~~~~~~~~~~~~~
vim +484 drivers/ptp/ptp-intel-pmc-tgpio.c
473
474 static int intel_pmc_tgpio_counttstamp
475 (struct ptp_clock_info *info, struct ptp_event_count_tstamp *count)
476 {
477 struct intel_pmc_tgpio_t *tgpio = to_intel_pmc_tgpio(info);
478 u32 dt_hi_s;
479 u32 dt_hi_e;
480 u32 dt_lo;
481 struct timespec64 dt_ts;
482 struct timespec64 tsc_now;
483 static u32 dt_lo_prev[2] = {0, 0};
> 484 static struct timespec64 dt_ts_prev[2] = {0, 0};
485 static unsigned long long prev_count[2] = {0, 0};
486
487 mutex_lock(&intel_pmc_tgpio->lock);
488 while (intel_pmc_tgpio->pin[count->index].busy) {
489 mutex_unlock(&intel_pmc_tgpio->lock);
490 wait_for_completion
491 (&intel_pmc_tgpio->pin[count->index].transact_comp);
492 mutex_lock(&intel_pmc_tgpio->lock);
493 }
494 intel_pmc_tgpio->pin[count->index].busy = true;
495 mutex_unlock(&intel_pmc_tgpio->lock);
496
497 tsc_now = get_tsc_ns_now(NULL);
498 dt_hi_s = convert_tsc_ns_to_art(&tsc_now) >> 32;
499
500 /* Reading lower 32-bit word of Time Capture Value (TCV) loads */
501 /* the event time and event count capture */
502 dt_lo = INTEL_PMC_TGPIO_RD_REG(TGPIOTCV31_0, count->index);
503 count->event_count =
504 INTEL_PMC_TGPIO_RD_REG(TGPIOECCV63_32, count->index);
505 count->event_count <<= 32;
506 count->event_count |=
507 INTEL_PMC_TGPIO_RD_REG(TGPIOECCV31_0, count->index);
508 dt_hi_e = INTEL_PMC_TGPIO_RD_REG(TGPIOTCV63_32, count->index);
509
510 if (dt_hi_e != dt_hi_s && dt_lo >> 31)
511 dt_ts = convert_art_to_tsc_ns(((u64)dt_hi_s << 32) | dt_lo);
512 else
513 dt_ts = convert_art_to_tsc_ns(((u64)dt_hi_e << 32) | dt_lo);
514
515 /* Return previous device time if the event_count
516 * isn't incremented with TCV value
517 */
518 if (count->event_count == prev_count[count->index] ||
519 dt_lo_prev[count->index] == dt_lo) {
520 count->event_count = prev_count[count->index];
521 dt_lo = dt_lo_prev[count->index];
522 dt_ts = dt_ts_prev[count->index];
523 }
524
525 count->device_time = ts64_to_ptp_clock_time(dt_ts);
526 prev_count[count->index] = count->event_count;
527 dt_lo_prev[count->index] = dt_lo;
528 dt_ts_prev[count->index] = dt_ts;
529
530 mutex_lock(&intel_pmc_tgpio->lock);
531 intel_pmc_tgpio->pin[count->index].busy = false;
532 complete(&intel_pmc_tgpio->pin[count->index].transact_comp);
533 mutex_unlock(&intel_pmc_tgpio->lock);
534
535 return 0;
536 }
537
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-01-22 20:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-22 20:15 [intel-lts:5.4/yocto 17077/20394] drivers/ptp/ptp-intel-pmc-tgpio.c:484:44: warning: missing braces around initializer kernel test robot
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.