[thermal:thermal/linux-next 2/26] drivers/thermal/armada_thermal.c:137:2: error: call to undeclared function 'FIELD_MODIFY'; ISO C99 and later do not support implicit function declarations
kernel test robot <[email protected]>
| Newsgroups | dev.linux.lists.oe-kbuild-all |
|---|---|
| Message-ID | <[email protected]> |
tree: https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git thermal/linux-next head: 55c16e15ff9f91bc994a20124b83faf27f0e3690 commit: cbe31d5ce49873a2a5a3ca5decb4935672396e77 [2/26] thermal/drivers/armada: Use bitfield and bitmask macros config: hexagon-randconfig-r071-20260808 (https://download.01.org/0day-ci/archive/20260808/[email protected]/config) compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 12df34b8469b8095359de8c249cb1b2753fadeea) smatch: v0.5.0-9187-g5189e3fb reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260808/[email protected]/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 <[email protected]> | Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ All errors (new ones prefixed by >>): >> drivers/thermal/armada_thermal.c:137:2: error: call to undeclared function 'FIELD_MODIFY'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 137 | FIELD_MODIFY(PMU_TDC0_OTF_CAL_MASK, ®, 1); | ^ drivers/thermal/armada_thermal.c:162:2: error: call to undeclared function 'FIELD_MODIFY'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 162 | FIELD_MODIFY(PMU_TDC0_OTF_CAL_MASK, ®, 1); | ^ drivers/thermal/armada_thermal.c:182:2: error: call to undeclared function 'FIELD_MODIFY'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 182 | FIELD_MODIFY(A375_UNIT_CONTROL_MASK, ®, 0); | ^ drivers/thermal/armada_thermal.c:214:2: error: call to undeclared function 'FIELD_MODIFY'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 214 | FIELD_MODIFY(CONTROL1_EXT_TSEN_HW_RESETn, ®, 1); | ^ drivers/thermal/armada_thermal.c:231:2: error: call to undeclared function 'FIELD_MODIFY'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 231 | FIELD_MODIFY(CONTROL0_TSEN_RESET, ®, 0); | ^ >> drivers/thermal/armada_thermal.c:236:45: error: call to undeclared function 'FIELD_MAX'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 236 | FIELD_MODIFY(CONTROL0_TSEN_OSR_MASK, ®, CONTROL0_TSEN_OSR_MAX); | ^ drivers/thermal/armada_thermal.c:43:32: note: expanded from macro 'CONTROL0_TSEN_OSR_MAX' 43 | #define CONTROL0_TSEN_OSR_MAX FIELD_MAX(CONTROL0_TSEN_OSR_MASK) | ^ drivers/thermal/armada_thermal.c:254:2: error: call to undeclared function 'FIELD_MODIFY'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 254 | FIELD_MODIFY(CONTROL0_TSEN_OSR_MASK, ®, CONTROL0_TSEN_OSR_MAX); | ^ drivers/thermal/armada_thermal.c:254:45: error: call to undeclared function 'FIELD_MAX'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 254 | FIELD_MODIFY(CONTROL0_TSEN_OSR_MASK, ®, CONTROL0_TSEN_OSR_MAX); | ^ drivers/thermal/armada_thermal.c:43:32: note: expanded from macro 'CONTROL0_TSEN_OSR_MAX' 43 | #define CONTROL0_TSEN_OSR_MAX FIELD_MAX(CONTROL0_TSEN_OSR_MASK) | ^ drivers/thermal/armada_thermal.c:306:2: error: call to undeclared function 'FIELD_MODIFY'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 306 | FIELD_MODIFY(CONTROL1_TSEN_INT_EN, ®, 0); | ^ drivers/thermal/armada_thermal.c:324:2: error: call to undeclared function 'FIELD_MODIFY'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 324 | FIELD_MODIFY(CONTROL0_TSEN_START, &ctrl0, 0); | ^ 10 errors generated. vim +/FIELD_MODIFY +137 drivers/thermal/armada_thermal.c 129 130 static void armadaxp_init(struct platform_device *pdev, 131 struct armada_thermal_priv *priv) 132 { 133 struct armada_thermal_data *data = priv->data; 134 u32 reg; 135 136 regmap_read(priv->syscon, data->syscon_control1_off, ®); > 137 FIELD_MODIFY(PMU_TDC0_OTF_CAL_MASK, ®, 1); 138 139 /* Reference calibration value */ 140 FIELD_MODIFY(PMU_TDC0_REF_CAL_CNT_MASK, ®, 0xf1); 141 142 /* Reset the sensor */ 143 FIELD_MODIFY(PMU_TDC0_SW_RST_MASK, ®, 1); 144 regmap_write(priv->syscon, data->syscon_control1_off, reg); 145 146 FIELD_MODIFY(PMU_TDC0_SW_RST_MASK, ®, 0); 147 regmap_write(priv->syscon, data->syscon_control1_off, reg); 148 149 /* Enable the sensor */ 150 regmap_read(priv->syscon, data->syscon_status_off, ®); 151 FIELD_MODIFY(PMU_TM_DISABLE_MASK, ®, 0); 152 regmap_write(priv->syscon, data->syscon_status_off, reg); 153 } 154 155 static void armada370_init(struct platform_device *pdev, 156 struct armada_thermal_priv *priv) 157 { 158 struct armada_thermal_data *data = priv->data; 159 u32 reg; 160 161 regmap_read(priv->syscon, data->syscon_control1_off, ®); 162 FIELD_MODIFY(PMU_TDC0_OTF_CAL_MASK, ®, 1); 163 164 /* Reference calibration value */ 165 FIELD_MODIFY(PMU_TDC0_REF_CAL_CNT_MASK, ®, 0xf1); 166 167 /* Reset the sensor */ 168 FIELD_MODIFY(PMU_TDC0_START_CAL_MASK, ®, 0); 169 170 regmap_write(priv->syscon, data->syscon_control1_off, reg); 171 172 msleep(10); 173 } 174 175 static void armada375_init(struct platform_device *pdev, 176 struct armada_thermal_priv *priv) 177 { 178 struct armada_thermal_data *data = priv->data; 179 u32 reg; 180 181 regmap_read(priv->syscon, data->syscon_control1_off, ®); 182 FIELD_MODIFY(A375_UNIT_CONTROL_MASK, ®, 0); 183 FIELD_MODIFY(A375_READOUT_INVERT, ®, 0); 184 FIELD_MODIFY(A375_HW_RESETn, ®, 0); 185 regmap_write(priv->syscon, data->syscon_control1_off, reg); 186 187 msleep(20); 188 189 FIELD_MODIFY(A375_HW_RESETn, ®, 1); 190 regmap_write(priv->syscon, data->syscon_control1_off, reg); 191 192 msleep(50); 193 } 194 195 static int armada_wait_sensor_validity(struct armada_thermal_priv *priv) 196 { 197 u32 reg; 198 199 return regmap_read_poll_timeout(priv->syscon, 200 priv->data->syscon_status_off, reg, 201 reg & priv->data->is_valid_bit, 202 STATUS_POLL_PERIOD_US, 203 STATUS_POLL_TIMEOUT_US); 204 } 205 206 static void armada380_init(struct platform_device *pdev, 207 struct armada_thermal_priv *priv) 208 { 209 struct armada_thermal_data *data = priv->data; 210 u32 reg; 211 212 /* Disable the HW/SW reset */ 213 regmap_read(priv->syscon, data->syscon_control1_off, ®); 214 FIELD_MODIFY(CONTROL1_EXT_TSEN_HW_RESETn, ®, 1); 215 FIELD_MODIFY(CONTROL1_EXT_TSEN_SW_RESET, ®, 0); 216 regmap_write(priv->syscon, data->syscon_control1_off, reg); 217 218 /* Set Tsen Tc Trim to correct default value (errata #132698) */ 219 regmap_read(priv->syscon, data->syscon_control0_off, ®); 220 FIELD_MODIFY(CONTROL0_TSEN_TC_TRIM_MASK, ®, CONTROL0_TSEN_TC_TRIM_VAL); 221 regmap_write(priv->syscon, data->syscon_control0_off, reg); 222 } 223 224 static void armada_ap80x_init(struct platform_device *pdev, 225 struct armada_thermal_priv *priv) 226 { 227 struct armada_thermal_data *data = priv->data; 228 u32 reg; 229 230 regmap_read(priv->syscon, data->syscon_control0_off, ®); 231 FIELD_MODIFY(CONTROL0_TSEN_RESET, ®, 0); 232 FIELD_MODIFY(CONTROL0_TSEN_START, ®, 1); 233 FIELD_MODIFY(CONTROL0_TSEN_ENABLE, ®, 1); 234 235 /* Sample every ~2ms */ > 236 FIELD_MODIFY(CONTROL0_TSEN_OSR_MASK, ®, CONTROL0_TSEN_OSR_MAX); 237 238 /* Enable average (2 samples by default) */ 239 FIELD_MODIFY(CONTROL0_TSEN_AVG_BYPASS, ®, 0); 240 241 regmap_write(priv->syscon, data->syscon_control0_off, reg); 242 } 243 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki