All of lore.kernel.org
 help / color / mirror / Atom feed
* drivers/pinctrl/berlin/berlin.c:271:31: error: implicit declaration of function 'FIELD_GET'
@ 2026-10-03  5:05 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-10-03  5:05 UTC (permalink / raw)
  To: Jisheng Zhang; +Cc: oe-kbuild-all, 0day robot

tree:   https://github.com/intel-lab-lkp/linux/commits/Jisheng-Zhang/dt-bindings-serial-snps-dw-apb-uart-Add-Synaptics-sl261x-uart/20260929-141358
head:   66f26b6f0baa133e1c8c3a8afb0ef81b5001f027
commit: 36ba973f7fdc2baf760334dffccba25c685c8e89 pinctrl: berlin: add optional pinconf support
date:   4 days ago
config: xtensa-randconfig-r2105-20261003 (https://download.01.org/0day-ci/archive/20261003/202610030734.aALYYeQ9-lkp@intel.com/config)
compiler: xtensa-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261003/202610030734.aALYYeQ9-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/202610030734.aALYYeQ9-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/pinctrl/berlin/berlin.c: In function 'berlin_pinconf_group_get':
>> drivers/pinctrl/berlin/berlin.c:271:31: error: implicit declaration of function 'FIELD_GET' [-Wimplicit-function-declaration]
     271 |                         val = FIELD_GET(PINCFG_DS_10BIT, val);
         |                               ^~~~~~~~~


vim +/FIELD_GET +271 drivers/pinctrl/berlin/berlin.c

   217	
   218	static int berlin_pinconf_group_get(struct pinctrl_dev *pctrl_dev,
   219					    unsigned int group, unsigned long *configs)
   220	{
   221		enum pin_config_param param = pinconf_to_config_param(*configs);
   222		struct berlin_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctrl_dev);
   223		const struct berlin_desc_group *group_desc = pctrl->desc->groups + group;
   224		bool enabled;
   225		u32 val;
   226		int ret;
   227		u8 conf_bits = group_desc->conf_bits;
   228	
   229		if (!conf_bits)
   230			return -EOPNOTSUPP;
   231	
   232		ret = regmap_read(pctrl->regmap, group_desc->conf_offset, &val);
   233		if (ret)
   234			return ret;
   235	
   236		switch (param) {
   237		case PIN_CONFIG_BIAS_DISABLE:
   238			if (conf_bits == 10)
   239				enabled = !(val & PINCFG_PE_10BIT);
   240			else
   241				enabled = !(val & (PINCFG_PD_8BIT | PINCFG_PU_8BIT));
   242			val = 0;
   243			break;
   244		case PIN_CONFIG_BIAS_PULL_DOWN:
   245			if (conf_bits == 10)
   246				enabled = (val & (PINCFG_PE_10BIT | PINCFG_PS_10BIT)) == PINCFG_PE_10BIT;
   247			else
   248				enabled = val & PINCFG_PD_8BIT;
   249			val = enabled ? 1 : 0;
   250			break;
   251		case PIN_CONFIG_BIAS_PULL_UP:
   252			if (conf_bits == 10) {
   253				if ((val & (PINCFG_PE_10BIT | PINCFG_PS_10BIT)) == (PINCFG_PE_10BIT | PINCFG_PS_10BIT)) {
   254					enabled = true;
   255					if (val & PINCFG_SPU_10BIT)
   256						val = 2;
   257					else
   258						val = 1;
   259				} else {
   260					enabled = false;
   261					val = 0;
   262				}
   263			} else {
   264				enabled = val & PINCFG_PU_8BIT;
   265				val = enabled ? 1 : 0;
   266			}
   267			break;
   268		case PIN_CONFIG_DRIVE_STRENGTH:
   269			enabled = true;
   270			if (conf_bits == 10)
 > 271				val = FIELD_GET(PINCFG_DS_10BIT, val);
   272			else
   273				val = FIELD_GET(PINCFG_DS_8BIT, val);
   274			break;
   275		case PIN_CONFIG_INPUT_ENABLE:
   276			if (conf_bits == 10)
   277				enabled = val & PINCFG_IE_10BIT;
   278			else
   279				enabled = val & PINCFG_IE_8BIT;
   280			val = enabled ? 1 : 0;
   281			break;
   282		case PIN_CONFIG_INPUT_SCHMITT_ENABLE:
   283			if (conf_bits == 10)
   284				enabled = val & PINCFG_ST_10BIT;
   285			else
   286				enabled = val & PINCFG_ST_8BIT;
   287			val = enabled ? 1 : 0;
   288			break;
   289		case PIN_CONFIG_SLEW_RATE:
   290			if (conf_bits == 10)
   291				enabled = val & PINCFG_SL_10BIT;
   292			else
   293				enabled = val & PINCFG_SL_8BIT;
   294			val = enabled ? 1 : 0;
   295			break;
   296		default:
   297			return -EOPNOTSUPP;
   298		}
   299	
   300		*configs = pinconf_to_config_packed(param, val);
   301		return enabled ? 0 : -EINVAL;
   302	}
   303	

--
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:[~2026-10-03  5:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-03  5:05 drivers/pinctrl/berlin/berlin.c:271:31: error: implicit declaration of function 'FIELD_GET' 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.