* [intel-linux-intel-lts:5.4/yocto 1/2] arch/x86/kernel/tsc.c:1267 convert_tsc_to_art() error: uninitialized symbol 'rem'.
@ 2021-06-29 8:35 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-06-27 14:09 UTC (permalink / raw
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 3448 bytes --]
CC: kbuild-all(a)lists.01.org
TO: "D, Lakshmi Sowjanya" <lakshmi.sowjanya.d@intel.com>
CC: "Qin, Chao" <chao.qin@intel.com>
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: 53cbd8c20c3f8e8afcc3482e6dd4c9400fc77dcd
commit: 056abbf6314ea7d95396062560c605f172e7535e [1/2] ptp: PSE TGPIO IOCTLs fix
:::::: branch date: 5 days ago
:::::: commit date: 5 days ago
config: x86_64-randconfig-m001-20210627 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
arch/x86/kernel/tsc.c:1267 convert_tsc_to_art() error: uninitialized symbol 'rem'.
vim +/rem +1267 arch/x86/kernel/tsc.c
8fbbc4b45ce3e4 Alok Kataria 2008-07-01 1244
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1245 /**
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1246 * convert_tsc_to_art() - Returns ART value associated with system counter
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1247 *
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1248 * Converts input TSC to the corresponding ART value using conversion
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1249 * factors discovered by detect_art()
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1250 *
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1251 * Return:
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1252 * u64 ART value
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1253 */
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1254 int convert_tsc_to_art(const struct system_counterval_t *system_counter,
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1255 u64 *art)
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1256 {
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1257 u64 tmp, res, rem;
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1258
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1259 if (system_counter->cs != art_related_clocksource)
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1260 return -EINVAL;
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1261
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1262 res = system_counter->cycles - art_to_tsc_offset;
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1263 if (art_to_tsc_numerator)
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1264 rem = do_div(res, art_to_tsc_numerator);
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1265
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1266 *art = res * art_to_tsc_denominator;
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 @1267 tmp = rem * art_to_tsc_denominator;
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1268
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1269 if (art_to_tsc_numerator)
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1270 do_div(tmp, art_to_tsc_numerator);
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1271 *art += tmp;
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1272
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1273 return 0;
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1274 }
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1275 EXPORT_SYMBOL(convert_tsc_to_art);
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1276
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 33521 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* [kbuild] [intel-linux-intel-lts:5.4/yocto 1/2] arch/x86/kernel/tsc.c:1267 convert_tsc_to_art() error: uninitialized symbol 'rem'.
@ 2021-06-29 8:35 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2021-06-29 8:35 UTC (permalink / raw
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2615 bytes --]
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: 53cbd8c20c3f8e8afcc3482e6dd4c9400fc77dcd
commit: 056abbf6314ea7d95396062560c605f172e7535e [1/2] ptp: PSE TGPIO IOCTLs fix
config: x86_64-randconfig-m001-20210627 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
arch/x86/kernel/tsc.c:1267 convert_tsc_to_art() error: uninitialized symbol 'rem'.
vim +/rem +1267 arch/x86/kernel/tsc.c
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1254 int convert_tsc_to_art(const struct system_counterval_t *system_counter,
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1255 u64 *art)
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1256 {
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1257 u64 tmp, res, rem;
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1258
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1259 if (system_counter->cs != art_related_clocksource)
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1260 return -EINVAL;
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1261
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1262 res = system_counter->cycles - art_to_tsc_offset;
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1263 if (art_to_tsc_numerator)
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1264 rem = do_div(res, art_to_tsc_numerator);
"rem" not initialized on else path.
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1265
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1266 *art = res * art_to_tsc_denominator;
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 @1267 tmp = rem * art_to_tsc_denominator;
^^^
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1268
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1269 if (art_to_tsc_numerator)
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1270 do_div(tmp, art_to_tsc_numerator);
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1271 *art += tmp;
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1272
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1273 return 0;
056abbf6314ea7 D, Lakshmi Sowjanya 2021-06-21 1274 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
_______________________________________________
kbuild mailing list -- kbuild(a)lists.01.org
To unsubscribe send an email to kbuild-leave(a)lists.01.org
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-29 8:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-27 14:09 [intel-linux-intel-lts:5.4/yocto 1/2] arch/x86/kernel/tsc.c:1267 convert_tsc_to_art() error: uninitialized symbol 'rem' kernel test robot
2021-06-29 8:35 ` [kbuild] " Dan Carpenter
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.