linux/drivers/phy
Dilip Kota 76e242c284 phy: intel: Fix compilation error on FIELD_PREP usage
FIELD_PREP expects constant arguments. Istead of doing FIELD_PREP
operation on the arguments of combo_phy_w32_off_mask(), pass the
final FIELD_PREP value as an argument.

Error reported as:
In file included from include/linux/build_bug.h:5,
from include/linux/bitfield.h:10,
from drivers/phy/intel/phy-intel-combo.c:8:
drivers/phy/intel/phy-intel-combo.c: In function 'combo_phy_w32_off_mask':
include/linux/bitfield.h:52:28: warning: comparison is always false due to limited range of data type [-Wtype-limits]

include/linux/compiler.h:350:38: error: call to '__compiletime_assert_37' declared with attribute error: FIELD_PREP: mask is not constant
94 |   __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: ");          |   ^~~~~~~~~~~~~~~~
drivers/phy/intel/phy-intel-combo.c:137:13: note: in expansion of macro 'FIELD_PREP'
137 |  reg_val |= FIELD_PREP(mask, val);
|             ^~~~~~~~~~

../include/linux/compiler.h:392:38: error: call to__compiletime_assert_137
 declared with attribute error:
BUILD_BUG_ON failed: (((mask) + (1ULL << (__builtin_ffsll(mask) - 1))) & (((mask) + (1ULL << (__builtin_ffsll(mask) - 1))) - 1)) != 0
  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)

../include/linux/bitfield.h:94:3: note: in expansion of macro __BF_FIELD_CHECK
   __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \
   ^~~~~~~~~~~~~~~~
../drivers/phy/intel/phy-intel-combo.c:137:13: note: in expansion of macro FIELD_PREP
  reg_val |= FIELD_PREP(mask, val);
             ^~~~~~~~~~

Fixes: ac0a95a3ea ("phy: intel: Add driver support for ComboPhy")
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Dilip Kota <eswara.kota@linux.intel.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
Link: https://lore.kernel.org/r/8a309dd3c238efbaa59d1649704255d6f8b6c9c5.1590575358.git.eswara.kota@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2020-06-24 17:40:31 +05:30
..
allwinner phy: allwinner: Fix GENMASK misuse 2020-03-04 10:56:26 +01:00
amlogic USB: changes for v5.8 merge window 2020-05-25 13:28:20 +02:00
broadcom drivers: phy: sr-usb: do not use internal fsm for USB2 phy init 2020-05-18 19:30:56 +05:30
cadence phy: cadence: sierra: Fix for USB3 U1/U2 state 2020-05-18 19:30:56 +05:30
freescale
hisilicon phy: hisilicon: Fix Kconfig indentation 2019-12-20 17:00:45 +05:30
intel phy: intel: Fix compilation error on FIELD_PREP usage 2020-06-24 17:40:31 +05:30
lantiq phy: lantiq: vrx200-pcie: Remove unneeded semicolon 2020-01-08 12:58:06 +05:30
marvell USB/Thunderbolt/PHY driver updates for 5.6-rc1 2020-01-29 10:09:44 -08:00
mediatek phy: phy-mtk-tphy: add a new reference clock 2020-03-20 19:34:29 +05:30
motorola phy: cpcap-usb: Remove some useless code 2020-05-13 08:27:35 +05:30
mscc
qualcomm phy: for 5.8 2020-05-22 09:28:16 +02:00
ralink
renesas phy: renesas: phy-rcar-gen2: Fix the array off by one warning 2019-10-31 16:54:01 +05:30
rockchip phy: rk-inno-usb2: Decrease verbosity of repeating log. 2020-03-20 19:34:29 +05:30
samsung phy: samsung: s5pv210-usb2: Add delay after reset 2020-05-13 08:27:35 +05:30
socionext phy: uniphier-pcie: Add SoC-dependent phy-mode function support 2020-03-20 19:34:29 +05:30
st
tegra phy: tegra: Select USB_COMMON for usb_get_maximum_speed() 2020-04-24 13:12:14 +05:30
ti phy: ti: am654: add support for USB super-speed 2020-05-18 19:30:56 +05:30
Kconfig phy: intel-lgm-emmc: Add support for eMMC PHY 2020-01-14 10:50:19 +05:30
Makefile phy: intel-lgm-emmc: Add support for eMMC PHY 2020-01-14 10:50:19 +05:30
phy-core-mipi-dphy.c
phy-core.c phy: core: Fix phy_get() to not return error on link creation failure 2020-02-19 16:02:02 +05:30
phy-lpc18xx-usb-otg.c
phy-pistachio-usb.c
phy-xgene.c phy: xgene: make array serdes_reg static const, makes object smaller 2019-10-23 13:20:26 +05:30