[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202103120043.iUUfmGvf-lkp@intel.com>
Date: Fri, 12 Mar 2021 00:29:48 +0800
From: kernel test robot <lkp@...el.com>
To: Wang Qing <wangqing@...o.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
"Gustavo A. R. Silva" <gustavoars@...nel.org>,
Tiezhu Yang <yangtiezhu@...ngson.cn>,
Sam Ravnborg <sam@...nborg.org>,
Christophe JAILLET <christophe.jaillet@...adoo.fr>,
dri-devel@...ts.freedesktop.org, linux-fbdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: kbuild-all@...ts.01.org
Subject: Re: [PATCH] video: fbdev: delete redundant printing of return value
Hi Wang,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.12-rc2 next-20210311]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Wang-Qing/video-fbdev-delete-redundant-printing-of-return-value/20210311-201743
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git a74e6a014c9d4d4161061f770c9b4f98372ac778
config: arm-pxa_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/6d93756a48a2f91e8ac0cfdfd8734d30080706c2
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Wang-Qing/video-fbdev-delete-redundant-printing-of-return-value/20210311-201743
git checkout 6d93756a48a2f91e8ac0cfdfd8734d30080706c2
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
drivers/video/fbdev/pxafb.c: In function 'pxafb_probe':
>> drivers/video/fbdev/pxafb.c:2329:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
2329 | if (irq < 0)
| ^~
drivers/video/fbdev/pxafb.c:2331:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
2331 | goto failed_free_mem;
| ^~~~
vim +/if +2329 drivers/video/fbdev/pxafb.c
2235
2236 static int pxafb_probe(struct platform_device *dev)
2237 {
2238 struct pxafb_info *fbi;
2239 struct pxafb_mach_info *inf, *pdata;
2240 int i, irq, ret;
2241
2242 dev_dbg(&dev->dev, "pxafb_probe\n");
2243
2244 ret = -ENOMEM;
2245 pdata = dev_get_platdata(&dev->dev);
2246 inf = devm_kmalloc(&dev->dev, sizeof(*inf), GFP_KERNEL);
2247 if (!inf)
2248 goto failed;
2249
2250 if (pdata) {
2251 *inf = *pdata;
2252 inf->modes =
2253 devm_kmalloc_array(&dev->dev, pdata->num_modes,
2254 sizeof(inf->modes[0]), GFP_KERNEL);
2255 if (!inf->modes)
2256 goto failed;
2257 for (i = 0; i < inf->num_modes; i++)
2258 inf->modes[i] = pdata->modes[i];
2259 }
2260
2261 if (!pdata)
2262 inf = of_pxafb_of_mach_info(&dev->dev);
2263 if (IS_ERR_OR_NULL(inf))
2264 goto failed;
2265
2266 ret = pxafb_parse_options(&dev->dev, g_options, inf);
2267 if (ret < 0)
2268 goto failed;
2269
2270 pxafb_check_options(&dev->dev, inf);
2271
2272 dev_dbg(&dev->dev, "got a %dx%dx%d LCD\n",
2273 inf->modes->xres,
2274 inf->modes->yres,
2275 inf->modes->bpp);
2276 if (inf->modes->xres == 0 ||
2277 inf->modes->yres == 0 ||
2278 inf->modes->bpp == 0) {
2279 dev_err(&dev->dev, "Invalid resolution or bit depth\n");
2280 ret = -EINVAL;
2281 goto failed;
2282 }
2283
2284 fbi = pxafb_init_fbinfo(&dev->dev, inf);
2285 if (IS_ERR(fbi)) {
2286 dev_err(&dev->dev, "Failed to initialize framebuffer device\n");
2287 ret = PTR_ERR(fbi);
2288 goto failed;
2289 }
2290
2291 if (cpu_is_pxa3xx() && inf->acceleration_enabled)
2292 fbi->fb.fix.accel = FB_ACCEL_PXA3XX;
2293
2294 fbi->backlight_power = inf->pxafb_backlight_power;
2295 fbi->lcd_power = inf->pxafb_lcd_power;
2296
2297 fbi->lcd_supply = devm_regulator_get_optional(&dev->dev, "lcd");
2298 if (IS_ERR(fbi->lcd_supply)) {
2299 if (PTR_ERR(fbi->lcd_supply) == -EPROBE_DEFER)
2300 return -EPROBE_DEFER;
2301
2302 fbi->lcd_supply = NULL;
2303 }
2304
2305 fbi->mmio_base = devm_platform_ioremap_resource(dev, 0);
2306 if (IS_ERR(fbi->mmio_base)) {
2307 dev_err(&dev->dev, "failed to get I/O memory\n");
2308 ret = PTR_ERR(fbi->mmio_base);
2309 goto failed;
2310 }
2311
2312 fbi->dma_buff_size = PAGE_ALIGN(sizeof(struct pxafb_dma_buff));
2313 fbi->dma_buff = dma_alloc_coherent(fbi->dev, fbi->dma_buff_size,
2314 &fbi->dma_buff_phys, GFP_KERNEL);
2315 if (fbi->dma_buff == NULL) {
2316 dev_err(&dev->dev, "failed to allocate memory for DMA\n");
2317 ret = -ENOMEM;
2318 goto failed;
2319 }
2320
2321 ret = pxafb_init_video_memory(fbi);
2322 if (ret) {
2323 dev_err(&dev->dev, "Failed to allocate video RAM: %d\n", ret);
2324 ret = -ENOMEM;
2325 goto failed_free_dma;
2326 }
2327
2328 irq = platform_get_irq(dev, 0);
> 2329 if (irq < 0)
2330 ret = -ENODEV;
2331 goto failed_free_mem;
2332
2333 ret = devm_request_irq(&dev->dev, irq, pxafb_handle_irq, 0, "LCD", fbi);
2334 if (ret) {
2335 dev_err(&dev->dev, "request_irq failed: %d\n", ret);
2336 ret = -EBUSY;
2337 goto failed_free_mem;
2338 }
2339
2340 ret = pxafb_smart_init(fbi);
2341 if (ret) {
2342 dev_err(&dev->dev, "failed to initialize smartpanel\n");
2343 goto failed_free_mem;
2344 }
2345
2346 /*
2347 * This makes sure that our colour bitfield
2348 * descriptors are correctly initialised.
2349 */
2350 ret = pxafb_check_var(&fbi->fb.var, &fbi->fb);
2351 if (ret) {
2352 dev_err(&dev->dev, "failed to get suitable mode\n");
2353 goto failed_free_mem;
2354 }
2355
2356 ret = pxafb_set_par(&fbi->fb);
2357 if (ret) {
2358 dev_err(&dev->dev, "Failed to set parameters\n");
2359 goto failed_free_mem;
2360 }
2361
2362 platform_set_drvdata(dev, fbi);
2363
2364 ret = register_framebuffer(&fbi->fb);
2365 if (ret < 0) {
2366 dev_err(&dev->dev,
2367 "Failed to register framebuffer device: %d\n", ret);
2368 goto failed_free_cmap;
2369 }
2370
2371 pxafb_overlay_init(fbi);
2372
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (34585 bytes)
Powered by blists - more mailing lists