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 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_ba
[PATCH] video: fbdev: delete redundant printing of return value
platform_get_irq() has already checked and printed the return value, the printing here is nothing special, it is not necessary at all. Signed-off-by: Wang Qing --- drivers/video/fbdev/pxafb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c index f1551e0..780ac1f --- a/drivers/video/fbdev/pxafb.c +++ b/drivers/video/fbdev/pxafb.c @@ -2326,11 +2326,9 @@ static int pxafb_probe(struct platform_device *dev) } irq = platform_get_irq(dev, 0); - if (irq < 0) { - dev_err(&dev->dev, "no IRQ defined\n"); + if (irq < 0) ret = -ENODEV; goto failed_free_mem; - } ret = devm_request_irq(&dev->dev, irq, pxafb_handle_irq, 0, "LCD", fbi); if (ret) { -- 2.7.4 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH] video: fbdev: delete redundant printing of return value
platform_get_irq() has already checked and printed the return value, the printing here is nothing special, it is not necessary at all. Signed-off-by: Wang Qing --- drivers/video/fbdev/pxa168fb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/video/fbdev/pxa168fb.c b/drivers/video/fbdev/pxa168fb.c index 47e6a1d..e4fe6a4 --- a/drivers/video/fbdev/pxa168fb.c +++ b/drivers/video/fbdev/pxa168fb.c @@ -618,10 +618,8 @@ static int pxa168fb_probe(struct platform_device *pdev) } irq = platform_get_irq(pdev, 0); - if (irq < 0) { - dev_err(&pdev->dev, "no IRQ defined\n"); + if (irq < 0) return -ENOENT; - } info = framebuffer_alloc(sizeof(struct pxa168fb_info), &pdev->dev); if (info == NULL) { -- 2.7.4 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH] video: fbdev: delete redundant printing of return value
platform_get_irq() has already checked and printed the return value, the printing here is nothing special, it is not necessary at all. Signed-off-by: Wang Qing --- drivers/video/fbdev/vt8500lcdfb.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/video/fbdev/vt8500lcdfb.c b/drivers/video/fbdev/vt8500lcdfb.c index c614762..4cacff6 --- a/drivers/video/fbdev/vt8500lcdfb.c +++ b/drivers/video/fbdev/vt8500lcdfb.c @@ -373,7 +373,6 @@ static int vt8500lcd_probe(struct platform_device *pdev) irq = platform_get_irq(pdev, 0); if (irq < 0) { - dev_err(&pdev->dev, "no IRQ defined\n"); ret = -ENODEV; goto failed_free_palette; } -- 2.7.4 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH] video: fbdev: delete redundant printing of return value
platform_get_irq() has already checked and printed the return value, the printing here is nothing special, it is not necessary at all. Signed-off-by: Wang Qing --- drivers/video/fbdev/pxa3xx-gcu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/video/fbdev/pxa3xx-gcu.c b/drivers/video/fbdev/pxa3xx-gcu.c index 4279e13..9d2aed7 --- a/drivers/video/fbdev/pxa3xx-gcu.c +++ b/drivers/video/fbdev/pxa3xx-gcu.c @@ -613,10 +613,8 @@ static int pxa3xx_gcu_probe(struct platform_device *pdev) /* request the IRQ */ irq = platform_get_irq(pdev, 0); - if (irq < 0) { - dev_err(dev, "no IRQ defined: %d\n", irq); + if (irq < 0) return irq; - } ret = devm_request_irq(dev, irq, pxa3xx_gcu_handle_irq, 0, DRV_NAME, priv); -- 2.7.4 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH] video: fbdev: delete redundant printing of return value
platform_get_irq() has already checked and printed the return value, the printing here is nothing special, it is not necessary at all. Signed-off-by: Wang Qing --- drivers/video/fbdev/s3c2410fb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/video/fbdev/s3c2410fb.c b/drivers/video/fbdev/s3c2410fb.c index d8ae525..72dd092 --- a/drivers/video/fbdev/s3c2410fb.c +++ b/drivers/video/fbdev/s3c2410fb.c @@ -847,10 +847,8 @@ static int s3c24xxfb_probe(struct platform_device *pdev, display = mach_info->displays + mach_info->default_display; irq = platform_get_irq(pdev, 0); - if (irq < 0) { - dev_err(&pdev->dev, "no irq for device\n"); + if (irq < 0) return -ENOENT; - } fbinfo = framebuffer_alloc(sizeof(struct s3c2410fb_info), &pdev->dev); if (!fbinfo) -- 2.7.4 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel