All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "larry.lai" <larry.lai@yunjingtech.com>,
	lee@kernel.org, andriy.shevchenko@linux.intel.com,
	linus.walleij@linaro.org, pavel@ucw.cz, krzk@kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
	linux-leds@vger.kernel.org, GaryWang@aaeon.com.tw,
	musa.lin@yunjingtech.com, jack.chang@yunjingtech.com,
	noah.hung@yunjingtech.com,
	"larry.lai" <larry.lai@yunjingtech.com>
Subject: Re: [PATCH V8 2/3] pinctrl: Add support pin control for UP board CPLD/FPGA
Date: Fri, 29 Dec 2023 19:56:17 +0800	[thread overview]
Message-ID: <202312291907.7mgFSafz-lkp@intel.com> (raw)
In-Reply-To: <20231228151544.14408-3-larry.lai@yunjingtech.com>

Hi larry.lai,

kernel test robot noticed the following build errors:

[auto build test ERROR on 4fe89d07dcc2804c8b562f6c7896a45643d34b2f]

url:    https://github.com/intel-lab-lkp/linux/commits/larry-lai/mfd-Add-support-for-UP-board-CPLD-FPGA/20231228-231750
base:   4fe89d07dcc2804c8b562f6c7896a45643d34b2f
patch link:    https://lore.kernel.org/r/20231228151544.14408-3-larry.lai%40yunjingtech.com
patch subject: [PATCH V8 2/3] pinctrl: Add support pin control for UP board CPLD/FPGA
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20231229/202312291907.7mgFSafz-lkp@intel.com/config)
compiler: ClangBuiltLinux clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231229/202312291907.7mgFSafz-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/202312291907.7mgFSafz-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/pinctrl/pinctrl-upboard.c:709:13: warning: variable length array used [-Wvla]
     709 |         int offset[pctrl->pctldesc->npins];
         |                    ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/pinctrl/pinctrl-upboard.c:1089:12: error: incompatible integer to pointer conversion initializing 'const char *' with an expression of type 'int' [-Wint-conversion]
    1089 |                 .ident = BOARD_UP_APL01,
         |                          ^~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-upboard.c:46:27: note: expanded from macro 'BOARD_UP_APL01'
      46 | #define BOARD_UP_APL01                          1
         |                                                 ^
   drivers/pinctrl/pinctrl-upboard.c:1096:12: error: incompatible integer to pointer conversion initializing 'const char *' with an expression of type 'int' [-Wint-conversion]
    1096 |                 .ident = BOARD_UP_APL01,
         |                          ^~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-upboard.c:46:27: note: expanded from macro 'BOARD_UP_APL01'
      46 | #define BOARD_UP_APL01                          1
         |                                                 ^
   drivers/pinctrl/pinctrl-upboard.c:1103:12: error: incompatible integer to pointer conversion initializing 'const char *' with an expression of type 'int' [-Wint-conversion]
    1103 |                 .ident = BOARD_UP_APL03,
         |                          ^~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-upboard.c:53:27: note: expanded from macro 'BOARD_UP_APL03'
      53 | #define BOARD_UP_APL03                          9
         |                                                 ^
   drivers/pinctrl/pinctrl-upboard.c:1110:12: error: incompatible integer to pointer conversion initializing 'const char *' with an expression of type 'int' [-Wint-conversion]
    1110 |                 .ident = BOARD_UP_WHL01,
         |                          ^~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-upboard.c:50:27: note: expanded from macro 'BOARD_UP_WHL01'
      50 | #define BOARD_UP_WHL01                          5
         |                                                 ^
   drivers/pinctrl/pinctrl-upboard.c:1117:12: error: incompatible integer to pointer conversion initializing 'const char *' with an expression of type 'int' [-Wint-conversion]
    1117 |                 .ident = BOARD_UPX_TGL,
         |                          ^~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-upboard.c:55:26: note: expanded from macro 'BOARD_UPX_TGL'
      55 | #define BOARD_UPX_TGL                           11
         |                                                 ^~
   drivers/pinctrl/pinctrl-upboard.c:1124:12: error: incompatible integer to pointer conversion initializing 'const char *' with an expression of type 'int' [-Wint-conversion]
    1124 |                 .ident = BOARD_UPN_EHL01,
         |                          ^~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-upboard.c:57:28: note: expanded from macro 'BOARD_UPN_EHL01'
      57 | #define BOARD_UPN_EHL01                         13
         |                                                 ^~
   drivers/pinctrl/pinctrl-upboard.c:1131:12: error: incompatible integer to pointer conversion initializing 'const char *' with an expression of type 'int' [-Wint-conversion]
    1131 |                 .ident = BOARD_UPS_EHL01,
         |                          ^~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-upboard.c:58:28: note: expanded from macro 'BOARD_UPS_EHL01'
      58 | #define BOARD_UPS_EHL01                         BOARD_UPN_EHL01
         |                                                 ^~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-upboard.c:57:28: note: expanded from macro 'BOARD_UPN_EHL01'
      57 | #define BOARD_UPN_EHL01                         13
         |                                                 ^~
   drivers/pinctrl/pinctrl-upboard.c:1138:12: error: incompatible integer to pointer conversion initializing 'const char *' with an expression of type 'int' [-Wint-conversion]
    1138 |                 .ident = BOARD_UPX_ADLP01,
         |                          ^~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-upboard.c:59:28: note: expanded from macro 'BOARD_UPX_ADLP01'
      59 | #define BOARD_UPX_ADLP01                        15
         |                                                 ^~
   drivers/pinctrl/pinctrl-upboard.c:1145:12: error: incompatible integer to pointer conversion initializing 'const char *' with an expression of type 'int' [-Wint-conversion]
    1145 |                 .ident = BOARD_UPN_ADLN01,
         |                          ^~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-upboard.c:60:28: note: expanded from macro 'BOARD_UPN_ADLN01'
      60 | #define BOARD_UPN_ADLN01                        16
         |                                                 ^~
   drivers/pinctrl/pinctrl-upboard.c:1152:12: error: incompatible integer to pointer conversion initializing 'const char *' with an expression of type 'int' [-Wint-conversion]
    1152 |                 .ident = BOARD_UPS_ADLP01,
         |                          ^~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-upboard.c:61:28: note: expanded from macro 'BOARD_UPS_ADLP01'
      61 | #define BOARD_UPS_ADLP01                        BOARD_UPX_ADLP01
         |                                                 ^~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-upboard.c:59:28: note: expanded from macro 'BOARD_UPX_ADLP01'
      59 | #define BOARD_UPX_ADLP01                        15
         |                                                 ^~
   drivers/pinctrl/pinctrl-upboard.c:1159:12: error: incompatible integer to pointer conversion initializing 'const char *' with an expression of type 'int' [-Wint-conversion]
    1159 |                 .ident = BOARD_UP_ADLN01,
         |                          ^~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-upboard.c:62:28: note: expanded from macro 'BOARD_UP_ADLN01'
      62 | #define BOARD_UP_ADLN01                         18
         |                                                 ^~
>> drivers/pinctrl/pinctrl-upboard.c:1185:12: error: incompatible pointer to integer conversion assigning to 'int' from 'const char *const' [-Wint-conversion]
    1185 |                 board_id = system_id->ident;
         |                          ^ ~~~~~~~~~~~~~~~~
   1 warning and 12 errors generated.


vim +1089 drivers/pinctrl/pinctrl-upboard.c

  1085	
  1086	/* DMI Matches to assign pin mapping driver data */
  1087	static const struct dmi_system_id upboard_dmi_table[] __initconst = {
  1088		{
> 1089			.ident = BOARD_UP_APL01,
  1090			.matches = { /* UP SQUARED */
  1091				DMI_EXACT_MATCH(DMI_SYS_VENDOR, "AAEON"),
  1092				DMI_EXACT_MATCH(DMI_BOARD_NAME, "UP-APL01"),
  1093			},
  1094		},
  1095		{
  1096			.ident = BOARD_UP_APL01,
  1097			.matches = { /* UP SQUARED Pro*/
  1098				DMI_EXACT_MATCH(DMI_SYS_VENDOR, "AAEON"),
  1099				DMI_EXACT_MATCH(DMI_BOARD_NAME, "UPN-APL01"),
  1100			},
  1101		},
  1102		{
  1103			.ident = BOARD_UP_APL03,
  1104			.matches = { /* UP 4000 */
  1105				DMI_EXACT_MATCH(DMI_SYS_VENDOR, "AAEON"),
  1106				DMI_EXACT_MATCH(DMI_BOARD_NAME, "UP-APL03"),
  1107			},
  1108		},
  1109		{
  1110			.ident = BOARD_UP_WHL01,
  1111			.matches = { /* UPX WHL */
  1112				DMI_EXACT_MATCH(DMI_SYS_VENDOR, "AAEON"),
  1113				DMI_EXACT_MATCH(DMI_BOARD_NAME, "UP-WHL01"),
  1114			},
  1115		},
  1116		{
  1117			.ident = BOARD_UPX_TGL,
  1118			.matches = { /* UP i11 */
  1119				DMI_EXACT_MATCH(DMI_SYS_VENDOR, "AAEON"),
  1120				DMI_EXACT_MATCH(DMI_BOARD_NAME, "UPX-TGL01"),
  1121			},
  1122		},
  1123		{
  1124			.ident = BOARD_UPN_EHL01,
  1125			.matches = { /* UP 6000 */
  1126				DMI_EXACT_MATCH(DMI_SYS_VENDOR, "AAEON"),
  1127				DMI_EXACT_MATCH(DMI_BOARD_NAME, "UPN-EHL01"),
  1128			},
  1129		},
  1130		{
  1131			.ident = BOARD_UPS_EHL01,
  1132			.matches = { /* UP squared v2 */
  1133				DMI_EXACT_MATCH(DMI_SYS_VENDOR, "AAEON"),
  1134				DMI_EXACT_MATCH(DMI_BOARD_NAME, "UPS-EHL01"),
  1135			},
  1136		},
  1137		{
  1138			.ident = BOARD_UPX_ADLP01,
  1139			.matches = { /* UP Xtreme i12 */
  1140				DMI_EXACT_MATCH(DMI_SYS_VENDOR, "AAEON"),
  1141				DMI_EXACT_MATCH(DMI_BOARD_NAME, "UPX-ADLP01"),
  1142			},
  1143		},
  1144		{
  1145			.ident = BOARD_UPN_ADLN01,
  1146			.matches = { /* UP 7000 */
  1147				DMI_EXACT_MATCH(DMI_SYS_VENDOR, "AAEON"),
  1148				DMI_EXACT_MATCH(DMI_BOARD_NAME, "UPN-ADLN01"),
  1149			},
  1150		},
  1151		{
  1152			.ident = BOARD_UPS_ADLP01,
  1153			.matches = { /* UP Squared i12 */
  1154				DMI_EXACT_MATCH(DMI_SYS_VENDOR, "AAEON"),
  1155				DMI_EXACT_MATCH(DMI_BOARD_NAME, "UPS-ADLP01"),
  1156			},
  1157		},
  1158		{
  1159			.ident = BOARD_UP_ADLN01,
  1160			.matches = { /* UP 7000 */
  1161				DMI_EXACT_MATCH(DMI_SYS_VENDOR, "AAEON"),
  1162				DMI_EXACT_MATCH(DMI_BOARD_NAME, "UP-ADLN01"),
  1163			},
  1164		},
  1165		{ }	/* Terminating entry */
  1166	};
  1167	
  1168	static int upboard_pinctrl_probe(struct platform_device *pdev)
  1169	{
  1170		struct upboard_fpga * const fpga = dev_get_drvdata(pdev->dev.parent);
  1171		struct pinctrl_desc *pctldesc;
  1172		struct upboard_pinctrl *pctrl;
  1173		struct upboard_pin *pins;
  1174		const struct dmi_system_id *system_id;
  1175		const unsigned int *rpi_mapping;
  1176		unsigned int ngpio;
  1177		int ret;
  1178		int i;
  1179		/* default */
  1180		int board_id = BOARD_UP_APL03;
  1181	
  1182		/* check board id to arrange driver data */
  1183		system_id = dmi_first_match(upboard_dmi_table);
  1184		if (system_id)
> 1185			board_id = system_id->ident;
  1186		dev_info(&pdev->dev, "Compatible Up Board ID %d", board_id);
  1187		switch (board_id) {
  1188		case BOARD_UP_APL01:
  1189			pctldesc = &upboard_up2_pinctrl_desc;
  1190			rpi_mapping = upboard_up2_rpi_mapping;
  1191			ngpio = ARRAY_SIZE(upboard_up2_rpi_mapping);
  1192			break;
  1193		case BOARD_UP_UPCORE:
  1194			pctldesc = &upboard_upcore_crex_pinctrl_desc;
  1195			rpi_mapping = upboard_upcore_crex_rpi_mapping;
  1196			ngpio = ARRAY_SIZE(upboard_upcore_crex_rpi_mapping);
  1197			break;
  1198		case BOARD_UP_CORE_PLUS:
  1199			pctldesc = &upboard_upcore_crst02_pinctrl_desc;
  1200			rpi_mapping = upboard_upcore_crst02_rpi_mapping;
  1201			ngpio = ARRAY_SIZE(upboard_upcore_crst02_rpi_mapping);
  1202			break;
  1203		default:
  1204			pctldesc = &upboard_up_pinctrl_desc;
  1205			rpi_mapping = upboard_up_rpi_mapping;
  1206			ngpio = ARRAY_SIZE(upboard_up_rpi_mapping);
  1207			break;
  1208		}
  1209	
  1210		pctldesc->name = dev_name(&pdev->dev);
  1211	
  1212		pins = devm_kcalloc(&pdev->dev, pctldesc->npins, sizeof(*pins), GFP_KERNEL);
  1213		if (!pins)
  1214			return -ENOMEM;
  1215	
  1216		/* initialise pins */
  1217		for (i = 0; i < pctldesc->npins; i++) {
  1218			struct upboard_pin *pin = &pins[i];
  1219			struct pinctrl_pin_desc *pd = (struct pinctrl_pin_desc *) &pctldesc->pins[i];
  1220			struct reg_field fldconf = {0};
  1221			unsigned int regoff = (pd->number / UPFPGA_REGISTER_SIZE);
  1222			unsigned int lsb = pd->number % UPFPGA_REGISTER_SIZE;
  1223	
  1224			pin->funcbit = NULL;
  1225	
  1226			if (pd->drv_data) {
  1227				fldconf = *(struct reg_field *)pd->drv_data;
  1228	
  1229				pin->funcbit = devm_regmap_field_alloc(&pdev->dev,
  1230								       fpga->regmap,
  1231								       fldconf);
  1232				if (IS_ERR(pin->funcbit))
  1233					return PTR_ERR(pin->funcbit);
  1234			}
  1235	
  1236			fldconf.reg = UPFPGA_REG_GPIO_EN0 + regoff;
  1237			fldconf.lsb = lsb;
  1238			fldconf.msb = lsb;
  1239	
  1240			pin->enbit = devm_regmap_field_alloc(&pdev->dev,
  1241							     fpga->regmap,
  1242							     fldconf);
  1243			if (IS_ERR(pin->enbit))
  1244				return PTR_ERR(pin->enbit);
  1245	
  1246			fldconf.reg = UPFPGA_REG_GPIO_DIR0 + regoff;
  1247			fldconf.lsb = lsb;
  1248			fldconf.msb = lsb;
  1249	
  1250			pin->dirbit = devm_regmap_field_alloc(&pdev->dev,
  1251							      fpga->regmap,
  1252							      fldconf);
  1253			if (IS_ERR(pin->dirbit))
  1254				return PTR_ERR(pin->dirbit);
  1255	
  1256			pd->drv_data = pin;
  1257		}
  1258	
  1259		/* create a new pinctrl device and register it */
  1260		pctrl = devm_kzalloc(&pdev->dev, sizeof(*pctrl), GFP_KERNEL);
  1261		if (!pctrl)
  1262			return -ENOMEM;
  1263	
  1264		pctrl->rpi_mapping = rpi_mapping;
  1265		pctrl->chip = upboard_gpio_chip;
  1266		pctrl->pctldesc = pctldesc;
  1267		pctrl->chip.parent = &pdev->dev;
  1268		pctrl->chip.ngpio = ngpio;
  1269		pctrl->pins = pins;
  1270		pctrl->ident = board_id;
  1271	
  1272		ret = devm_gpiochip_add_data(&pdev->dev, &pctrl->chip, pctrl);
  1273		if (ret)
  1274			return ret;
  1275	
  1276		pctrl->pctldev = devm_pinctrl_register(&pdev->dev, pctldesc, pctrl);
  1277		if (IS_ERR(pctrl->pctldev))
  1278			return PTR_ERR(pctrl->pctldev);
  1279	
  1280		/* add acpi pin mapping according to external-gpios key */
  1281		ret = upboard_acpi_node_pin_mapping(fpga, pctrl,
  1282						    "external",
  1283						    dev_name(&pdev->dev),
  1284						    0);
  1285		if (ret)
  1286			return ret;
  1287	
  1288		upboard_alt_func_enable(&pctrl->chip, "I2C",    pctrl->ident);
  1289		upboard_alt_func_enable(&pctrl->chip, "SPI",    pctrl->ident);
  1290		upboard_alt_func_enable(&pctrl->chip, "UART",   pctrl->ident);
  1291		upboard_alt_func_enable(&pctrl->chip, "I2S",    pctrl->ident);
  1292		upboard_alt_func_enable(&pctrl->chip, "PWM",    pctrl->ident);
  1293		upboard_alt_func_enable(&pctrl->chip, "ADC",    pctrl->ident);
  1294		upboard_alt_func_enable(&pctrl->chip, "PINMUX", pctrl->ident);
  1295	
  1296		return ret;
  1297	}
  1298	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  parent reply	other threads:[~2023-12-29 11:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-28 15:15 [PATCH V8 0/3] Add support control UP board CPLD/FPGA pin control larry.lai
2023-12-28 15:15 ` [PATCH V8 1/3] mfd: Add support for UP board CPLD/FPGA larry.lai
2023-12-28 15:27   ` Krzysztof Kozlowski
2023-12-28 15:31   ` Krzysztof Kozlowski
2023-12-29  9:18     ` Jack Chang
2023-12-28 15:15 ` [PATCH V8 2/3] pinctrl: Add support pin control " larry.lai
2023-12-28 15:28   ` Krzysztof Kozlowski
2023-12-29  9:18     ` Jack Chang
2023-12-30 14:09       ` Krzysztof Kozlowski
2023-12-29  8:52   ` kernel test robot
2023-12-29  8:52   ` kernel test robot
2023-12-29 11:56   ` kernel test robot [this message]
2023-12-28 15:15 ` [PATCH V8 3/3] leds: Add support for UP board CPLD onboard LEDS larry.lai
2023-12-28 15:29   ` Krzysztof Kozlowski
2023-12-29  9:18     ` Jack Chang
2023-12-28 15:25 ` [PATCH V8 0/3] Add support control UP board CPLD/FPGA pin control Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202312291907.7mgFSafz-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=GaryWang@aaeon.com.tw \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=jack.chang@yunjingtech.com \
    --cc=krzk@kernel.org \
    --cc=larry.lai@yunjingtech.com \
    --cc=lee@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=musa.lin@yunjingtech.com \
    --cc=noah.hung@yunjingtech.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pavel@ucw.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.