lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202302071628.D2cZY8jL-lkp@intel.com>
Date:   Tue, 7 Feb 2023 16:34:09 +0800
From:   kernel test robot <lkp@...el.com>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: drivers/video/fbdev/omap/omapfb_main.c:549 set_fb_var() warn:
 inconsistent indenting

Hi Arnd,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   05ecb680708a1dbe6554d6fc17e5d9a8a7cb5e6a
commit: 804f7f19c2e2928aeb8eafef8379fe8b8d13f98b fbdev: omap: avoid using mach/*.h files
date:   10 months ago
config: arm-randconfig-m031-20230207 (https://download.01.org/0day-ci/archive/20230207/202302071628.D2cZY8jL-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 12.1.0

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

New smatch warnings:
drivers/video/fbdev/omap/omapfb_main.c:549 set_fb_var() warn: inconsistent indenting

Old smatch warnings:
drivers/video/fbdev/omap/omapfb_main.c:551 set_fb_var() warn: inconsistent indenting
drivers/video/fbdev/omap/omapfb_main.c:556 set_fb_var() warn: inconsistent indenting
drivers/video/fbdev/omap/omapfb_main.c:558 set_fb_var() warn: inconsistent indenting
drivers/video/fbdev/omap/omapfb_main.c:1646 omapfb_do_probe() warn: platform_get_irq() does not return zero
drivers/video/fbdev/omap/omapfb_main.c:1653 omapfb_do_probe() warn: platform_get_irq() does not return zero

vim +549 drivers/video/fbdev/omap/omapfb_main.c

8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  457  
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  458  /*
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  459   * Check the values in var against our capabilities and in case of out of
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  460   * bound values try to adjust them.
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  461   */
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  462  static int set_fb_var(struct fb_info *fbi,
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  463  		      struct fb_var_screeninfo *var)
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  464  {
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  465  	int		bpp;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  466  	unsigned long	max_frame_size;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  467  	unsigned long	line_size;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  468  	int		xres_min, xres_max;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  469  	int		yres_min, yres_max;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  470  	struct omapfb_plane_struct *plane = fbi->par;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  471  	struct omapfb_device *fbdev = plane->fbdev;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  472  	struct lcd_panel *panel = fbdev->panel;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  473  
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  474  	if (set_color_mode(plane, var) < 0)
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  475  		return -EINVAL;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  476  
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  477  	bpp = var->bits_per_pixel;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  478  	if (plane->color_mode == OMAPFB_COLOR_RGB444)
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  479  		bpp = 16;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  480  
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  481  	switch (var->rotate) {
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  482  	case 0:
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  483  	case 180:
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  484  		xres_min = OMAPFB_PLANE_XRES_MIN;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  485  		xres_max = panel->x_res;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  486  		yres_min = OMAPFB_PLANE_YRES_MIN;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  487  		yres_max = panel->y_res;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  488  		if (cpu_is_omap15xx()) {
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  489  			var->xres = panel->x_res;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  490  			var->yres = panel->y_res;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  491  		}
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  492  		break;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  493  	case 90:
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  494  	case 270:
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  495  		xres_min = OMAPFB_PLANE_YRES_MIN;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  496  		xres_max = panel->y_res;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  497  		yres_min = OMAPFB_PLANE_XRES_MIN;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  498  		yres_max = panel->x_res;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  499  		if (cpu_is_omap15xx()) {
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  500  			var->xres = panel->y_res;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  501  			var->yres = panel->x_res;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  502  		}
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  503  		break;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  504  	default:
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  505  		return -EINVAL;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  506  	}
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  507  
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  508  	if (var->xres < xres_min)
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  509  		var->xres = xres_min;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  510  	if (var->yres < yres_min)
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  511  		var->yres = yres_min;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  512  	if (var->xres > xres_max)
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  513  		var->xres = xres_max;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  514  	if (var->yres > yres_max)
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  515  		var->yres = yres_max;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  516  
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  517  	if (var->xres_virtual < var->xres)
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  518  		var->xres_virtual = var->xres;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  519  	if (var->yres_virtual < var->yres)
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  520  		var->yres_virtual = var->yres;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  521  	max_frame_size = fbdev->mem_desc.region[plane->idx].size;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  522  	line_size = var->xres_virtual * bpp / 8;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  523  	if (line_size * var->yres_virtual > max_frame_size) {
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  524  		/* Try to keep yres_virtual first */
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  525  		line_size = max_frame_size / var->yres_virtual;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  526  		var->xres_virtual = line_size * 8 / bpp;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  527  		if (var->xres_virtual < var->xres) {
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  528  			/* Still doesn't fit. Shrink yres_virtual too */
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  529  			var->xres_virtual = var->xres;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  530  			line_size = var->xres * bpp / 8;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  531  			var->yres_virtual = max_frame_size / line_size;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  532  		}
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  533  		/* Recheck this, as the virtual size changed. */
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  534  		if (var->xres_virtual < var->xres)
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  535  			var->xres = var->xres_virtual;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  536  		if (var->yres_virtual < var->yres)
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  537  			var->yres = var->yres_virtual;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  538  		if (var->xres < xres_min || var->yres < yres_min)
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  539  			return -EINVAL;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  540  	}
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  541  	if (var->xres + var->xoffset > var->xres_virtual)
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  542  		var->xoffset = var->xres_virtual - var->xres;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  543  	if (var->yres + var->yoffset > var->yres_virtual)
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  544  		var->yoffset = var->yres_virtual - var->yres;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  545  
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  546  	if (plane->color_mode == OMAPFB_COLOR_RGB444) {
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  547  		var->red.offset	  = 8; var->red.length	 = 4;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  548  						var->red.msb_right   = 0;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17 @549  		var->green.offset = 4; var->green.length = 4;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  550  						var->green.msb_right = 0;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  551  		var->blue.offset  = 0; var->blue.length  = 4;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  552  						var->blue.msb_right  = 0;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  553  	} else {
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  554  		var->red.offset	 = 11; var->red.length	 = 5;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  555  						var->red.msb_right   = 0;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  556  		var->green.offset = 5;  var->green.length = 6;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  557  						var->green.msb_right = 0;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  558  		var->blue.offset = 0;  var->blue.length  = 5;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  559  						var->blue.msb_right  = 0;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  560  	}
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  561  
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  562  	var->height		= -1;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  563  	var->width		= -1;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  564  	var->grayscale		= 0;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  565  
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  566  	/* pixclock in ps, the rest in pixclock */
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  567  	var->pixclock		= 10000000 / (panel->pixel_clock / 100);
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  568  	var->left_margin	= panel->hfp;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  569  	var->right_margin	= panel->hbp;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  570  	var->upper_margin	= panel->vfp;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  571  	var->lower_margin	= panel->vbp;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  572  	var->hsync_len		= panel->hsw;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  573  	var->vsync_len		= panel->vsw;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  574  
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  575  	/* TODO: get these from panel->config */
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  576  	var->vmode		= FB_VMODE_NONINTERLACED;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  577  	var->sync		= 0;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  578  
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  579  	return 0;
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  580  }
8b08cf2b64f5a6 drivers/video/omap/omapfb_main.c Imre Deak 2007-07-17  581  

:::::: The code at line 549 was first introduced by commit
:::::: 8b08cf2b64f5a60594b07795b2ad518c6d044566 OMAP: add TI OMAP framebuffer driver

:::::: TO: Imre Deak <imre.deak@...idboot.com>
:::::: CC: Linus Torvalds <torvalds@...dy.linux-foundation.org>

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ