[driver-core:platform_groups 26/27] drivers/video//fbdev/wm8505fb.c:191:1: note: in expansion of macro 'ATTRIBUTE_GROUPS'

kbuild test robot lkp at intel.com
Tue Jun 4 22:25:02 UTC 2019


tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git platform_groups
head:   d770d421e93c93ceb55d6486e5ddeb65f21ca920
commit: 84cc896d582fc145f9c01b76f533707857d32d08 [26/27] video: fbdev: wm8505fb: convert platform driver to use dev_groups
config: arm-allyesconfig (attached as .config)
compiler: arm-linux-gnueabi-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 84cc896d582fc145f9c01b76f533707857d32d08
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=arm 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp at intel.com>

All warnings (new ones prefixed by >>):

   drivers/video//fbdev/wm8505fb.c:188:21: error: 'struct device_attribute' has no member named 'addr'; did you mean 'attr'?
     &dev_attr_contrast.addr,
                        ^~~~
                        attr
   drivers/video//fbdev/wm8505fb.c:411:16: error: 'wm8505fb_attributes' undeclared here (not in a function); did you mean 'wm8505fb_attrs'?
     .dev_groups = wm8505fb_attributes,
                   ^~~~~~~~~~~~~~~~~~~
                   wm8505fb_attrs
   drivers/video//fbdev/wm8505fb.c:411:16: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
   drivers/video//fbdev/wm8505fb.c:411:16: note: (near initialization for 'wm8505fb_driver.dev_groups')
   drivers/video//fbdev/wm8505fb.c:411:16: error: initializer element is not constant
   drivers/video//fbdev/wm8505fb.c:411:16: note: (near initialization for 'wm8505fb_driver.dev_groups')
   In file included from include/linux/kobject.h:20:0,
                    from include/linux/device.h:16,
                    from include/linux/dma-mapping.h:7,
                    from drivers/video//fbdev/wm8505fb.c:18:
   drivers/video//fbdev/wm8505fb.c:191:18: warning: 'wm8505fb_groups' defined but not used [-Wunused-variable]
    ATTRIBUTE_GROUPS(wm8505fb);
                     ^
   include/linux/sysfs.h:147:38: note: in definition of macro '__ATTRIBUTE_GROUPS'
    static const struct attribute_group *_name##_groups[] = { \
                                         ^~~~~
>> drivers/video//fbdev/wm8505fb.c:191:1: note: in expansion of macro 'ATTRIBUTE_GROUPS'
    ATTRIBUTE_GROUPS(wm8505fb);
    ^~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/ATTRIBUTE_GROUPS +191 drivers/video//fbdev/wm8505fb.c

  > 18	#include <linux/dma-mapping.h>
    19	#include <linux/fb.h>
    20	#include <linux/errno.h>
    21	#include <linux/err.h>
    22	#include <linux/init.h>
    23	#include <linux/interrupt.h>
    24	#include <linux/io.h>
    25	#include <linux/kernel.h>
    26	#include <linux/memblock.h>
    27	#include <linux/mm.h>
    28	#include <linux/module.h>
    29	#include <linux/of.h>
    30	#include <linux/of_fdt.h>
    31	#include <linux/platform_device.h>
    32	#include <linux/slab.h>
    33	#include <linux/string.h>
    34	#include <linux/wait.h>
    35	#include <video/of_display_timing.h>
    36	
    37	#include "wm8505fb_regs.h"
    38	#include "wmt_ge_rops.h"
    39	
    40	#define DRIVER_NAME "wm8505-fb"
    41	
    42	#define to_wm8505fb_info(__info) container_of(__info, \
    43							struct wm8505fb_info, fb)
    44	struct wm8505fb_info {
    45		struct fb_info		fb;
    46		void __iomem		*regbase;
    47		unsigned int		contrast;
    48	};
    49	
    50	
    51	static int wm8505fb_init_hw(struct fb_info *info)
    52	{
    53		struct wm8505fb_info *fbi = to_wm8505fb_info(info);
    54	
    55		int i;
    56	
    57		/* I know the purpose only of few registers, so clear unknown */
    58		for (i = 0; i < 0x200; i += 4)
    59			writel(0, fbi->regbase + i);
    60	
    61		/* Set frame buffer address */
    62		writel(fbi->fb.fix.smem_start, fbi->regbase + WMT_GOVR_FBADDR);
    63		writel(fbi->fb.fix.smem_start, fbi->regbase + WMT_GOVR_FBADDR1);
    64	
    65		/*
    66		 * Set in-memory picture format to RGB
    67		 * 0x31C sets the correct color mode (RGB565) for WM8650
    68		 * Bit 8+9 (0x300) are ignored on WM8505 as reserved
    69		 */
    70		writel(0x31c,		       fbi->regbase + WMT_GOVR_COLORSPACE);
    71		writel(1,		       fbi->regbase + WMT_GOVR_COLORSPACE1);
    72	
    73		/* Virtual buffer size */
    74		writel(info->var.xres,	       fbi->regbase + WMT_GOVR_XRES);
    75		writel(info->var.xres_virtual, fbi->regbase + WMT_GOVR_XRES_VIRTUAL);
    76	
    77		/* black magic ;) */
    78		writel(0xf,		       fbi->regbase + WMT_GOVR_FHI);
    79		writel(4,		       fbi->regbase + WMT_GOVR_DVO_SET);
    80		writel(1,		       fbi->regbase + WMT_GOVR_MIF_ENABLE);
    81		writel(1,		       fbi->regbase + WMT_GOVR_REG_UPDATE);
    82	
    83		return 0;
    84	}
    85	
    86	static int wm8505fb_set_timing(struct fb_info *info)
    87	{
    88		struct wm8505fb_info *fbi = to_wm8505fb_info(info);
    89	
    90		int h_start = info->var.left_margin;
    91		int h_end = h_start + info->var.xres;
    92		int h_all = h_end + info->var.right_margin;
    93		int h_sync = info->var.hsync_len;
    94	
    95		int v_start = info->var.upper_margin;
    96		int v_end = v_start + info->var.yres;
    97		int v_all = v_end + info->var.lower_margin;
    98		int v_sync = info->var.vsync_len;
    99	
   100		writel(0, fbi->regbase + WMT_GOVR_TG);
   101	
   102		writel(h_start, fbi->regbase + WMT_GOVR_TIMING_H_START);
   103		writel(h_end,   fbi->regbase + WMT_GOVR_TIMING_H_END);
   104		writel(h_all,   fbi->regbase + WMT_GOVR_TIMING_H_ALL);
   105		writel(h_sync,  fbi->regbase + WMT_GOVR_TIMING_H_SYNC);
   106	
   107		writel(v_start, fbi->regbase + WMT_GOVR_TIMING_V_START);
   108		writel(v_end,   fbi->regbase + WMT_GOVR_TIMING_V_END);
   109		writel(v_all,   fbi->regbase + WMT_GOVR_TIMING_V_ALL);
   110		writel(v_sync,  fbi->regbase + WMT_GOVR_TIMING_V_SYNC);
   111	
   112		writel(1, fbi->regbase + WMT_GOVR_TG);
   113	
   114		return 0;
   115	}
   116	
   117	
   118	static int wm8505fb_set_par(struct fb_info *info)
   119	{
   120		struct wm8505fb_info *fbi = to_wm8505fb_info(info);
   121	
   122		if (!fbi)
   123			return -EINVAL;
   124	
   125		if (info->var.bits_per_pixel == 32) {
   126			info->var.red.offset = 16;
   127			info->var.red.length = 8;
   128			info->var.red.msb_right = 0;
   129			info->var.green.offset = 8;
   130			info->var.green.length = 8;
   131			info->var.green.msb_right = 0;
   132			info->var.blue.offset = 0;
   133			info->var.blue.length = 8;
   134			info->var.blue.msb_right = 0;
   135			info->fix.visual = FB_VISUAL_TRUECOLOR;
   136			info->fix.line_length = info->var.xres_virtual << 2;
   137		} else if (info->var.bits_per_pixel == 16) {
   138			info->var.red.offset = 11;
   139			info->var.red.length = 5;
   140			info->var.red.msb_right = 0;
   141			info->var.green.offset = 5;
   142			info->var.green.length = 6;
   143			info->var.green.msb_right = 0;
   144			info->var.blue.offset = 0;
   145			info->var.blue.length = 5;
   146			info->var.blue.msb_right = 0;
   147			info->fix.visual = FB_VISUAL_TRUECOLOR;
   148			info->fix.line_length = info->var.xres_virtual << 1;
   149		}
   150	
   151		wm8505fb_set_timing(info);
   152	
   153		writel(fbi->contrast<<16 | fbi->contrast<<8 | fbi->contrast,
   154			fbi->regbase + WMT_GOVR_CONTRAST);
   155	
   156		return 0;
   157	}
   158	
   159	static ssize_t contrast_show(struct device *dev,
   160				     struct device_attribute *attr, char *buf)
   161	{
   162		struct fb_info *info = dev_get_drvdata(dev);
   163		struct wm8505fb_info *fbi = to_wm8505fb_info(info);
   164	
   165		return sprintf(buf, "%u\n", fbi->contrast);
   166	}
   167	
   168	static ssize_t contrast_store(struct device *dev,
   169				      struct device_attribute *attr,
   170				      const char *buf, size_t count)
   171	{
   172		struct fb_info *info = dev_get_drvdata(dev);
   173		struct wm8505fb_info *fbi = to_wm8505fb_info(info);
   174		unsigned long tmp;
   175	
   176		if (kstrtoul(buf, 10, &tmp) || (tmp > 0xff))
   177			return -EINVAL;
   178		fbi->contrast = tmp;
   179	
   180		wm8505fb_set_par(info);
   181	
   182		return count;
   183	}
   184	
   185	static DEVICE_ATTR_RW(contrast);
   186	
   187	static struct attribute *wm8505fb_attrs[] = {
   188		&dev_attr_contrast.addr,
   189		NULL,
   190	};
 > 191	ATTRIBUTE_GROUPS(wm8505fb);
   192	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 70395 bytes
Desc: not available
URL: <http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/attachments/20190605/fb0cf9e9/attachment-0001.bin>


More information about the devel mailing list