* [freescale-fslc:6.1-2.1.x-imx 13658/16025] drivers/phy/freescale/phy-fsl-lynx-xgkr-algorithm.c:742:6: warning: variable 'prev_coe' set but not used
@ 2023-12-16 22:35 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-12-16 22:35 UTC (permalink / raw)
To: Otavio Salvador; +Cc: oe-kbuild-all
tree: https://github.com/Freescale/linux-fslc 6.1-2.1.x-imx
head: 241e2f51bd87beb652196d1db92f0387c1209bfb
commit: 9efb96bdd5e1624d75a56d045ee12e4b02d13206 [13658/16025] phy: lynx-28g: add algorithm for IEEE 802.3 C72 (10GBase-KR) link training
config: i386-buildonly-randconfig-004-20231217 (https://download.01.org/0day-ci/archive/20231217/202312170614.Edt7W2M4-lkp@intel.com/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231217/202312170614.Edt7W2M4-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/202312170614.Edt7W2M4-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/phy/freescale/phy-fsl-lynx-xgkr-algorithm.c:742:6: warning: variable 'prev_coe' set but not used [-Wunused-but-set-variable]
u32 prev_coe;
^
1 warning generated.
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for DEBUG_MAPLE_TREE
Depends on [n]: DEBUG_KERNEL [=n]
Selected by [y]:
- TEST_MAPLE_TREE [=y] && RUNTIME_TESTING_MENU [=y]
vim +/prev_coe +742 drivers/phy/freescale/phy-fsl-lynx-xgkr-algorithm.c
734
735 static enum coef_status
736 lynx_xgkr_inc_dec_one(struct lynx_xgkr_algorithm *algorithm,
737 enum coef_field field, enum coef_update request)
738 {
739 u32 ld_limit[COEF_FIELD_MAX], ld_coe[COEF_FIELD_MAX], step[COEF_FIELD_MAX];
740 struct lynx_xgkr_local_tx_status *lts = &algorithm->lts;
741 struct lynx_xgkr_tx_eq new_tx_eq = {};
> 742 u32 prev_coe;
743 bool passes;
744
745 ld_coe[COEF_FIELD_COP1] = lts->tuned_tx_eq.ratio_post1q;
746 ld_coe[COEF_FIELD_COZ] = lts->tuned_tx_eq.adapt_eq;
747 ld_coe[COEF_FIELD_COM1] = lts->tuned_tx_eq.ratio_preq;
748
749 step[COEF_FIELD_COP1] = -1;
750 step[COEF_FIELD_COZ] = +1;
751 step[COEF_FIELD_COM1] = -1;
752
753 prev_coe = ld_coe[field];
754
755 /* IEEE 802.3 72.6.10.2.5 Coefficient update process
756 * Upon execution of a received increment or decrement request,
757 * the status is reported as updated, maximum, or minimum.
758 */
759 switch (request) {
760 case COEF_UPD_INC:
761 ld_limit[COEF_FIELD_COP1] = POST_COE_MAX;
762 ld_limit[COEF_FIELD_COZ] = ZERO_COE_MAX;
763 ld_limit[COEF_FIELD_COM1] = PRE_COE_MAX;
764
765 if (ld_coe[field] == ld_limit[field])
766 return COEF_STAT_MAX;
767
768 ld_coe[field] += step[field];
769 break;
770 case COEF_UPD_DEC:
771 ld_limit[COEF_FIELD_COP1] = POST_COE_MIN;
772 ld_limit[COEF_FIELD_COZ] = ZERO_COE_MIN;
773 ld_limit[COEF_FIELD_COM1] = PRE_COE_MIN;
774
775 if (ld_coe[field] == ld_limit[field])
776 return COEF_STAT_MIN;
777
778 ld_coe[field] -= step[field];
779 break;
780 case COEF_UPD_HOLD:
781 return COEF_STAT_NOT_UPDATED;
782 default:
783 WARN_ON(1);
784 return COEF_STAT_NOT_UPDATED;
785 }
786
787 passes = lynx_check_tx_hw_restrictions(ld_coe[COEF_FIELD_COP1],
788 ld_coe[COEF_FIELD_COZ],
789 ld_coe[COEF_FIELD_COM1]);
790 if (!passes) {
791 if (request == COEF_UPD_DEC)
792 return COEF_STAT_MIN;
793
794 /* implicitly COEF_UPD_INC */
795 return COEF_STAT_MAX;
796 }
797
798 /* accept new tx_eq */
799 new_tx_eq.ratio_preq = ld_coe[COEF_FIELD_COM1];
800 new_tx_eq.ratio_post1q = ld_coe[COEF_FIELD_COP1];
801 new_tx_eq.adapt_eq = ld_coe[COEF_FIELD_COZ];
802 new_tx_eq.amp_reduction = algorithm->default_tx_eq.amp_reduction;
803 lynx_tune_tx_eq(algorithm, &new_tx_eq);
804
805 return COEF_STAT_UPDATED;
806 }
807
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-12-16 22:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-16 22:35 [freescale-fslc:6.1-2.1.x-imx 13658/16025] drivers/phy/freescale/phy-fsl-lynx-xgkr-algorithm.c:742:6: warning: variable 'prev_coe' set but not used 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.