drivers/video/fbdev/tdfxfb.c:1120:27: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 6cf7ccba29dcf39ab27630c383a3844078a6d5cd
commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces
date: 4 weeks ago
config: s390-randconfig-s031-20200719 (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.2-49-g707c5017-dirty
git checkout 670d0a4b10704667765f7d18f7592993d02783aa
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/video/fbdev/tdfxfb.c:1120:27: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *p @@ got unsigned char [noderef] [usertype] __iomem *cursorbase @@
drivers/video/fbdev/tdfxfb.c:1120:27: sparse: expected void *p
drivers/video/fbdev/tdfxfb.c:1120:27: sparse: got unsigned char [noderef] [usertype] __iomem *cursorbase
drivers/video/fbdev/tdfxfb.c:1131:33: sparse: sparse: cast removes address space '__iomem' of expression
drivers/video/fbdev/tdfxfb.c:1134:33: sparse: sparse: cast removes address space '__iomem' of expression
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
vim +1120 drivers/video/fbdev/tdfxfb.c
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1040
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1041 static int tdfxfb_cursor(struct fb_info *info, struct fb_cursor *cursor)
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1042 {
a807f618b62594 drivers/video/tdfxfb.c Antonino A. Daplas 2006-01-09 1043 struct tdfx_par *par = info->par;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1044 u32 vidcfg;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1045
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1046 if (!hwcursor)
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1047 return -EINVAL; /* just to force soft_cursor() call */
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1048
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1049 /* Too large of a cursor or wrong bpp :-( */
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1050 if (cursor->image.width > 64 ||
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1051 cursor->image.height > 64 ||
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1052 cursor->image.depth > 1)
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1053 return -EINVAL;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1054
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1055 vidcfg = tdfx_inl(par, VIDPROCCFG);
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1056 if (cursor->enable)
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1057 tdfx_outl(par, VIDPROCCFG, vidcfg | VIDCFG_HWCURSOR_ENABLE);
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1058 else
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1059 tdfx_outl(par, VIDPROCCFG, vidcfg & ~VIDCFG_HWCURSOR_ENABLE);
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1060
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1061 /*
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1062 * If the cursor is not be changed this means either we want the
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1063 * current cursor state (if enable is set) or we want to query what
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1064 * we can do with the cursor (if enable is not set)
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1065 */
8af1d50f7f6793 drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1066 if (!cursor->set)
8af1d50f7f6793 drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1067 return 0;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1068
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1069 /* fix cursor color - XFree86 forgets to restore it properly */
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1070 if (cursor->set & FB_CUR_SETCMAP) {
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1071 struct fb_cmap cmap = info->cmap;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1072 u32 bg_idx = cursor->image.bg_color;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1073 u32 fg_idx = cursor->image.fg_color;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1074 unsigned long bg_color, fg_color;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1075
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1076 fg_color = (((u32)cmap.red[fg_idx] & 0xff00) << 8) |
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1077 (((u32)cmap.green[fg_idx] & 0xff00) << 0) |
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1078 (((u32)cmap.blue[fg_idx] & 0xff00) >> 8);
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1079 bg_color = (((u32)cmap.red[bg_idx] & 0xff00) << 8) |
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1080 (((u32)cmap.green[bg_idx] & 0xff00) << 0) |
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1081 (((u32)cmap.blue[bg_idx] & 0xff00) >> 8);
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1082 banshee_make_room(par, 2);
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1083 tdfx_outl(par, HWCURC0, bg_color);
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1084 tdfx_outl(par, HWCURC1, fg_color);
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1085 }
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1086
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1087 if (cursor->set & FB_CUR_SETPOS) {
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1088 int x = cursor->image.dx;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1089 int y = cursor->image.dy - info->var.yoffset;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1090
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1091 x += 63;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1092 y += 63;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1093 banshee_make_room(par, 1);
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1094 tdfx_outl(par, HWCURLOC, (y << 16) + x);
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1095 }
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1096 if (cursor->set & (FB_CUR_SETIMAGE | FB_CUR_SETSHAPE)) {
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1097 /*
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1098 * Voodoo 3 and above cards use 2 monochrome cursor patterns.
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1099 * The reason is so the card can fetch 8 words at a time
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1100 * and are stored on chip for use for the next 8 scanlines.
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1101 * This reduces the number of times for access to draw the
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1102 * cursor for each screen refresh.
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1103 * Each pattern is a bitmap of 64 bit wide and 64 bit high
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1104 * (total of 8192 bits or 1024 bytes). The two patterns are
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1105 * stored in such a way that pattern 0 always resides in the
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1106 * lower half (least significant 64 bits) of a 128 bit word
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1107 * and pattern 1 the upper half. If you examine the data of
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1108 * the cursor image the graphics card uses then from the
25985edcedea63 drivers/video/tdfxfb.c Lucas De Marchi 2011-03-30 1109 * beginning you see line one of pattern 0, line one of
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1110 * pattern 1, line two of pattern 0, line two of pattern 1,
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1111 * etc etc. The linear stride for the cursor is always 16 bytes
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1112 * (128 bits) which is the maximum cursor width times two for
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1113 * the two monochrome patterns.
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1114 */
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1115 u8 __iomem *cursorbase = info->screen_base + info->fix.smem_len;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1116 u8 *bitmap = (u8 *)cursor->image.data;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1117 u8 *mask = (u8 *)cursor->mask;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1118 int i;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1119
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 @1120 fb_memset(cursorbase, 0, 1024);
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1121
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1122 for (i = 0; i < cursor->image.height; i++) {
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1123 int h = 0;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1124 int j = (cursor->image.width + 7) >> 3;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1125
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1126 for (; j > 0; j--) {
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1127 u8 data = *mask ^ *bitmap;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1128 if (cursor->rop == ROP_COPY)
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1129 data = *mask & *bitmap;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1130 /* Pattern 0. Copy the cursor mask to it */
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1131 fb_writeb(*mask, cursorbase + h);
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1132 mask++;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1133 /* Pattern 1. Copy the cursor bitmap to it */
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1134 fb_writeb(data, cursorbase + h + 8);
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1135 bitmap++;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1136 h++;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1137 }
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1138 cursorbase += 16;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1139 }
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1140 }
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1141 return 0;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1142 }
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1143
:::::: The code at line 1120 was first introduced by commit
:::::: 90b0f08536531abbbe7b5d4944792da08cadde01 tdfxfb: hardware cursor
:::::: TO: Krzysztof Helt <krzysztof.h1(a)wp.pl>
:::::: CC: Linus Torvalds <torvalds(a)woody.linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
drivers/video/fbdev/kyro/fbdev.c:725:9: sparse: expected void certs drivers fs samples scripts tools
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 6cf7ccba29dcf39ab27630c383a3844078a6d5cd
commit: 80591e61a0f7e88deaada69844e4a31280c4a38f kbuild: tell sparse about the $ARCH
date: 8 months ago
config: s390-randconfig-s032-20200719 (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.2-49-g707c5017-dirty
git checkout 80591e61a0f7e88deaada69844e4a31280c4a38f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
drivers/video/fbdev/kyro/fbdev.c:725:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *s @@ got char [noderef] <asn:2> *screen_base @@
>> drivers/video/fbdev/kyro/fbdev.c:725:9: sparse: expected void *s
drivers/video/fbdev/kyro/fbdev.c:725:9: sparse: got char [noderef] <asn:2> *screen_base
--
drivers/video/fbdev/tdfxfb.c:1120:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *s @@ got unsigned char [noderef] [usertype] <asn:2> *cursorbase @@
>> drivers/video/fbdev/tdfxfb.c:1120:17: sparse: expected void *s
drivers/video/fbdev/tdfxfb.c:1120:17: sparse: got unsigned char [noderef] [usertype] <asn:2> *cursorbase
drivers/video/fbdev/tdfxfb.c:1131:33: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/video/fbdev/tdfxfb.c:1134:33: sparse: sparse: cast removes address space '<asn:2>' of expression
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
vim +725 drivers/video/fbdev/kyro/fbdev.c
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 661
48c68c4f1b5424 drivers/video/kyro/fbdev.c Greg Kroah-Hartman 2012-12-21 662 static int kyrofb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 663 {
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 664 struct fb_info *info;
a26968df0110bc drivers/video/kyro/fbdev.c Antonino A. Daplas 2006-01-09 665 struct kyrofb_info *currentpar;
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 666 unsigned long size;
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 667 int err;
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 668
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 669 if ((err = pci_enable_device(pdev))) {
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 670 printk(KERN_WARNING "kyrofb: Can't enable pdev: %d\n", err);
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 671 return err;
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 672 }
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 673
a26968df0110bc drivers/video/kyro/fbdev.c Antonino A. Daplas 2006-01-09 674 info = framebuffer_alloc(sizeof(struct kyrofb_info), &pdev->dev);
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 675 if (!info)
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 676 return -ENOMEM;
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 677
a26968df0110bc drivers/video/kyro/fbdev.c Antonino A. Daplas 2006-01-09 678 currentpar = info->par;
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 679
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 680 kyro_fix.smem_start = pci_resource_start(pdev, 0);
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 681 kyro_fix.smem_len = pci_resource_len(pdev, 0);
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 682 kyro_fix.mmio_start = pci_resource_start(pdev, 1);
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 683 kyro_fix.mmio_len = pci_resource_len(pdev, 1);
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 684
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 685 currentpar->regbase = deviceInfo.pSTGReg =
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 686 ioremap_nocache(kyro_fix.mmio_start, kyro_fix.mmio_len);
9e517ac88b2443 drivers/video/fbdev/kyro/fbdev.c Luis R. Rodriguez 2015-08-24 687 if (!currentpar->regbase)
9e517ac88b2443 drivers/video/fbdev/kyro/fbdev.c Luis R. Rodriguez 2015-08-24 688 goto out_free_fb;
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 689
9e517ac88b2443 drivers/video/fbdev/kyro/fbdev.c Luis R. Rodriguez 2015-08-24 690 info->screen_base = pci_ioremap_wc_bar(pdev, 0);
9e517ac88b2443 drivers/video/fbdev/kyro/fbdev.c Luis R. Rodriguez 2015-08-24 691 if (!info->screen_base)
9e517ac88b2443 drivers/video/fbdev/kyro/fbdev.c Luis R. Rodriguez 2015-08-24 692 goto out_unmap_regs;
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 693
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 694 if (!nomtrr)
9e517ac88b2443 drivers/video/fbdev/kyro/fbdev.c Luis R. Rodriguez 2015-08-24 695 currentpar->wc_cookie = arch_phys_wc_add(kyro_fix.smem_start,
9e517ac88b2443 drivers/video/fbdev/kyro/fbdev.c Luis R. Rodriguez 2015-08-24 696 kyro_fix.smem_len);
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 697
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 698 kyro_fix.ypanstep = nopan ? 0 : 1;
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 699 kyro_fix.ywrapstep = nowrap ? 0 : 1;
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 700
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 701 info->fbops = &kyrofb_ops;
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 702 info->fix = kyro_fix;
a26968df0110bc drivers/video/kyro/fbdev.c Antonino A. Daplas 2006-01-09 703 info->pseudo_palette = currentpar->palette;
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 704 info->flags = FBINFO_DEFAULT;
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 705
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 706 SetCoreClockPLL(deviceInfo.pSTGReg, pdev);
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 707
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 708 deviceInfo.ulNextFreeVidMem = 0;
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 709 deviceInfo.ulOverlayOffset = 0;
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 710
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 711 /* This should give a reasonable default video mode */
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 712 if (!fb_find_mode(&info->var, info, mode_option, kyro_modedb,
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 713 NUM_TOTAL_MODES, &kyro_modedb[VMODE_1024_768_75], 32))
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 714 info->var = kyro_var;
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 715
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 716 fb_alloc_cmap(&info->cmap, 256, 0);
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 717
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 718 kyrofb_set_par(info);
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 719 kyrofb_check_var(&info->var, info);
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 720
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 721 size = get_line_length(info->var.xres_virtual,
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 722 info->var.bits_per_pixel);
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 723 size *= info->var.yres_virtual;
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 724
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 @725 fb_memset(info->screen_base, 0, size);
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 726
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 727 if (register_framebuffer(info) < 0)
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 728 goto out_unmap;
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 729
31b6780c15a4e3 drivers/video/kyro/fbdev.c Joe Perches 2013-09-19 730 fb_info(info, "%s frame buffer device, at %dx%d@%d using %ldk/%ldk of VRAM\n",
31b6780c15a4e3 drivers/video/kyro/fbdev.c Joe Perches 2013-09-19 731 info->fix.id,
31b6780c15a4e3 drivers/video/kyro/fbdev.c Joe Perches 2013-09-19 732 info->var.xres, info->var.yres, info->var.bits_per_pixel,
31b6780c15a4e3 drivers/video/kyro/fbdev.c Joe Perches 2013-09-19 733 size >> 10, (unsigned long)info->fix.smem_len >> 10);
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 734
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 735 pci_set_drvdata(pdev, info);
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 736
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 737 return 0;
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 738
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 739 out_unmap:
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 740 iounmap(info->screen_base);
9e517ac88b2443 drivers/video/fbdev/kyro/fbdev.c Luis R. Rodriguez 2015-08-24 741 out_unmap_regs:
9e517ac88b2443 drivers/video/fbdev/kyro/fbdev.c Luis R. Rodriguez 2015-08-24 742 iounmap(currentpar->regbase);
9e517ac88b2443 drivers/video/fbdev/kyro/fbdev.c Luis R. Rodriguez 2015-08-24 743 out_free_fb:
a26968df0110bc drivers/video/kyro/fbdev.c Antonino A. Daplas 2006-01-09 744 framebuffer_release(info);
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 745
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 746 return -EINVAL;
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 747 }
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 748
:::::: The code at line 725 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds(a)ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds(a)ppc970.osdl.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
Re: [RFC PATCH 1/5] keys: Move permissions checking decisions into the checking code
by kernel test robot
Hi David,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on cifs/for-next]
[also build test ERROR on dm/for-next linus/master v5.8-rc5 next-20200717]
[cannot apply to security/next-testing pcmoore-selinux/next ecryptfs/next]
[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/David-Howells/keys-Security-chan...
base: git://git.samba.org/sfrench/cifs-2.6.git for-next
config: microblaze-randconfig-r011-20200717 (attached as .config)
compiler: microblaze-linux-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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=microblaze
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
security/smack/smack_lsm.c: In function 'smack_key_permission':
>> security/smack/smack_lsm.c:4258:3: error: 'auth_can_override' undeclared (first use in this function)
4258 | auth_can_override = true;
| ^~~~~~~~~~~~~~~~~
security/smack/smack_lsm.c:4258:3: note: each undeclared identifier is reported only once for each function it appears in
>> security/smack/smack_lsm.c:4309:10: error: dereferencing pointer to incomplete type 'struct request_key_auth'
4309 | if (rka->target_key == key)
| ^~
>> security/smack/smack_lsm.c:4309:26: error: 'key' undeclared (first use in this function)
4309 | if (rka->target_key == key)
| ^~~
>> security/smack/smack_lsm.c:4310:5: error: '_perm' undeclared (first use in this function)
4310 | *_perm = 0;
| ^~~~~
vim +/auth_can_override +4258 security/smack/smack_lsm.c
4212
4213 /**
4214 * smack_key_permission - Smack access on a key
4215 * @key_ref: gets to the object
4216 * @cred: the credentials to use
4217 * @need_perm: requested key permission
4218 *
4219 * Return 0 if the task has read and write to the object,
4220 * an error code otherwise
4221 */
4222 static int smack_key_permission(key_ref_t key_ref,
4223 const struct cred *cred,
4224 enum key_need_perm need_perm,
4225 unsigned int flags)
4226 {
4227 struct key *keyp;
4228 struct smk_audit_info ad;
4229 struct smack_known *tkp = smk_of_task(smack_cred(cred));
4230 int request = 0;
4231 int rc;
4232
4233 keyp = key_ref_to_ptr(key_ref);
4234 if (keyp == NULL)
4235 return -EINVAL;
4236 /*
4237 * If the key hasn't been initialized give it access so that
4238 * it may do so.
4239 */
4240 if (keyp->security == NULL)
4241 return 0;
4242 /*
4243 * This should not occur
4244 */
4245 if (tkp == NULL)
4246 return -EACCES;
4247
4248 /*
4249 * Validate requested permissions
4250 */
4251 switch (need_perm) {
4252 case KEY_NEED_ASSUME_AUTHORITY:
4253 return 0;
4254
4255 case KEY_NEED_DESCRIBE:
4256 case KEY_NEED_GET_SECURITY:
4257 request |= MAY_READ;
> 4258 auth_can_override = true;
4259 break;
4260
4261 case KEY_NEED_CHOWN:
4262 case KEY_NEED_INVALIDATE:
4263 case KEY_NEED_JOIN:
4264 case KEY_NEED_LINK:
4265 case KEY_NEED_KEYRING_ADD:
4266 case KEY_NEED_KEYRING_CLEAR:
4267 case KEY_NEED_KEYRING_DELETE:
4268 case KEY_NEED_REVOKE:
4269 case KEY_NEED_SETPERM:
4270 case KEY_NEED_SET_RESTRICTION:
4271 case KEY_NEED_UPDATE:
4272 request |= MAY_WRITE;
4273 break;
4274
4275 case KEY_NEED_INSTANTIATE:
4276 auth_can_override = true;
4277 break;
4278
4279 case KEY_NEED_READ:
4280 case KEY_NEED_SEARCH:
4281 case KEY_NEED_USE:
4282 case KEY_NEED_WATCH:
4283 request |= MAY_READ;
4284 break;
4285
4286 case KEY_NEED_SET_TIMEOUT:
4287 request |= MAY_WRITE;
4288 auth_can_override = true;
4289 break;
4290
4291 case KEY_NEED_UNLINK:
4292 return 0; /* Mustn't prevent this; KEY_FLAG_KEEP is already
4293 * dealt with. */
4294
4295 default:
4296 WARN_ON(1);
4297 return -EINVAL;
4298 }
4299
4300 /* Just allow the operation if the process has an authorisation token.
4301 * The presence of the token means that the kernel delegated
4302 * instantiation of a key to the process - which is problematic if we
4303 * then say that the process isn't allowed to get the description of
4304 * the key or actually instantiate it.
4305 */
4306 if (auth_can_override && cred->request_key_auth) {
4307 struct request_key_auth *rka =
4308 cred->request_key_auth->payload.data[0];
> 4309 if (rka->target_key == key)
> 4310 *_perm = 0;
4311 }
4312
4313 if (smack_privileged_cred(CAP_MAC_OVERRIDE, cred))
4314 return 0;
4315
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
Re: [PATCH net-next 2/4] net: dsa: Add wrappers for overloaded ndo_ops
by Florian Fainelli
On 7/18/2020 1:18 PM, Vladimir Oltean wrote:
> On Sat, Jul 18, 2020 at 11:53:52AM -0700, Florian Fainelli wrote:
>>
>>
>> On 7/17/2020 9:53 PM, kernel test robot wrote:
>>> Hi Florian,
>>>
>>> I love your patch! Perhaps something to improve:
>>>
>>> [auto build test WARNING on net-next/master]
>>>
>>> url: https://github.com/0day-ci/linux/commits/Florian-Fainelli/net-dsa-Setup-d...
>>> base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git dcc82bb0727c08f93a91fa7532b950bafa2598f2
>>> config: i386-allyesconfig (attached as .config)
>>> compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
>>> reproduce (this is a W=1 build):
>>> # save the attached .config to linux build tree
>>> make W=1 ARCH=i386
>>>
>>> If you fix the issue, kindly add following tag as appropriate
>>> Reported-by: kernel test robot <lkp(a)intel.com>
>>>
>>> All warnings (new ones prefixed by >>):
>>>
>>> In file included from drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c:18:
>>>>> include/net/dsa.h:720:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
>>> 720 | dsa_build_ndo_op(ndo_do_ioctl, struct ifreq *, ifr, int, cmd);
>>> | ^~~~~~~~~~~~~~~~
>>> include/net/dsa.h:721:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
>>> 721 | dsa_build_ndo_op(ndo_get_phys_port_name, char *, name, size_t, len);
>>> | ^~~~~~~~~~~~~~~~
>>>
>>> vim +/inline +720 include/net/dsa.h
>>
>> This is a macro invocation, not function declaration so I am not exactly
>> sure why this is a problem here? I could capitalize the macro name if
>> that avoids the compiler thinking this is a function declaration or move
>> out the static inline away from the macro invocation.
>> --
>> Florian
>
> Maybe it wants 'static inline int' and not 'static int inline'?
Oh yes indeed, thank you.
--
Florian
2 years, 2 months
drivers/video/fbdev/tdfxfb.c:1120:27: sparse: expected void
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 6cf7ccba29dcf39ab27630c383a3844078a6d5cd
commit: 80591e61a0f7e88deaada69844e4a31280c4a38f kbuild: tell sparse about the $ARCH
date: 8 months ago
config: s390-randconfig-s031-20200719 (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.2-49-g707c5017-dirty
git checkout 80591e61a0f7e88deaada69844e4a31280c4a38f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
drivers/video/fbdev/tdfxfb.c:1120:27: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *p @@ got unsigned char [noderef] [usertype] <asn:2> *cursorbase @@
>> drivers/video/fbdev/tdfxfb.c:1120:27: sparse: expected void *p
drivers/video/fbdev/tdfxfb.c:1120:27: sparse: got unsigned char [noderef] [usertype] <asn:2> *cursorbase
drivers/video/fbdev/tdfxfb.c:1131:33: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/video/fbdev/tdfxfb.c:1134:33: sparse: sparse: cast removes address space '<asn:2>' of expression
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
vim +1120 drivers/video/fbdev/tdfxfb.c
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1040
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1041 static int tdfxfb_cursor(struct fb_info *info, struct fb_cursor *cursor)
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1042 {
a807f618b62594 drivers/video/tdfxfb.c Antonino A. Daplas 2006-01-09 1043 struct tdfx_par *par = info->par;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1044 u32 vidcfg;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1045
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1046 if (!hwcursor)
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1047 return -EINVAL; /* just to force soft_cursor() call */
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1048
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1049 /* Too large of a cursor or wrong bpp :-( */
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1050 if (cursor->image.width > 64 ||
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1051 cursor->image.height > 64 ||
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1052 cursor->image.depth > 1)
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1053 return -EINVAL;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1054
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1055 vidcfg = tdfx_inl(par, VIDPROCCFG);
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1056 if (cursor->enable)
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1057 tdfx_outl(par, VIDPROCCFG, vidcfg | VIDCFG_HWCURSOR_ENABLE);
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1058 else
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1059 tdfx_outl(par, VIDPROCCFG, vidcfg & ~VIDCFG_HWCURSOR_ENABLE);
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1060
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1061 /*
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1062 * If the cursor is not be changed this means either we want the
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1063 * current cursor state (if enable is set) or we want to query what
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1064 * we can do with the cursor (if enable is not set)
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1065 */
8af1d50f7f6793 drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1066 if (!cursor->set)
8af1d50f7f6793 drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1067 return 0;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1068
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1069 /* fix cursor color - XFree86 forgets to restore it properly */
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1070 if (cursor->set & FB_CUR_SETCMAP) {
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1071 struct fb_cmap cmap = info->cmap;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1072 u32 bg_idx = cursor->image.bg_color;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1073 u32 fg_idx = cursor->image.fg_color;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1074 unsigned long bg_color, fg_color;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1075
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1076 fg_color = (((u32)cmap.red[fg_idx] & 0xff00) << 8) |
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1077 (((u32)cmap.green[fg_idx] & 0xff00) << 0) |
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1078 (((u32)cmap.blue[fg_idx] & 0xff00) >> 8);
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1079 bg_color = (((u32)cmap.red[bg_idx] & 0xff00) << 8) |
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1080 (((u32)cmap.green[bg_idx] & 0xff00) << 0) |
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1081 (((u32)cmap.blue[bg_idx] & 0xff00) >> 8);
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1082 banshee_make_room(par, 2);
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1083 tdfx_outl(par, HWCURC0, bg_color);
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1084 tdfx_outl(par, HWCURC1, fg_color);
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1085 }
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1086
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1087 if (cursor->set & FB_CUR_SETPOS) {
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1088 int x = cursor->image.dx;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1089 int y = cursor->image.dy - info->var.yoffset;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1090
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1091 x += 63;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1092 y += 63;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1093 banshee_make_room(par, 1);
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1094 tdfx_outl(par, HWCURLOC, (y << 16) + x);
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1095 }
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1096 if (cursor->set & (FB_CUR_SETIMAGE | FB_CUR_SETSHAPE)) {
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1097 /*
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1098 * Voodoo 3 and above cards use 2 monochrome cursor patterns.
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1099 * The reason is so the card can fetch 8 words at a time
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1100 * and are stored on chip for use for the next 8 scanlines.
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1101 * This reduces the number of times for access to draw the
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1102 * cursor for each screen refresh.
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1103 * Each pattern is a bitmap of 64 bit wide and 64 bit high
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1104 * (total of 8192 bits or 1024 bytes). The two patterns are
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1105 * stored in such a way that pattern 0 always resides in the
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1106 * lower half (least significant 64 bits) of a 128 bit word
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1107 * and pattern 1 the upper half. If you examine the data of
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1108 * the cursor image the graphics card uses then from the
25985edcedea63 drivers/video/tdfxfb.c Lucas De Marchi 2011-03-30 1109 * beginning you see line one of pattern 0, line one of
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1110 * pattern 1, line two of pattern 0, line two of pattern 1,
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1111 * etc etc. The linear stride for the cursor is always 16 bytes
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1112 * (128 bits) which is the maximum cursor width times two for
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1113 * the two monochrome patterns.
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1114 */
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1115 u8 __iomem *cursorbase = info->screen_base + info->fix.smem_len;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1116 u8 *bitmap = (u8 *)cursor->image.data;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1117 u8 *mask = (u8 *)cursor->mask;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1118 int i;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1119
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 @1120 fb_memset(cursorbase, 0, 1024);
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1121
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1122 for (i = 0; i < cursor->image.height; i++) {
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1123 int h = 0;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1124 int j = (cursor->image.width + 7) >> 3;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1125
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1126 for (; j > 0; j--) {
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1127 u8 data = *mask ^ *bitmap;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1128 if (cursor->rop == ROP_COPY)
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1129 data = *mask & *bitmap;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1130 /* Pattern 0. Copy the cursor mask to it */
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1131 fb_writeb(*mask, cursorbase + h);
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1132 mask++;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1133 /* Pattern 1. Copy the cursor bitmap to it */
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1134 fb_writeb(data, cursorbase + h + 8);
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1135 bitmap++;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1136 h++;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1137 }
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1138 cursorbase += 16;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1139 }
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1140 }
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1141 return 0;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1142 }
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1143
:::::: The code at line 1120 was first introduced by commit
:::::: 90b0f08536531abbbe7b5d4944792da08cadde01 tdfxfb: hardware cursor
:::::: TO: Krzysztof Helt <krzysztof.h1(a)wp.pl>
:::::: CC: Linus Torvalds <torvalds(a)woody.linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[sashal-linux-stable:queue-4.9 52/53] drivers/firmware/efi/arm-init.c:338:7: error: implicit declaration of function 'device_link_add'; did you mean
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-4.9
head: 44b74c863d8a247e91d821d3383191e022c534f3
commit: cff5a08a72f64cc9fb3191a87903955fa0e2cf7f [52/53] efi/arm: Defer probe of PCIe backed efifb on DT systems
config: arm-defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 7.5.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
git checkout cff5a08a72f64cc9fb3191a87903955fa0e2cf7f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-7.5.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
drivers/firmware/efi/arm-init.c: In function 'efifb_add_links':
drivers/firmware/efi/arm-init.c:322:12: error: implicit declaration of function 'get_dev_from_fwnode'; did you mean 'set_primary_fwnode'? [-Werror=implicit-function-declaration]
sup_dev = get_dev_from_fwnode(&sup_np->fwnode);
^~~~~~~~~~~~~~~~~~~
set_primary_fwnode
drivers/firmware/efi/arm-init.c:322:10: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
sup_dev = get_dev_from_fwnode(&sup_np->fwnode);
^
>> drivers/firmware/efi/arm-init.c:338:7: error: implicit declaration of function 'device_link_add'; did you mean 'device_add'? [-Werror=implicit-function-declaration]
if (!device_link_add(dev, sup_dev, 0))
^~~~~~~~~~~~~~~
device_add
drivers/firmware/efi/arm-init.c: At top level:
>> drivers/firmware/efi/arm-init.c:346:21: error: variable 'efifb_fwnode_ops' has initializer but incomplete type
static const struct fwnode_operations efifb_fwnode_ops = {
^~~~~~~~~~~~~~~~~
drivers/firmware/efi/arm-init.c:347:3: error: 'const struct fwnode_operations' has no member named 'add_links'
.add_links = efifb_add_links,
^~~~~~~~~
>> drivers/firmware/efi/arm-init.c:347:15: warning: excess elements in struct initializer
.add_links = efifb_add_links,
^~~~~~~~~~~~~~~
drivers/firmware/efi/arm-init.c:347:15: note: (near initialization for 'efifb_fwnode_ops')
>> drivers/firmware/efi/arm-init.c:351:3: error: 'struct fwnode_handle' has no member named 'ops'
.ops = &efifb_fwnode_ops,
^~~
>> drivers/firmware/efi/arm-init.c:351:9: error: incompatible types when initializing type 'enum fwnode_type' using type 'const struct fwnode_operations *'
.ops = &efifb_fwnode_ops,
^
>> drivers/firmware/efi/arm-init.c:346:39: error: storage size of 'efifb_fwnode_ops' isn't known
static const struct fwnode_operations efifb_fwnode_ops = {
^~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +338 drivers/firmware/efi/arm-init.c
299
300 /*
301 * If the efifb framebuffer is backed by a PCI graphics controller, we have
302 * to ensure that this relation is expressed using a device link when
303 * running in DT mode, or the probe order may be reversed, resulting in a
304 * resource reservation conflict on the memory window that the efifb
305 * framebuffer steals from the PCIe host bridge.
306 */
307 static int efifb_add_links(const struct fwnode_handle *fwnode,
308 struct device *dev)
309 {
310 struct device_node *sup_np;
311 struct device *sup_dev;
312
313 sup_np = find_pci_overlap_node();
314
315 /*
316 * If there's no PCI graphics controller backing the efifb, we are
317 * done here.
318 */
319 if (!sup_np)
320 return 0;
321
322 sup_dev = get_dev_from_fwnode(&sup_np->fwnode);
323 of_node_put(sup_np);
324
325 /*
326 * Return -ENODEV if the PCI graphics controller device hasn't been
327 * registered yet. This ensures that efifb isn't allowed to probe
328 * and this function is retried again when new devices are
329 * registered.
330 */
331 if (!sup_dev)
332 return -ENODEV;
333
334 /*
335 * If this fails, retrying this function at a later point won't
336 * change anything. So, don't return an error after this.
337 */
> 338 if (!device_link_add(dev, sup_dev, 0))
339 dev_warn(dev, "device_link_add() failed\n");
340
341 put_device(sup_dev);
342
343 return 0;
344 }
345
> 346 static const struct fwnode_operations efifb_fwnode_ops = {
> 347 .add_links = efifb_add_links,
348 };
349
350 static struct fwnode_handle efifb_fwnode = {
> 351 .ops = &efifb_fwnode_ops,
352 };
353
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[hverkuil-media:tegrav3 23/30] drivers/media/i2c/imx274.c:1864:10: warning: variable 'ret' is uninitialized when used here
by kernel test robot
tree: git://linuxtv.org/hverkuil/media_tree.git tegrav3
head: a5858ebb6c4654422918c45ebeb72d824b58efe6
commit: 1c9ebe202e1ddbbd66449325fbd083162ed5cd27 [23/30] media: i2c: Add support for IMX274 supplies and external clock
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ed6b578040a85977026c93bf4188f996148f3218)
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
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout 1c9ebe202e1ddbbd66449325fbd083162ed5cd27
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/media/i2c/imx274.c:1864:10: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
return ret;
^~~
drivers/media/i2c/imx274.c:1852:9: note: initialize the variable 'ret' to silence this warning
int ret;
^
= 0
1 warning generated.
vim +/ret +1864 drivers/media/i2c/imx274.c
1847
1848 static int imx274_probe(struct i2c_client *client)
1849 {
1850 struct v4l2_subdev *sd;
1851 struct stimx274 *imx274;
1852 int ret;
1853
1854 /* initialize imx274 */
1855 imx274 = devm_kzalloc(&client->dev, sizeof(*imx274), GFP_KERNEL);
1856 if (!imx274)
1857 return -ENOMEM;
1858
1859 mutex_init(&imx274->lock);
1860
1861 imx274->xclk = devm_clk_get(&client->dev, "xclk");
1862 if (IS_ERR(imx274->xclk)) {
1863 dev_err(&client->dev, "Failed to get xclk\n");
> 1864 return ret;
1865 }
1866
1867 ret = clk_set_rate(imx274->xclk, IMX274_DEFAULT_CLK_FREQ);
1868 if (ret < 0) {
1869 dev_err(&client->dev, "Failed to set xclk rate\n");
1870 return ret;
1871 }
1872
1873 ret = imx274_get_regulators(&client->dev, imx274);
1874 if (ret) {
1875 dev_err(&client->dev, "Failed to get power regulators, err: %d\n", ret);
1876 return ret;
1877 }
1878
1879 /* initialize format */
1880 imx274->mode = &imx274_modes[IMX274_DEFAULT_BINNING];
1881 imx274->crop.width = IMX274_MAX_WIDTH;
1882 imx274->crop.height = IMX274_MAX_HEIGHT;
1883 imx274->format.width = imx274->crop.width / imx274->mode->bin_ratio;
1884 imx274->format.height = imx274->crop.height / imx274->mode->bin_ratio;
1885 imx274->format.field = V4L2_FIELD_NONE;
1886 imx274->format.code = MEDIA_BUS_FMT_SRGGB10_1X10;
1887 imx274->format.colorspace = V4L2_COLORSPACE_SRGB;
1888 imx274->frame_interval.numerator = 1;
1889 imx274->frame_interval.denominator = IMX274_DEF_FRAME_RATE;
1890
1891 /* initialize regmap */
1892 imx274->regmap = devm_regmap_init_i2c(client, &imx274_regmap_config);
1893 if (IS_ERR(imx274->regmap)) {
1894 dev_err(&client->dev,
1895 "regmap init failed: %ld\n", PTR_ERR(imx274->regmap));
1896 ret = -ENODEV;
1897 goto err_regmap;
1898 }
1899
1900 /* initialize subdevice */
1901 imx274->client = client;
1902 sd = &imx274->sd;
1903 v4l2_i2c_subdev_init(sd, client, &imx274_subdev_ops);
1904 sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
1905
1906 /* initialize subdev media pad */
1907 imx274->pad.flags = MEDIA_PAD_FL_SOURCE;
1908 sd->entity.function = MEDIA_ENT_F_CAM_SENSOR;
1909 ret = media_entity_pads_init(&sd->entity, 1, &imx274->pad);
1910 if (ret < 0) {
1911 dev_err(&client->dev,
1912 "%s : media entity init Failed %d\n", __func__, ret);
1913 goto err_regmap;
1914 }
1915
1916 /* initialize sensor reset gpio */
1917 imx274->reset_gpio = devm_gpiod_get_optional(&client->dev, "reset",
1918 GPIOD_OUT_HIGH);
1919 if (IS_ERR(imx274->reset_gpio)) {
1920 if (PTR_ERR(imx274->reset_gpio) != -EPROBE_DEFER)
1921 dev_err(&client->dev, "Reset GPIO not setup in DT");
1922 ret = PTR_ERR(imx274->reset_gpio);
1923 goto err_me;
1924 }
1925
1926 /* initialize controls */
1927 ret = v4l2_ctrl_handler_init(&imx274->ctrls.handler, 4);
1928 if (ret < 0) {
1929 dev_err(&client->dev,
1930 "%s : ctrl handler init Failed\n", __func__);
1931 goto err_me;
1932 }
1933
1934 imx274->ctrls.handler.lock = &imx274->lock;
1935
1936 /* add new controls */
1937 imx274->ctrls.test_pattern = v4l2_ctrl_new_std_menu_items(
1938 &imx274->ctrls.handler, &imx274_ctrl_ops,
1939 V4L2_CID_TEST_PATTERN,
1940 ARRAY_SIZE(tp_qmenu) - 1, 0, 0, tp_qmenu);
1941
1942 imx274->ctrls.gain = v4l2_ctrl_new_std(
1943 &imx274->ctrls.handler,
1944 &imx274_ctrl_ops,
1945 V4L2_CID_GAIN, IMX274_MIN_GAIN,
1946 IMX274_MAX_DIGITAL_GAIN * IMX274_MAX_ANALOG_GAIN, 1,
1947 IMX274_DEF_GAIN);
1948
1949 imx274->ctrls.exposure = v4l2_ctrl_new_std(
1950 &imx274->ctrls.handler,
1951 &imx274_ctrl_ops,
1952 V4L2_CID_EXPOSURE, IMX274_MIN_EXPOSURE_TIME,
1953 1000000 / IMX274_DEF_FRAME_RATE, 1,
1954 IMX274_MIN_EXPOSURE_TIME);
1955
1956 imx274->ctrls.vflip = v4l2_ctrl_new_std(
1957 &imx274->ctrls.handler,
1958 &imx274_ctrl_ops,
1959 V4L2_CID_VFLIP, 0, 1, 1, 0);
1960
1961 imx274->sd.ctrl_handler = &imx274->ctrls.handler;
1962 if (imx274->ctrls.handler.error) {
1963 ret = imx274->ctrls.handler.error;
1964 goto err_ctrls;
1965 }
1966
1967 /* power on the sensor */
1968 ret = imx274_power_on(&client->dev);
1969 if (ret < 0) {
1970 dev_err(&client->dev,
1971 "%s : imx274 power on failed\n", __func__);
1972 goto err_ctrls;
1973 }
1974
1975 /* setup default controls */
1976 ret = v4l2_ctrl_handler_setup(&imx274->ctrls.handler);
1977 if (ret) {
1978 dev_err(&client->dev,
1979 "Error %d setup default controls\n", ret);
1980 goto err_power_off;
1981 }
1982
1983 /* load default control values */
1984 ret = imx274_load_default(imx274);
1985 if (ret) {
1986 dev_err(&client->dev,
1987 "%s : imx274_load_default failed %d\n",
1988 __func__, ret);
1989 goto err_power_off;
1990 }
1991
1992 /* register subdevice */
1993 ret = v4l2_async_register_subdev(sd);
1994 if (ret < 0) {
1995 dev_err(&client->dev,
1996 "%s : v4l2_async_register_subdev failed %d\n",
1997 __func__, ret);
1998 goto err_power_off;
1999 }
2000
2001 dev_info(&client->dev, "imx274 : imx274 probe success !\n");
2002 return 0;
2003
2004 err_power_off:
2005 imx274_power_off(&client->dev);
2006 err_ctrls:
2007 v4l2_ctrl_handler_free(&imx274->ctrls.handler);
2008 err_me:
2009 media_entity_cleanup(&sd->entity);
2010 err_regmap:
2011 mutex_destroy(&imx274->lock);
2012 return ret;
2013 }
2014
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[android-common:android-trusty-5.4 2/32] drivers/trusty/trusty.c:37:5: error: redefinition of 'trusty_fast_call32'
by kernel test robot
tree: https://android.googlesource.com/kernel/common android-trusty-5.4
head: 055ccbe92295978be3d8d20275b35b5e8779664d
commit: f96574c5bf1e925b1c511416914d9c1b666b34fd [2/32] ANDROID: trusty: Add trusty driver
config: arm-allmodconfig (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
git checkout f96574c5bf1e925b1c511416914d9c1b666b34fd
# 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(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/trusty/trusty.c:37:5: error: redefinition of 'trusty_fast_call32'
37 | s32 trusty_fast_call32(struct device *dev, u32 smcnr, u32 a0, u32 a1, u32 a2)
| ^~~~~~~~~~~~~~~~~~
In file included from drivers/trusty/trusty.c:24:
include/linux/trusty/trusty.h:32:19: note: previous definition of 'trusty_fast_call32' was here
32 | static inline s32 trusty_fast_call32(struct device *dev, u32 smcnr,
| ^~~~~~~~~~~~~~~~~~
drivers/trusty/trusty.c: In function 'trusty_std_call_helper':
drivers/trusty/trusty.c:88:23: warning: unused variable 's' [-Wunused-variable]
88 | struct trusty_state *s = platform_get_drvdata(to_platform_device(dev));
| ^
drivers/trusty/trusty.c: At top level:
>> drivers/trusty/trusty.c:116:5: error: redefinition of 'trusty_std_call32'
116 | s32 trusty_std_call32(struct device *dev, u32 smcnr, u32 a0, u32 a1, u32 a2)
| ^~~~~~~~~~~~~~~~~
In file included from drivers/trusty/trusty.c:24:
include/linux/trusty/trusty.h:27:19: note: previous definition of 'trusty_std_call32' was here
27 | static inline s32 trusty_std_call32(struct device *dev, u32 smcnr,
| ^~~~~~~~~~~~~~~~~
vim +/trusty_fast_call32 +37 drivers/trusty/trusty.c
> 24 #include <linux/trusty/trusty.h>
25
26 #include "trusty-smc.h"
27
28 struct trusty_state {
29 struct mutex smc_lock;
30 };
31
32 static inline ulong smc(ulong r0, ulong r1, ulong r2, ulong r3)
33 {
34 return trusty_smc8(r0, r1, r2, r3, 0, 0, 0, 0).r0;
35 }
36
> 37 s32 trusty_fast_call32(struct device *dev, u32 smcnr, u32 a0, u32 a1, u32 a2)
38 {
39 struct trusty_state *s = platform_get_drvdata(to_platform_device(dev));
40
41 BUG_ON(!s);
42 BUG_ON(!SMC_IS_FASTCALL(smcnr));
43 BUG_ON(SMC_IS_SMC64(smcnr));
44
45 return smc(smcnr, a0, a1, a2);
46 }
47 EXPORT_SYMBOL(trusty_fast_call32);
48
49 #ifdef CONFIG_64BIT
50 s64 trusty_fast_call64(struct device *dev, u64 smcnr, u64 a0, u64 a1, u64 a2)
51 {
52 struct trusty_state *s = platform_get_drvdata(to_platform_device(dev));
53
54 BUG_ON(!s);
55 BUG_ON(!SMC_IS_FASTCALL(smcnr));
56 BUG_ON(!SMC_IS_SMC64(smcnr));
57
58 return smc(smcnr, a0, a1, a2);
59 }
60 #endif
61
62 static ulong trusty_std_call_inner(struct device *dev, ulong smcnr,
63 ulong a0, ulong a1, ulong a2)
64 {
65 ulong ret;
66 int retry = 5;
67
68 dev_dbg(dev, "%s(0x%lx 0x%lx 0x%lx 0x%lx)\n",
69 __func__, smcnr, a0, a1, a2);
70 while (true) {
71 ret = smc(smcnr, a0, a1, a2);
72 if ((int)ret != SM_ERR_BUSY || !retry)
73 break;
74
75 dev_dbg(dev, "%s(0x%lx 0x%lx 0x%lx 0x%lx) returned busy, retry\n",
76 __func__, smcnr, a0, a1, a2);
77 retry--;
78 }
79
80 return ret;
81 }
82
83 static ulong trusty_std_call_helper(struct device *dev, ulong smcnr,
84 ulong a0, ulong a1, ulong a2)
85 {
86 ulong ret;
87 int sleep_time = 1;
88 struct trusty_state *s = platform_get_drvdata(to_platform_device(dev));
89
90 while (true) {
91 ret = trusty_std_call_inner(dev, smcnr, a0, a1, a2);
92 if ((int)ret != SM_ERR_BUSY)
93 break;
94
95 if (sleep_time == 256)
96 dev_warn(dev, "%s(0x%lx 0x%lx 0x%lx 0x%lx) returned busy\n",
97 __func__, smcnr, a0, a1, a2);
98 dev_dbg(dev, "%s(0x%lx 0x%lx 0x%lx 0x%lx) returned busy, wait %d ms\n",
99 __func__, smcnr, a0, a1, a2, sleep_time);
100
101 msleep(sleep_time);
102 if (sleep_time < 1000)
103 sleep_time <<= 1;
104
105 dev_dbg(dev, "%s(0x%lx 0x%lx 0x%lx 0x%lx) retry\n",
106 __func__, smcnr, a0, a1, a2);
107 }
108
109 if (sleep_time > 256)
110 dev_warn(dev, "%s(0x%lx 0x%lx 0x%lx 0x%lx) busy cleared\n",
111 __func__, smcnr, a0, a1, a2);
112
113 return ret;
114 }
115
> 116 s32 trusty_std_call32(struct device *dev, u32 smcnr, u32 a0, u32 a1, u32 a2)
117 {
118 int ret;
119 struct trusty_state *s = platform_get_drvdata(to_platform_device(dev));
120
121 BUG_ON(SMC_IS_FASTCALL(smcnr));
122 BUG_ON(SMC_IS_SMC64(smcnr));
123
124 mutex_lock(&s->smc_lock);
125
126 dev_dbg(dev, "%s(0x%x 0x%x 0x%x 0x%x) started\n",
127 __func__, smcnr, a0, a1, a2);
128
129 ret = trusty_std_call_helper(dev, smcnr, a0, a1, a2);
130 while (ret == SM_ERR_INTERRUPTED) {
131 dev_dbg(dev, "%s(0x%x 0x%x 0x%x 0x%x) interrupted\n",
132 __func__, smcnr, a0, a1, a2);
133 ret = trusty_std_call_helper(dev, SMC_SC_RESTART_LAST, 0, 0, 0);
134 }
135 dev_dbg(dev, "%s(0x%x 0x%x 0x%x 0x%x) returned 0x%x\n",
136 __func__, smcnr, a0, a1, a2, ret);
137
138 WARN_ONCE(ret == SM_ERR_PANIC, "trusty crashed");
139
140 mutex_unlock(&s->smc_lock);
141
142 return ret;
143 }
144 EXPORT_SYMBOL(trusty_std_call32);
145
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[jwboyer-fedora:f32 75/77] drivers/pci/controller/dwc/pcie-tegra194.c:255:27: warning: unused variable 'pcie_gen_freq'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git f32
head: d81b6dcf0ebd93fb2fd94eaf2826e720bec51672
commit: 5e67662f8c317f56fb31746a20692f4f5dfbfaf0 [75/77] PCI: Add MCFG quirks for Tegra194 host controllers
config: arm64-randconfig-r004-20200716 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ed6b578040a85977026c93bf4188f996148f3218)
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
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
git checkout 5e67662f8c317f56fb31746a20692f4f5dfbfaf0
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/pci/controller/dwc/pcie-tegra194.c:255:27: warning: unused variable 'pcie_gen_freq' [-Wunused-const-variable]
static const unsigned int pcie_gen_freq[] = {
^
drivers/pci/controller/dwc/pcie-tegra194.c:262:18: warning: unused variable 'event_cntr_ctrl_offset' [-Wunused-const-variable]
static const u32 event_cntr_ctrl_offset[] = {
^
drivers/pci/controller/dwc/pcie-tegra194.c:271:18: warning: unused variable 'event_cntr_data_offset' [-Wunused-const-variable]
static const u32 event_cntr_data_offset[] = {
^
3 warnings generated.
vim +/pcie_gen_freq +255 drivers/pci/controller/dwc/pcie-tegra194.c
c57247f940e8ea Vidya Sagar 2020-03-03 254
56e15a238d9278 Vidya Sagar 2019-08-13 @255 static const unsigned int pcie_gen_freq[] = {
56e15a238d9278 Vidya Sagar 2019-08-13 256 GEN1_CORE_CLK_FREQ,
56e15a238d9278 Vidya Sagar 2019-08-13 257 GEN2_CORE_CLK_FREQ,
56e15a238d9278 Vidya Sagar 2019-08-13 258 GEN3_CORE_CLK_FREQ,
56e15a238d9278 Vidya Sagar 2019-08-13 259 GEN4_CORE_CLK_FREQ
56e15a238d9278 Vidya Sagar 2019-08-13 260 };
56e15a238d9278 Vidya Sagar 2019-08-13 261
:::::: The code at line 255 was first introduced by commit
:::::: 56e15a238d92788a2d09e0c5c26a5de1b3156931 PCI: tegra: Add Tegra194 PCIe support
:::::: TO: Vidya Sagar <vidyas(a)nvidia.com>
:::::: CC: Lorenzo Pieralisi <lorenzo.pieralisi(a)arm.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months