linux Mockup implementation expects incompatible pointer type The actual implementation of `max8660_pdata_from_dt' expects an argument `pdata' of type `struct max8660_platform_data *' while the mockup implementation for OF disabled expects a 2-degree pointer.

Bug fixed by commit d6c7e113959
Type IncompatibleType
Config "REGULATOR_MAX8660 && !OF" (2nd degree)
Fix-in code
Location drivers/
#ifdef CONFIG_REGULATOR_MAX8660
#ifdef CONFIG_OF
int max8660_pdata_from_dt(int *pdata)
{
	*pdata++;
	return 0;
}
#else
int max8660_pdata_from_dt(int **pdata)
{
	return 0;
}
#endif

int max8660_probe()
{
	int pdata_of = 0;
  max8660_pdata_from_dt(&pdata_of); // ERROR
  return 0;
}
#endif

int main() {
  #ifdef CONFIG_REGULATOR_MAX8660
  max8660_probe();
  #endif
  return 0;
}

int main() {
  #ifdef CONFIG_REGULATOR_MAX8660
//  max8660_probe();
  int pdata_of = 0;

  #ifdef CONFIG_OF
  *pdata++;
  #else
  #endif
  
  #endif
  return 0;
}
. drivers/regulator/max8660.c:393: ret = max8660_pdata_from_dt(dev, of_node, &pdata_of);