drivers/video/fbdev/fsl-diu-fb.c:1287:3: note: in expansion of macro 'dev_warn'
From: kbuild test robot
Date: Tue Sep 10 2019 - 04:11:02 EST
tree: https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 56037cadf60461b4a2996b4d8f0057c4d343c17c
commit: a035d552a93bb9ef6048733bb9f2a0dc857ff869 Makefile: Globally enable fall-through warning
date: 7 weeks ago
config: powerpc-mpc512x_defconfig (attached as .config)
compiler: powerpc-linux-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout a035d552a93bb9ef6048733bb9f2a0dc857ff869
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>
All warnings (new ones prefixed by >>):
In file included from include/linux/acpi.h:15:0,
from include/linux/i2c.h:13,
from include/uapi/linux/fb.h:6,
from include/linux/fb.h:6,
from drivers/video/fbdev/fsl-diu-fb.c:20:
drivers/video/fbdev/fsl-diu-fb.c: In function 'fsl_diu_ioctl':
include/linux/device.h:1495:2: warning: this statement may fall through [-Wimplicit-fallthrough=]
_dev_warn(dev, dev_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/video/fbdev/fsl-diu-fb.c:1287:3: note: in expansion of macro 'dev_warn'
dev_warn(info->dev,
^~~~~~~~
drivers/video/fbdev/fsl-diu-fb.c:1290:2: note: here
case MFB_SET_PIXFMT:
^~~~
In file included from include/linux/acpi.h:15:0,
from include/linux/i2c.h:13,
from include/uapi/linux/fb.h:6,
from include/linux/fb.h:6,
from drivers/video/fbdev/fsl-diu-fb.c:20:
include/linux/device.h:1495:2: warning: this statement may fall through [-Wimplicit-fallthrough=]
_dev_warn(dev, dev_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/video/fbdev/fsl-diu-fb.c:1296:3: note: in expansion of macro 'dev_warn'
dev_warn(info->dev,
^~~~~~~~
drivers/video/fbdev/fsl-diu-fb.c:1299:2: note: here
case MFB_GET_PIXFMT:
^~~~
vim +/dev_warn +1287 drivers/video/fbdev/fsl-diu-fb.c
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1265
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1266 static int fsl_diu_ioctl(struct fb_info *info, unsigned int cmd,
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1267 unsigned long arg)
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1268 {
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1269 struct mfb_info *mfbi = info->par;
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1270 struct diu_ad *ad = mfbi->ad;
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1271 struct mfb_chroma_key ck;
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1272 unsigned char global_alpha;
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1273 struct aoi_display_offset aoi_d;
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1274 __u32 pix_fmt;
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1275 void __user *buf = (void __user *)arg;
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1276
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1277 if (!arg)
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1278 return -EINVAL;
5cc2a36fe8aad0 drivers/video/fsl-diu-fb.c Timur Tabi 2012-10-16 1279
5cc2a36fe8aad0 drivers/video/fsl-diu-fb.c Timur Tabi 2012-10-16 1280 dev_dbg(info->dev, "ioctl %08x (dir=%s%s type=%u nr=%u size=%u)\n", cmd,
5cc2a36fe8aad0 drivers/video/fsl-diu-fb.c Timur Tabi 2012-10-16 1281 _IOC_DIR(cmd) & _IOC_READ ? "R" : "",
5cc2a36fe8aad0 drivers/video/fsl-diu-fb.c Timur Tabi 2012-10-16 1282 _IOC_DIR(cmd) & _IOC_WRITE ? "W" : "",
5cc2a36fe8aad0 drivers/video/fsl-diu-fb.c Timur Tabi 2012-10-16 1283 _IOC_TYPE(cmd), _IOC_NR(cmd), _IOC_SIZE(cmd));
5cc2a36fe8aad0 drivers/video/fsl-diu-fb.c Timur Tabi 2012-10-16 1284
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1285 switch (cmd) {
36b0b1d41541fc drivers/video/fsl-diu-fb.c Timur Tabi 2011-10-04 1286 case MFB_SET_PIXFMT_OLD:
36b0b1d41541fc drivers/video/fsl-diu-fb.c Timur Tabi 2011-10-04 @1287 dev_warn(info->dev,
36b0b1d41541fc drivers/video/fsl-diu-fb.c Timur Tabi 2011-10-04 1288 "MFB_SET_PIXFMT value of 0x%08x is deprecated.\n",
36b0b1d41541fc drivers/video/fsl-diu-fb.c Timur Tabi 2011-10-04 1289 MFB_SET_PIXFMT_OLD);
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1290 case MFB_SET_PIXFMT:
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1291 if (copy_from_user(&pix_fmt, buf, sizeof(pix_fmt)))
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1292 return -EFAULT;
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1293 ad->pix_fmt = pix_fmt;
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1294 break;
36b0b1d41541fc drivers/video/fsl-diu-fb.c Timur Tabi 2011-10-04 1295 case MFB_GET_PIXFMT_OLD:
36b0b1d41541fc drivers/video/fsl-diu-fb.c Timur Tabi 2011-10-04 1296 dev_warn(info->dev,
36b0b1d41541fc drivers/video/fsl-diu-fb.c Timur Tabi 2011-10-04 1297 "MFB_GET_PIXFMT value of 0x%08x is deprecated.\n",
36b0b1d41541fc drivers/video/fsl-diu-fb.c Timur Tabi 2011-10-04 1298 MFB_GET_PIXFMT_OLD);
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1299 case MFB_GET_PIXFMT:
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1300 pix_fmt = ad->pix_fmt;
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1301 if (copy_to_user(buf, &pix_fmt, sizeof(pix_fmt)))
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1302 return -EFAULT;
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1303 break;
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1304 case MFB_SET_AOID:
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1305 if (copy_from_user(&aoi_d, buf, sizeof(aoi_d)))
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1306 return -EFAULT;
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1307 mfbi->x_aoi_d = aoi_d.x_aoi_d;
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1308 mfbi->y_aoi_d = aoi_d.y_aoi_d;
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1309 fsl_diu_check_var(&info->var, info);
ae5591e3f47544 drivers/video/fsl-diu-fb.c York Sun 2008-08-15 1310 fsl_diu_set_aoi(info);
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1311 break;
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1312 case MFB_GET_AOID:
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1313 aoi_d.x_aoi_d = mfbi->x_aoi_d;
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1314 aoi_d.y_aoi_d = mfbi->y_aoi_d;
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1315 if (copy_to_user(buf, &aoi_d, sizeof(aoi_d)))
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1316 return -EFAULT;
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1317 break;
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1318 case MFB_GET_ALPHA:
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1319 global_alpha = mfbi->g_alpha;
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1320 if (copy_to_user(buf, &global_alpha, sizeof(global_alpha)))
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1321 return -EFAULT;
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1322 break;
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1323 case MFB_SET_ALPHA:
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1324 /* set panel information */
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1325 if (copy_from_user(&global_alpha, buf, sizeof(global_alpha)))
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1326 return -EFAULT;
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1327 ad->src_size_g_alpha = (ad->src_size_g_alpha & (~0xff)) |
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1328 (global_alpha & 0xff);
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1329 mfbi->g_alpha = global_alpha;
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1330 break;
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1331 case MFB_SET_CHROMA_KEY:
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1332 /* set panel winformation */
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1333 if (copy_from_user(&ck, buf, sizeof(ck)))
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1334 return -EFAULT;
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1335
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1336 if (ck.enable &&
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1337 (ck.red_max < ck.red_min ||
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1338 ck.green_max < ck.green_min ||
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1339 ck.blue_max < ck.blue_min))
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1340 return -EINVAL;
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1341
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1342 if (!ck.enable) {
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1343 ad->ckmax_r = 0;
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1344 ad->ckmax_g = 0;
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1345 ad->ckmax_b = 0;
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1346 ad->ckmin_r = 255;
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1347 ad->ckmin_g = 255;
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1348 ad->ckmin_b = 255;
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1349 } else {
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1350 ad->ckmax_r = ck.red_max;
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1351 ad->ckmax_g = ck.green_max;
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1352 ad->ckmax_b = ck.blue_max;
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1353 ad->ckmin_r = ck.red_min;
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1354 ad->ckmin_g = ck.green_min;
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1355 ad->ckmin_b = ck.blue_min;
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1356 }
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1357 break;
e95c17e9caff4b drivers/video/fsl-diu-fb.c Timur Tabi 2012-10-16 1358 #ifdef CONFIG_PPC_MPC512x
e95c17e9caff4b drivers/video/fsl-diu-fb.c Timur Tabi 2012-10-16 1359 case MFB_SET_GAMMA: {
e95c17e9caff4b drivers/video/fsl-diu-fb.c Timur Tabi 2012-10-16 1360 struct fsl_diu_data *data = mfbi->parent;
e95c17e9caff4b drivers/video/fsl-diu-fb.c Timur Tabi 2012-10-16 1361
e95c17e9caff4b drivers/video/fsl-diu-fb.c Timur Tabi 2012-10-16 1362 if (copy_from_user(data->gamma, buf, sizeof(data->gamma)))
e95c17e9caff4b drivers/video/fsl-diu-fb.c Timur Tabi 2012-10-16 1363 return -EFAULT;
e95c17e9caff4b drivers/video/fsl-diu-fb.c Timur Tabi 2012-10-16 1364 setbits32(&data->diu_reg->gamma, 0); /* Force table reload */
e95c17e9caff4b drivers/video/fsl-diu-fb.c Timur Tabi 2012-10-16 1365 break;
e95c17e9caff4b drivers/video/fsl-diu-fb.c Timur Tabi 2012-10-16 1366 }
e95c17e9caff4b drivers/video/fsl-diu-fb.c Timur Tabi 2012-10-16 1367 case MFB_GET_GAMMA: {
e95c17e9caff4b drivers/video/fsl-diu-fb.c Timur Tabi 2012-10-16 1368 struct fsl_diu_data *data = mfbi->parent;
e95c17e9caff4b drivers/video/fsl-diu-fb.c Timur Tabi 2012-10-16 1369
e95c17e9caff4b drivers/video/fsl-diu-fb.c Timur Tabi 2012-10-16 1370 if (copy_to_user(buf, data->gamma, sizeof(data->gamma)))
e95c17e9caff4b drivers/video/fsl-diu-fb.c Timur Tabi 2012-10-16 1371 return -EFAULT;
e95c17e9caff4b drivers/video/fsl-diu-fb.c Timur Tabi 2012-10-16 1372 break;
e95c17e9caff4b drivers/video/fsl-diu-fb.c Timur Tabi 2012-10-16 1373 }
e95c17e9caff4b drivers/video/fsl-diu-fb.c Timur Tabi 2012-10-16 1374 #endif
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1375 default:
154152aeea2c5e drivers/video/fsl-diu-fb.c Timur Tabi 2011-09-15 1376 dev_err(info->dev, "unknown ioctl command (0x%08X)\n", cmd);
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1377 return -ENOIOCTLCMD;
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1378 }
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1379
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1380 return 0;
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1381 }
9b53a9e28a34ed drivers/video/fsl-diu-fb.c York Sun 2008-04-28 1382
:::::: The code at line 1287 was first introduced by commit
:::::: 36b0b1d41541fc3b25faf38aa53c34cede357421 drivers/video: fsl-diu-fb: fix some ioctls
:::::: TO: Timur Tabi <timur@xxxxxxxxxxxxx>
:::::: CC: Florian Tobias Schandinat <FlorianSchandinat@xxxxxx>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip