New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 788882 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug


Show other hotlists

Hotlists containing this issue:
Hotlist-1


Sign in to add a comment

img_rogue 1.8/1.9 code problems reported by static analyzers

Project Member Reported by groeck@chromium.org, Nov 27 2017

Issue description

Reported by 0day build system.

drivers/gpu/drm/img-rogue/1.8/devicemem.c:2181:14-20: Unneeded variable: "eError". Return "PVRSRV_OK" on line 2185 
drivers/gpu/drm/img-rogue/1.8/mt8173/mt8173_sysconfig.c:287:3-43: code aligned with following code on line 289 
drivers/gpu/drm/img-rogue/1.8/osfunc.c:1243:1-11: Use setup_timer function for function on line 1246. 
drivers/gpu/drm/img-rogue/1.8/pdump_common.c:1407:14-20: Unneeded variable: "eError". Return "PVRSRV_OK" on line 1423 
drivers/gpu/drm/img-rogue/1.8/pdump_common.c:2267:14-18: Unneeded variable: "eErr". Return "PVRSRV_OK" on line 2274 
drivers/gpu/drm/img-rogue/1.9/cache_km.c:1848:1: sparse: directive in argument list 
drivers/gpu/drm/img-rogue/1.9/rgxdebug.c:2511:15: sparse: too many errors 
drivers/gpu/drm/img-rogue/1.9/rgxta3d.c:4321:1: sparse: directive in argument list


 
Cc: bhthompson@chromium.org oak-img@chromium.org
Owner: bhthompson@chromium.org
Status: Assigned (was: Untriaged)
Note that this is on chromeos-4.4 (based on applied labels).
Owner: groeck@chromium.org
Guenter, how do we run this analysis?

The one line shows there are too many errors, is there a verbose mode or some such in this tool that can list the actual errors?

Comment 3 by groeck@chromium.org, Nov 28 2017

#2: The data is provided by 0day - see 
https://groups.google.com/forum/#!forum/cros-kernel-buildreports for results.
The message you refer to is from sparse, so it should be easy to reproduce by running sparse on the code.

Doing that with the affected file I get

drivers/gpu/drm/img-rogue/1.9/rgxdebug.c: In function ‘_RGXDecodeBIFReqTags’:
drivers/gpu/drm/img-rogue/1.9/rgxdebug.c:978:15: warning: this statement may fall through [-Wimplicit-fallthrough=]
       }else if(6 == psDevInfo->sDevFeatureCfg.ui32NumClusters)
               ^
drivers/gpu/drm/img-rogue/1.9/rgxdebug.c:982:6: note: here
      case 0x6:
      ^~~~
drivers/gpu/drm/img-rogue/1.9/rgxdebug.c:983:9: warning: this statement may fall through [-Wimplicit-fallthrough=]
       if(6 == psDevInfo->sDevFeatureCfg.ui32NumClusters)
         ^
drivers/gpu/drm/img-rogue/1.9/rgxdebug.c:987:6: note: here
      case 0x7:

Yoda programming someone must like.

plus a lot of

drivers/gpu/drm/img-rogue/1.9/rgx_fwif_shared.h:403:15: error: Expected ) in function declarator
drivers/gpu/drm/img-rogue/1.9/rgx_fwif_shared.h:403:15: error: got 14

which I guess means that sparse gets confused by static_assert() and doesn't recognize it as special. AFAICS this causes the "too many errors" bailout.

Command line:

make ARCH=xxx CROSS_COMPILE=yyy W=1 C=1 CHECK=sparse drivers/gpu/drm/img-rogue/1.9/rgxdebug.o

Comment 4 by groeck@chromium.org, Nov 29 2017

Owner: ----
Status: Available (was: Assigned)
Hi Guenter, it looks like Sparse 0.5.0 is being used. This version is pretty old (it was released back in 2014) and it complains about some things that it doesn't understand, e.g. static asserts. With this version, I see ~7000 error/warning lines when running it against the 1.9 img-rogue driver. However, if I use Sparse 0.5.1 I see ~500. Is it possible to upgrade to this newer version?
This is from 0day; I'll relay your feedback. Overall, though, I would suggest to ignore the noise and focus on any real problems (ie it would be pointless to fix the issues reported in 1.8). Also, if there is real noise even with the latest sparse release, we can get in touch with the sparse maintainer and ask him to fix the problem on his side.


Project Member

Comment 7 by bugdroid1@chromium.org, Dec 13 2017

Labels: merge-merged-chromeos-4.4
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/eeaaada448e0d4c619fdede9ed6445ea4bb0a027

commit eeaaada448e0d4c619fdede9ed6445ea4bb0a027
Author: Frank Binns <frank.binns@imgtec.com>
Date: Wed Dec 13 20:33:09 2017

CHROMIUM: drm/img-rogue/1.9: add missing void parameter to some functions

Fixes sparse warnings such as:
    warning: non-ANSI function declaration of function 'PMRInit'

BUG= chromium:788882 
TEST=Run the following command before and after this commit and
     compare the results:
     $ `make C=2 CHECK=sparse drivers/gpu/drm/img-rogue/1.9/pvrsrvkm_1_9.ko`

Change-Id: I1f820c1195295d867ee57ee8994a3edc1002a4fd
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-on: https://chromium-review.googlesource.com/816837
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/eeaaada448e0d4c619fdede9ed6445ea4bb0a027/drivers/gpu/drm/img-rogue/1.9/pvrsrv.c
[modify] https://crrev.com/eeaaada448e0d4c619fdede9ed6445ea4bb0a027/drivers/gpu/drm/img-rogue/1.9/pmr.c
[modify] https://crrev.com/eeaaada448e0d4c619fdede9ed6445ea4bb0a027/drivers/gpu/drm/img-rogue/1.9/rgxhwperf.c
[modify] https://crrev.com/eeaaada448e0d4c619fdede9ed6445ea4bb0a027/drivers/gpu/drm/img-rogue/1.9/pvr_gputrace.c

Project Member

Comment 8 by bugdroid1@chromium.org, Dec 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/326278e18df8f69da151adff380d5cac387f6fb1

commit 326278e18df8f69da151adff380d5cac387f6fb1
Author: Frank Binns <frank.binns@imgtec.com>
Date: Wed Dec 13 20:33:10 2017

CHROMIUM: drm/img-rogue/1.9: remove extern from some function definitions

Fixes sparse warnings such as:
    warning: function 'PMRPDumpPol32' with external linkage has definition

BUG= chromium:788882 
TEST=Run the following command before and after this commit and
     compare the results:
     $ `make C=2 CHECK=sparse drivers/gpu/drm/img-rogue/1.9/pvrsrvkm_1_9.ko`

Change-Id: I3267de987df9a6ff5dd748d9cd99d24e92cad73a
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-on: https://chromium-review.googlesource.com/816838
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/326278e18df8f69da151adff380d5cac387f6fb1/drivers/gpu/drm/img-rogue/1.9/pmr.c

Project Member

Comment 9 by bugdroid1@chromium.org, Dec 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/a2188a1a73114d205513222002b50f02eacbb157

commit a2188a1a73114d205513222002b50f02eacbb157
Author: Frank Binns <frank.binns@imgtec.com>
Date: Wed Dec 13 20:33:12 2017

CHROMIUM: drm/img-rogue/1.9: make some global variables static

Fixes some sparse warnings, such as:
    warning: symbol 'g_hStatsLock' was not declared. Should it be static?

BUG= chromium:788882 
TEST=Run the following command before and after this commit and
     compare the results:
     $ `make C=2 CHECK=sparse drivers/gpu/drm/img-rogue/1.9/pvrsrvkm_1_9.ko`

Change-Id: I47024ad6426e652c8a07c4ac1dd90a9898985f96
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-on: https://chromium-review.googlesource.com/816839
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/a2188a1a73114d205513222002b50f02eacbb157/drivers/gpu/drm/img-rogue/1.9/rgxinit.c
[modify] https://crrev.com/a2188a1a73114d205513222002b50f02eacbb157/drivers/gpu/drm/img-rogue/1.9/km/rgx_bvnc_table_km.h
[modify] https://crrev.com/a2188a1a73114d205513222002b50f02eacbb157/drivers/gpu/drm/img-rogue/1.9/rgxdebug.c
[modify] https://crrev.com/a2188a1a73114d205513222002b50f02eacbb157/drivers/gpu/drm/img-rogue/1.9/rgxhwperf.c
[modify] https://crrev.com/a2188a1a73114d205513222002b50f02eacbb157/drivers/gpu/drm/img-rogue/1.9/srvcore.c

Project Member

Comment 10 by bugdroid1@chromium.org, Dec 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/2d148dd1193d5b29748ddf332b190ee42c690445

commit 2d148dd1193d5b29748ddf332b190ee42c690445
Author: Frank Binns <frank.binns@imgtec.com>
Date: Wed Dec 13 20:33:13 2017

CHROMIUM: drm/img-rogue/1.9: fix function pointer parameter type

Fixes sparse warning:
    warning: incorrect type in initializer (incompatible argument 1 (different signedness))
        expected int enum PVRSRV_ERROR ( *pfnVMMConfigure )( ... )
        got int enum PVRSRV_ERROR ( *<noident> )( ... )

BUG= chromium:788882 
TEST=Run the following command before and after this commit and
     compare the results:
     $ `make C=2 CHECK=sparse drivers/gpu/drm/img-rogue/1.9/pvrsrvkm_1_9.ko`

Change-Id: I67c6131fb3aabd966b84bd58d1de7d9361356201
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-on: https://chromium-review.googlesource.com/816840
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/2d148dd1193d5b29748ddf332b190ee42c690445/drivers/gpu/drm/img-rogue/1.9/system/vmm_impl.h

Project Member

Comment 11 by bugdroid1@chromium.org, Dec 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/e00c9cbc8d316fb0606e7ebd87be6b0fd66650ba

commit e00c9cbc8d316fb0606e7ebd87be6b0fd66650ba
Author: Frank Binns <frank.binns@imgtec.com>
Date: Wed Dec 13 20:33:15 2017

CHROMIUM: drm/img-rogue/1.9: replace interger literal with named version

Fixes a sparse warning:
    warning: constant 0xFFFFFFFFFFFFFFFF is so big it is unsigned long

BUG= chromium:788882 
TEST=Run the following command before and after this commit and
     compare the results:
     $ `make C=2 CHECK=sparse drivers/gpu/drm/img-rogue/1.9/pvrsrvkm_1_9.ko`

Change-Id: I9e0c14c9be28b76b122e0be7e6ab079147b88804
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-on: https://chromium-review.googlesource.com/816841
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/e00c9cbc8d316fb0606e7ebd87be6b0fd66650ba/drivers/gpu/drm/img-rogue/1.9/handle.c

Project Member

Comment 12 by bugdroid1@chromium.org, Dec 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/586840f4d089c948080e34e268eed560b7d7aa78

commit 586840f4d089c948080e34e268eed560b7d7aa78
Author: Frank Binns <frank.binns@imgtec.com>
Date: Wed Dec 13 20:33:16 2017

CHROMIUM: drm/img-rogue/1.9: add some missing ULL suffixes

Fixes some sparse warnings:
    warning: constant 0xCAFEF00DDEADBEEF is so big it is unsigned long

BUG= chromium:788882 
TEST=Run the following command before and after this commit and
     compare the results:
     $ `make C=2 CHECK=sparse drivers/gpu/drm/img-rogue/1.9/pvrsrvkm_1_9.ko`

Change-Id: I9733f16021229102819daa702105b79b4c76e1b2
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-on: https://chromium-review.googlesource.com/816842
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/586840f4d089c948080e34e268eed560b7d7aa78/drivers/gpu/drm/img-rogue/1.9/physmem_osmem_linux.c
[modify] https://crrev.com/586840f4d089c948080e34e268eed560b7d7aa78/drivers/gpu/drm/img-rogue/1.9/rgxsrvinit.c
[modify] https://crrev.com/586840f4d089c948080e34e268eed560b7d7aa78/drivers/gpu/drm/img-rogue/1.9/cache_km.c

Project Member

Comment 13 by bugdroid1@chromium.org, Dec 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/b3aae03e227382e842d4e5a179d381bbcfd14419

commit b3aae03e227382e842d4e5a179d381bbcfd14419
Author: Frank Binns <frank.binns@imgtec.com>
Date: Wed Dec 13 20:33:17 2017

CHROMIUM: drm/img-rogue/1.9: use IMG_UINT64_C for integers stored as IMG_UINT64

Fixes many sparse warnings, such as:
    warning: constant 0x0001000000020000 is so big it is long

BUG= chromium:788882 
TEST=Run the following command before and after this commit and
     compare the results:
     $ `make C=2 CHECK=sparse drivers/gpu/drm/img-rogue/1.9/pvrsrvkm_1_9.ko`

Change-Id: I6fd89f4f977c5653a253a94031309ee9bbc3d1a1
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-on: https://chromium-review.googlesource.com/816843
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/b3aae03e227382e842d4e5a179d381bbcfd14419/drivers/gpu/drm/img-rogue/1.9/km/rgx_bvnc_table_km.h

Project Member

Comment 14 by bugdroid1@chromium.org, Dec 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/a475896726bf058956697e99d38b918c49b825d9

commit a475896726bf058956697e99d38b918c49b825d9
Author: Frank Binns <frank.binns@imgtec.com>
Date: Wed Dec 13 20:33:19 2017

CHROMIUM: drm/img-rogue/1.9: replace some 0s with NULLs

Fixes many sparse warnings of the type:
    warning: Using plain integer as NULL pointer

BUG= chromium:788882 
TEST=Run the following command before and after this commit and
     compare the results:
	 $ `make C=2 CHECK=sparse drivers/gpu/drm/img-rogue/1.9/pvrsrvkm_1_9.ko`

Change-Id: I8418abcedcd382f6fd3db4c974f89a59ef03db35
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-on: https://chromium-review.googlesource.com/816844
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/a475896726bf058956697e99d38b918c49b825d9/drivers/gpu/drm/img-rogue/1.9/htbuffer.h
[modify] https://crrev.com/a475896726bf058956697e99d38b918c49b825d9/drivers/gpu/drm/img-rogue/1.9/dbgdriv.c
[modify] https://crrev.com/a475896726bf058956697e99d38b918c49b825d9/drivers/gpu/drm/img-rogue/1.9/rgxccb.c
[modify] https://crrev.com/a475896726bf058956697e99d38b918c49b825d9/drivers/gpu/drm/img-rogue/1.9/dllist.h
[modify] https://crrev.com/a475896726bf058956697e99d38b918c49b825d9/drivers/gpu/drm/img-rogue/1.9/pdump_mmu.c
[modify] https://crrev.com/a475896726bf058956697e99d38b918c49b825d9/drivers/gpu/drm/img-rogue/1.9/tlclient.c
[modify] https://crrev.com/a475896726bf058956697e99d38b918c49b825d9/drivers/gpu/drm/img-rogue/1.9/rgxinit.c
[modify] https://crrev.com/a475896726bf058956697e99d38b918c49b825d9/drivers/gpu/drm/img-rogue/1.9/rgxhwperf.c
[modify] https://crrev.com/a475896726bf058956697e99d38b918c49b825d9/drivers/gpu/drm/img-rogue/1.9/sync.c
[modify] https://crrev.com/a475896726bf058956697e99d38b918c49b825d9/drivers/gpu/drm/img-rogue/1.9/rgxfwutils.c
[modify] https://crrev.com/a475896726bf058956697e99d38b918c49b825d9/drivers/gpu/drm/img-rogue/1.9/process_stats.c
[modify] https://crrev.com/a475896726bf058956697e99d38b918c49b825d9/drivers/gpu/drm/img-rogue/1.9/tlserver.c
[modify] https://crrev.com/a475896726bf058956697e99d38b918c49b825d9/drivers/gpu/drm/img-rogue/1.9/system/dma_support.c
[modify] https://crrev.com/a475896726bf058956697e99d38b918c49b825d9/drivers/gpu/drm/img-rogue/1.9/os_srvinit_param.h
[modify] https://crrev.com/a475896726bf058956697e99d38b918c49b825d9/drivers/gpu/drm/img-rogue/1.9/htbserver.c
[modify] https://crrev.com/a475896726bf058956697e99d38b918c49b825d9/drivers/gpu/drm/img-rogue/1.9/tlstream.c
[modify] https://crrev.com/a475896726bf058956697e99d38b918c49b825d9/drivers/gpu/drm/img-rogue/1.9/devicemem.c

Project Member

Comment 15 by bugdroid1@chromium.org, Dec 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/1dbaad93f1ebd23a066814387c1b88ee500fa7f5

commit 1dbaad93f1ebd23a066814387c1b88ee500fa7f5
Author: Frank Binns <frank.binns@imgtec.com>
Date: Wed Dec 13 20:33:20 2017

CHROMIUM: drm/img-rogue/1.9: stop initialising some variables unnecessarily

These variables are always initialised later on in the function before
first use or are global (meaning they're already 0 initialised).

Fixes sparse warnings of the type:
    warning: Using plain integer as NULL pointer

BUG= chromium:788882 
TEST=Run the following command before and after this commit and
     compare the results:
    $ `make C=2 CHECK=sparse drivers/gpu/drm/img-rogue/1.9/pvrsrvkm_1_9.ko`

Change-Id: I43e83b573afb49dfe5487dee6365424050451296
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-on: https://chromium-review.googlesource.com/816845
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/1dbaad93f1ebd23a066814387c1b88ee500fa7f5/drivers/gpu/drm/img-rogue/1.9/tlserver.c
[modify] https://crrev.com/1dbaad93f1ebd23a066814387c1b88ee500fa7f5/drivers/gpu/drm/img-rogue/1.9/dbgdriv.c
[modify] https://crrev.com/1dbaad93f1ebd23a066814387c1b88ee500fa7f5/drivers/gpu/drm/img-rogue/1.9/tlstream.c

Project Member

Comment 16 by bugdroid1@chromium.org, Dec 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/88998c9be3286bf8c6b1d407aef3ce3ef81ec9d7

commit 88998c9be3286bf8c6b1d407aef3ce3ef81ec9d7
Author: Frank Binns <frank.binns@imgtec.com>
Date: Wed Dec 13 20:33:22 2017

CHROMIUM: drm/img-rogue/1.9: remove use of directives in argument lists

This is undefined behaviour according to the C99 spec.

Fixes some sparse errors:
    error: directive in argument list

BUG= chromium:788882 
TEST=Run the following command before and after this commit and
     compare the results:
    $ `make C=2 CHECK=sparse drivers/gpu/drm/img-rogue/1.9/pvrsrvkm_1_9.ko`

Change-Id: Ief777f7619ee12930c3e7d51e5d92826e7c6df98
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-on: https://chromium-review.googlesource.com/816846
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/88998c9be3286bf8c6b1d407aef3ce3ef81ec9d7/drivers/gpu/drm/img-rogue/1.9/rgxta3d.c
[modify] https://crrev.com/88998c9be3286bf8c6b1d407aef3ce3ef81ec9d7/drivers/gpu/drm/img-rogue/1.9/cache_km.c

Project Member

Comment 17 by bugdroid1@chromium.org, Dec 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/9ff5afd37f42b8019593b5c3e25e0579d6d7ce78

commit 9ff5afd37f42b8019593b5c3e25e0579d6d7ce78
Author: Frank Binns <frank.binns@imgtec.com>
Date: Wed Dec 13 20:33:23 2017

CHROMIUM: drm/img-rogue/1.9: stop defining our own version of NULL

Fixes many sparse warnings of the type:
    warning: Using plain integer as NULL pointer

BUG= chromium:788882 
TEST=Run the following command before and after this commit and
     compare the results:
     $ `make C=2 CHECK=sparse drivers/gpu/drm/img-rogue/1.9/pvrsrvkm_1_9.ko`

Change-Id: Ib7fb367a9fb8332b7e39ffd4be8c8777f47065a0
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-on: https://chromium-review.googlesource.com/816847
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/9ff5afd37f42b8019593b5c3e25e0579d6d7ce78/drivers/gpu/drm/img-rogue/1.9/physmem_osmem_linux.c

Project Member

Comment 18 by bugdroid1@chromium.org, Dec 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/56338b13d1bc18ff6babd6fa3a4357724a5efe3a

commit 56338b13d1bc18ff6babd6fa3a4357724a5efe3a
Author: Frank Binns <frank.binns@imgtec.com>
Date: Wed Dec 13 20:33:24 2017

CHROMIUM: drm/img-rogue/1.9: use correct type for GFP flags

Fixes the following sparse warnings:
    warning: incorrect type in argument 4 (different base types)
        expected restricted gfp_t [usertype] gfp
        got unsigned int [unsigned] gfp_flags
    warning: incorrect type in assignment (different base types)
        expected unsigned int [unsigned] gfp_flags
        got restricted gfp_t
    warning: invalid assignment: |=
        left side has type unsigned int
        right side has type restricted gfp_t

BUG= chromium:788882 
TEST=Run the following command before and after this commit and
     compare the results:
     $ `make C=2 CHECK=sparse drivers/gpu/drm/img-rogue/1.9/pvrsrvkm_1_9.ko`

Change-Id: I7fbbcb288a921e9f26efbcb4a3f046789374d7d3
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-on: https://chromium-review.googlesource.com/816848
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/56338b13d1bc18ff6babd6fa3a4357724a5efe3a/drivers/gpu/drm/img-rogue/1.9/physmem_osmem_linux.c
[modify] https://crrev.com/56338b13d1bc18ff6babd6fa3a4357724a5efe3a/drivers/gpu/drm/img-rogue/1.9/osfunc.c

Project Member

Comment 19 by bugdroid1@chromium.org, Dec 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/81f95bc1dcaf04c208ac3fa693838b443d7db45b

commit 81f95bc1dcaf04c208ac3fa693838b443d7db45b
Author: Eric Engestrom <eric.engestrom@imgtec.com>
Date: Wed Dec 13 20:33:26 2017

CHROMIUM: drm/img-rogue/1.9: stop passing NULL to sizeof

Fixes the following sparse warnings:
    warning: expression using sizeof(void)

BUG= chromium:788882 
TEST=Run the following command before and after this commit and
     compare the results:
     $ `make C=2 CHECK=sparse drivers/gpu/drm/img-rogue/1.9/pvrsrvkm_1_9.ko`

Change-Id: I67140d76a420787c3dde034f966bed6180301b5b
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-on: https://chromium-review.googlesource.com/816849
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/81f95bc1dcaf04c208ac3fa693838b443d7db45b/drivers/gpu/drm/img-rogue/1.9/km_apphint_defs.h
[modify] https://crrev.com/81f95bc1dcaf04c208ac3fa693838b443d7db45b/drivers/gpu/drm/img-rogue/1.9/km_apphint.c

Project Member

Comment 20 by bugdroid1@chromium.org, Dec 13 2017

Labels: merge-merged-chromeos-3.18
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/d0ae0782b9da41e8894245974814a07fb5165fd4

commit d0ae0782b9da41e8894245974814a07fb5165fd4
Author: Frank Binns <frank.binns@imgtec.com>
Date: Wed Dec 13 20:33:27 2017

CHROMIUM: drm/img-rogue/1.9: add missing void parameter to some functions

Fixes sparse warnings such as:
    warning: non-ANSI function declaration of function 'PMRInit'

BUG= chromium:788882 
TEST=Run the following command before and after this commit and
     compare the results:
     $ `make C=2 CHECK=sparse drivers/gpu/drm/img-rogue/1.9/pvrsrvkm_1_9.ko`

Change-Id: I1f820c1195295d867ee57ee8994a3edc1002a4fd
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-on: https://chromium-review.googlesource.com/816856
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/d0ae0782b9da41e8894245974814a07fb5165fd4/drivers/gpu/drm/img-rogue/1.9/pvrsrv.c
[modify] https://crrev.com/d0ae0782b9da41e8894245974814a07fb5165fd4/drivers/gpu/drm/img-rogue/1.9/pmr.c
[modify] https://crrev.com/d0ae0782b9da41e8894245974814a07fb5165fd4/drivers/gpu/drm/img-rogue/1.9/rgxhwperf.c
[modify] https://crrev.com/d0ae0782b9da41e8894245974814a07fb5165fd4/drivers/gpu/drm/img-rogue/1.9/pvr_gputrace.c

Project Member

Comment 21 by bugdroid1@chromium.org, Dec 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/5268dc340ca7a57ac81767f8bf500c5e503d6f48

commit 5268dc340ca7a57ac81767f8bf500c5e503d6f48
Author: Frank Binns <frank.binns@imgtec.com>
Date: Wed Dec 13 20:33:29 2017

CHROMIUM: drm/img-rogue/1.9: remove extern from some function definitions

Fixes sparse warnings such as:
    warning: function 'PMRPDumpPol32' with external linkage has definition

BUG= chromium:788882 
TEST=Run the following command before and after this commit and
     compare the results:
     $ `make C=2 CHECK=sparse drivers/gpu/drm/img-rogue/1.9/pvrsrvkm_1_9.ko`

Change-Id: I3267de987df9a6ff5dd748d9cd99d24e92cad73a
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-on: https://chromium-review.googlesource.com/816857
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/5268dc340ca7a57ac81767f8bf500c5e503d6f48/drivers/gpu/drm/img-rogue/1.9/pmr.c

Project Member

Comment 22 by bugdroid1@chromium.org, Dec 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/8cf97e862b944f13a71df052114acf5185e32bc8

commit 8cf97e862b944f13a71df052114acf5185e32bc8
Author: Frank Binns <frank.binns@imgtec.com>
Date: Wed Dec 13 20:33:30 2017

CHROMIUM: drm/img-rogue/1.9: make some global variables static

Fixes some sparse warnings, such as:
    warning: symbol 'g_hStatsLock' was not declared. Should it be static?

BUG= chromium:788882 
TEST=Run the following command before and after this commit and
     compare the results:
     $ `make C=2 CHECK=sparse drivers/gpu/drm/img-rogue/1.9/pvrsrvkm_1_9.ko`

Change-Id: I47024ad6426e652c8a07c4ac1dd90a9898985f96
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-on: https://chromium-review.googlesource.com/816858
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/8cf97e862b944f13a71df052114acf5185e32bc8/drivers/gpu/drm/img-rogue/1.9/rgxinit.c
[modify] https://crrev.com/8cf97e862b944f13a71df052114acf5185e32bc8/drivers/gpu/drm/img-rogue/1.9/km/rgx_bvnc_table_km.h
[modify] https://crrev.com/8cf97e862b944f13a71df052114acf5185e32bc8/drivers/gpu/drm/img-rogue/1.9/rgxdebug.c
[modify] https://crrev.com/8cf97e862b944f13a71df052114acf5185e32bc8/drivers/gpu/drm/img-rogue/1.9/rgxhwperf.c
[modify] https://crrev.com/8cf97e862b944f13a71df052114acf5185e32bc8/drivers/gpu/drm/img-rogue/1.9/srvcore.c

Project Member

Comment 23 by bugdroid1@chromium.org, Dec 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/477f1105a1ced26c522fced760f3ce91e6d9710a

commit 477f1105a1ced26c522fced760f3ce91e6d9710a
Author: Frank Binns <frank.binns@imgtec.com>
Date: Wed Dec 13 20:33:32 2017

CHROMIUM: drm/img-rogue/1.9: fix function pointer parameter type

Fixes sparse warning:
    warning: incorrect type in initializer (incompatible argument 1 (different signedness))
        expected int enum PVRSRV_ERROR ( *pfnVMMConfigure )( ... )
        got int enum PVRSRV_ERROR ( *<noident> )( ... )

BUG= chromium:788882 
TEST=Run the following command before and after this commit and
     compare the results:
     $ `make C=2 CHECK=sparse drivers/gpu/drm/img-rogue/1.9/pvrsrvkm_1_9.ko`

Change-Id: I67c6131fb3aabd966b84bd58d1de7d9361356201
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-on: https://chromium-review.googlesource.com/816859
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/477f1105a1ced26c522fced760f3ce91e6d9710a/drivers/gpu/drm/img-rogue/1.9/system/vmm_impl.h

Project Member

Comment 24 by bugdroid1@chromium.org, Dec 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/ec4c70b4ad009d8025465aed19261f71b1af8a45

commit ec4c70b4ad009d8025465aed19261f71b1af8a45
Author: Frank Binns <frank.binns@imgtec.com>
Date: Wed Dec 13 20:33:33 2017

CHROMIUM: drm/img-rogue/1.9: replace interger literal with named version

Fixes a sparse warning:
    warning: constant 0xFFFFFFFFFFFFFFFF is so big it is unsigned long

BUG= chromium:788882 
TEST=Run the following command before and after this commit and
     compare the results:
     $ `make C=2 CHECK=sparse drivers/gpu/drm/img-rogue/1.9/pvrsrvkm_1_9.ko`

Change-Id: I9e0c14c9be28b76b122e0be7e6ab079147b88804
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-on: https://chromium-review.googlesource.com/816860
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/ec4c70b4ad009d8025465aed19261f71b1af8a45/drivers/gpu/drm/img-rogue/1.9/handle.c

Project Member

Comment 25 by bugdroid1@chromium.org, Dec 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/a016d983dbdfd7d23a5aa28fb13a2005adfbe5b7

commit a016d983dbdfd7d23a5aa28fb13a2005adfbe5b7
Author: Frank Binns <frank.binns@imgtec.com>
Date: Thu Dec 14 01:25:51 2017

CHROMIUM: drm/img-rogue/1.9: add some missing ULL suffixes

Fixes some sparse warnings:
    warning: constant 0xCAFEF00DDEADBEEF is so big it is unsigned long

BUG= chromium:788882 
TEST=Run the following command before and after this commit and
     compare the results:
     $ `make C=2 CHECK=sparse drivers/gpu/drm/img-rogue/1.9/pvrsrvkm_1_9.ko`

Change-Id: I9733f16021229102819daa702105b79b4c76e1b2
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-on: https://chromium-review.googlesource.com/816861
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/a016d983dbdfd7d23a5aa28fb13a2005adfbe5b7/drivers/gpu/drm/img-rogue/1.9/physmem_osmem_linux.c
[modify] https://crrev.com/a016d983dbdfd7d23a5aa28fb13a2005adfbe5b7/drivers/gpu/drm/img-rogue/1.9/rgxsrvinit.c
[modify] https://crrev.com/a016d983dbdfd7d23a5aa28fb13a2005adfbe5b7/drivers/gpu/drm/img-rogue/1.9/cache_km.c

Project Member

Comment 26 by bugdroid1@chromium.org, Dec 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/ed8aa310f4156e17ad2ad520cd9d2d8a53f86c53

commit ed8aa310f4156e17ad2ad520cd9d2d8a53f86c53
Author: Frank Binns <frank.binns@imgtec.com>
Date: Thu Dec 14 01:25:53 2017

CHROMIUM: drm/img-rogue/1.9: use IMG_UINT64_C for integers stored as IMG_UINT64

Fixes many sparse warnings, such as:
    warning: constant 0x0001000000020000 is so big it is long

BUG= chromium:788882 
TEST=Run the following command before and after this commit and
     compare the results:
     $ `make C=2 CHECK=sparse drivers/gpu/drm/img-rogue/1.9/pvrsrvkm_1_9.ko`

Change-Id: I6fd89f4f977c5653a253a94031309ee9bbc3d1a1
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-on: https://chromium-review.googlesource.com/816862
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/ed8aa310f4156e17ad2ad520cd9d2d8a53f86c53/drivers/gpu/drm/img-rogue/1.9/km/rgx_bvnc_table_km.h

Project Member

Comment 27 by bugdroid1@chromium.org, Dec 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/93da174e94d256127519328ac73be79eab32b119

commit 93da174e94d256127519328ac73be79eab32b119
Author: Frank Binns <frank.binns@imgtec.com>
Date: Thu Dec 14 01:25:54 2017

CHROMIUM: drm/img-rogue/1.9: replace some 0s with NULLs

Fixes many sparse warnings of the type:
    warning: Using plain integer as NULL pointer

BUG= chromium:788882 
TEST=Run the following command before and after this commit and
     compare the results:
	 $ `make C=2 CHECK=sparse drivers/gpu/drm/img-rogue/1.9/pvrsrvkm_1_9.ko`

Change-Id: I8418abcedcd382f6fd3db4c974f89a59ef03db35
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-on: https://chromium-review.googlesource.com/816863
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/93da174e94d256127519328ac73be79eab32b119/drivers/gpu/drm/img-rogue/1.9/htbuffer.h
[modify] https://crrev.com/93da174e94d256127519328ac73be79eab32b119/drivers/gpu/drm/img-rogue/1.9/dbgdriv.c
[modify] https://crrev.com/93da174e94d256127519328ac73be79eab32b119/drivers/gpu/drm/img-rogue/1.9/rgxccb.c
[modify] https://crrev.com/93da174e94d256127519328ac73be79eab32b119/drivers/gpu/drm/img-rogue/1.9/dllist.h
[modify] https://crrev.com/93da174e94d256127519328ac73be79eab32b119/drivers/gpu/drm/img-rogue/1.9/pdump_mmu.c
[modify] https://crrev.com/93da174e94d256127519328ac73be79eab32b119/drivers/gpu/drm/img-rogue/1.9/tlclient.c
[modify] https://crrev.com/93da174e94d256127519328ac73be79eab32b119/drivers/gpu/drm/img-rogue/1.9/rgxinit.c
[modify] https://crrev.com/93da174e94d256127519328ac73be79eab32b119/drivers/gpu/drm/img-rogue/1.9/rgxhwperf.c
[modify] https://crrev.com/93da174e94d256127519328ac73be79eab32b119/drivers/gpu/drm/img-rogue/1.9/sync.c
[modify] https://crrev.com/93da174e94d256127519328ac73be79eab32b119/drivers/gpu/drm/img-rogue/1.9/rgxfwutils.c
[modify] https://crrev.com/93da174e94d256127519328ac73be79eab32b119/drivers/gpu/drm/img-rogue/1.9/process_stats.c
[modify] https://crrev.com/93da174e94d256127519328ac73be79eab32b119/drivers/gpu/drm/img-rogue/1.9/tlserver.c
[modify] https://crrev.com/93da174e94d256127519328ac73be79eab32b119/drivers/gpu/drm/img-rogue/1.9/system/dma_support.c
[modify] https://crrev.com/93da174e94d256127519328ac73be79eab32b119/drivers/gpu/drm/img-rogue/1.9/os_srvinit_param.h
[modify] https://crrev.com/93da174e94d256127519328ac73be79eab32b119/drivers/gpu/drm/img-rogue/1.9/htbserver.c
[modify] https://crrev.com/93da174e94d256127519328ac73be79eab32b119/drivers/gpu/drm/img-rogue/1.9/tlstream.c
[modify] https://crrev.com/93da174e94d256127519328ac73be79eab32b119/drivers/gpu/drm/img-rogue/1.9/devicemem.c

Project Member

Comment 28 by bugdroid1@chromium.org, Dec 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/462438923184ad2ed3e9c0ad889ba94f20028337

commit 462438923184ad2ed3e9c0ad889ba94f20028337
Author: Frank Binns <frank.binns@imgtec.com>
Date: Thu Dec 14 01:25:55 2017

CHROMIUM: drm/img-rogue/1.9: stop initialising some variables unnecessarily

These variables are always initialised later on in the function before
first use or are global (meaning they're already 0 initialised).

Fixes sparse warnings of the type:
    warning: Using plain integer as NULL pointer

BUG= chromium:788882 
TEST=Run the following command before and after this commit and
     compare the results:
    $ `make C=2 CHECK=sparse drivers/gpu/drm/img-rogue/1.9/pvrsrvkm_1_9.ko`

Change-Id: I43e83b573afb49dfe5487dee6365424050451296
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-on: https://chromium-review.googlesource.com/816864
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/462438923184ad2ed3e9c0ad889ba94f20028337/drivers/gpu/drm/img-rogue/1.9/tlserver.c
[modify] https://crrev.com/462438923184ad2ed3e9c0ad889ba94f20028337/drivers/gpu/drm/img-rogue/1.9/dbgdriv.c
[modify] https://crrev.com/462438923184ad2ed3e9c0ad889ba94f20028337/drivers/gpu/drm/img-rogue/1.9/tlstream.c

Project Member

Comment 29 by bugdroid1@chromium.org, Dec 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/40091f1933839f9b301f18a472b6a49d75f33b09

commit 40091f1933839f9b301f18a472b6a49d75f33b09
Author: Frank Binns <frank.binns@imgtec.com>
Date: Thu Dec 14 01:25:57 2017

CHROMIUM: drm/img-rogue/1.9: remove use of directives in argument lists

This is undefined behaviour according to the C99 spec.

Fixes some sparse errors:
    error: directive in argument list

BUG= chromium:788882 
TEST=Run the following command before and after this commit and
     compare the results:
    $ `make C=2 CHECK=sparse drivers/gpu/drm/img-rogue/1.9/pvrsrvkm_1_9.ko`

Change-Id: Ief777f7619ee12930c3e7d51e5d92826e7c6df98
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-on: https://chromium-review.googlesource.com/816865
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/40091f1933839f9b301f18a472b6a49d75f33b09/drivers/gpu/drm/img-rogue/1.9/rgxta3d.c
[modify] https://crrev.com/40091f1933839f9b301f18a472b6a49d75f33b09/drivers/gpu/drm/img-rogue/1.9/cache_km.c

Project Member

Comment 30 by bugdroid1@chromium.org, Dec 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/9d03124b709106c79824b7e7f67b49b8af81f3d4

commit 9d03124b709106c79824b7e7f67b49b8af81f3d4
Author: Frank Binns <frank.binns@imgtec.com>
Date: Thu Dec 14 01:25:58 2017

CHROMIUM: drm/img-rogue/1.9: stop defining our own version of NULL

Fixes many sparse warnings of the type:
    warning: Using plain integer as NULL pointer

BUG= chromium:788882 
TEST=Run the following command before and after this commit and
     compare the results:
     $ `make C=2 CHECK=sparse drivers/gpu/drm/img-rogue/1.9/pvrsrvkm_1_9.ko`

Change-Id: Ib7fb367a9fb8332b7e39ffd4be8c8777f47065a0
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-on: https://chromium-review.googlesource.com/816866
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/9d03124b709106c79824b7e7f67b49b8af81f3d4/drivers/gpu/drm/img-rogue/1.9/physmem_osmem_linux.c

Project Member

Comment 31 by bugdroid1@chromium.org, Dec 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/dd96107c2ad5776e22fb2a3b2b2d74910ef126ff

commit dd96107c2ad5776e22fb2a3b2b2d74910ef126ff
Author: Frank Binns <frank.binns@imgtec.com>
Date: Thu Dec 14 01:25:59 2017

CHROMIUM: drm/img-rogue/1.9: use correct type for GFP flags

Fixes the following sparse warnings:
    warning: incorrect type in argument 4 (different base types)
        expected restricted gfp_t [usertype] gfp
        got unsigned int [unsigned] gfp_flags
    warning: incorrect type in assignment (different base types)
        expected unsigned int [unsigned] gfp_flags
        got restricted gfp_t
    warning: invalid assignment: |=
        left side has type unsigned int
        right side has type restricted gfp_t

BUG= chromium:788882 
TEST=Run the following command before and after this commit and
     compare the results:
     $ `make C=2 CHECK=sparse drivers/gpu/drm/img-rogue/1.9/pvrsrvkm_1_9.ko`

Change-Id: I7fbbcb288a921e9f26efbcb4a3f046789374d7d3
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-on: https://chromium-review.googlesource.com/816867
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/dd96107c2ad5776e22fb2a3b2b2d74910ef126ff/drivers/gpu/drm/img-rogue/1.9/physmem_osmem_linux.c
[modify] https://crrev.com/dd96107c2ad5776e22fb2a3b2b2d74910ef126ff/drivers/gpu/drm/img-rogue/1.9/osfunc.c

Project Member

Comment 32 by bugdroid1@chromium.org, Dec 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/4b9a983335d86d552cf12a6ff1a00e525441ad3e

commit 4b9a983335d86d552cf12a6ff1a00e525441ad3e
Author: Eric Engestrom <eric.engestrom@imgtec.com>
Date: Thu Dec 14 01:26:01 2017

CHROMIUM: drm/img-rogue/1.9: stop passing NULL to sizeof

Fixes the following sparse warnings:
    warning: expression using sizeof(void)

BUG= chromium:788882 
TEST=Run the following command before and after this commit and
     compare the results:
     $ `make C=2 CHECK=sparse drivers/gpu/drm/img-rogue/1.9/pvrsrvkm_1_9.ko`

Change-Id: I67140d76a420787c3dde034f966bed6180301b5b
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-on: https://chromium-review.googlesource.com/816868
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/4b9a983335d86d552cf12a6ff1a00e525441ad3e/drivers/gpu/drm/img-rogue/1.9/km_apphint_defs.h
[modify] https://crrev.com/4b9a983335d86d552cf12a6ff1a00e525441ad3e/drivers/gpu/drm/img-rogue/1.9/km_apphint.c

Another problem reported by sparse:

drivers/gpu/drm/img-rogue/1.9/cache_km.c:1230:13: sparse: incorrect type in argument 1 (different address spaces)

72929ca4 Frank Binns 2017-11-06  1228          /* Offset VA, validate UM/VA, skip all KM/VA as it's pre-validated */ 
72929ca4 Frank Binns 2017-11-06  1229          pvAddress = (void*)(uintptr_t)((uintptr_t)pvAddress + uiOffset); 
72929ca4 Frank Binns 2017-11-06 @1230          if (access_ok(VERIFY_READ, pvAddress, uiSize)) 
72929ca4 Frank Binns 2017-11-06  1231          { 

pvAddress is declared as void *, meaning it is not expected to be in user space (it does not have a __user annotation).


#33: Forgot to mention - this was reported in chromeos-4.4.
See https://groups.google.com/forum/#!topic/cros-kernel-buildreports/hzC9H8cU_JY

We're still working on fixing these warnings/errors so expect another round of fixes at some point.

By the way, it seems that sparse doesn't understand the vector_size GCC attribute and so it's generating this error:
drivers/gpu/drm/img-rogue/1.9/mem_utils.c:251:31: error: cannot dereference this type

See here for information about this attribute:
https://gcc.gnu.org/onlinedocs/gcc/Vector-Extensions.html

Specifically:
"Vectors can be subscripted as if the vector were an array with the same number of elements and base type."

Is this something you can get addressed upstream?
Another one, also seen on chromeos-4.4:

drivers/gpu/drm/img-rogue/1.9/cache_km.c:2015:47: sparse: Using plain integer as NULL pointer 

seen with ToT sparse. Problem here is that struct CACHEOP_WORK_ITEM includes a pointer.
#35: I don't see that error wit ToT sparse from git://git.kernel.org/pub/scm/devel/sparse/sparse.git.
I used the following command line.
make allmodconfig; PATH=../sparse:${PATH} make -j C=1 drivers/gpu/drm/img-rogue/1.9/mem_utils.o
with
groeck@groeck0:~/src/sparse$ git describe
v0.5.1-40-g08890dc

I'm also using this version:
$ ~/dev/git/sparse/sparse --version
v0.5.1-40-g08890dc

I think the code in question is only built for arm64. 
$38: Good point. Correct, I do see the problem when building for arm64.
Hard case to make since the kernel doesn't use vector extensions that much, and the ones used don't seem to trigger the problem. I'll dig a bit more.

Project Member

Comment 40 by bugdroid1@chromium.org, Feb 26 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/eddfa53f98b0adf7dac4a31b581c6831cd7171db

commit eddfa53f98b0adf7dac4a31b581c6831cd7171db
Author: Frank Binns <frank.binns@imgtec.com>
Date: Mon Feb 26 14:15:38 2018

CHROMIUM: drm/img-rogue/1.9: fix sparse memset warning

Fix sparse warning:
    warning: memset with byte count of 2097150

BUG= chromium:788882 
TEST=Run the following command before and after this commit and
     compare the results:
     $ `make C=2 CHECK=sparse drivers/gpu/drm/img-rogue/1.9/pvrsrvkm_1_9.ko`

Change-Id: I030194b0ab122f66af5a65897a57210c007c004c
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-on: https://chromium-review.googlesource.com/916783
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/eddfa53f98b0adf7dac4a31b581c6831cd7171db/drivers/gpu/drm/img-rogue/1.9/devicemem_history_server.c

Project Member

Comment 41 by bugdroid1@chromium.org, Feb 26 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/883eb18b81aeabc0313d913ed976899e8b36efda

commit 883eb18b81aeabc0313d913ed976899e8b36efda
Author: Frank Binns <frank.binns@imgtec.com>
Date: Mon Feb 26 14:15:42 2018

CHROMIUM: drm/img-rogue/1.9: fix some integer as NULL sparse warnings

Fix some sparse warnings of the type:
    warning: Using plain integer as NULL pointer

BUG= chromium:788882 
TEST=Run the following command before and after this commit and
     compare the results:
     $ `make C=2 CHECK=sparse drivers/gpu/drm/img-rogue/1.9/pvrsrvkm_1_9.ko`

Change-Id: I9c7f7bf80fb8712d2a21bd24b704e819d691ed31
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-on: https://chromium-review.googlesource.com/916784
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/883eb18b81aeabc0313d913ed976899e8b36efda/drivers/gpu/drm/img-rogue/1.9/ri_server.c
[modify] https://crrev.com/883eb18b81aeabc0313d913ed976899e8b36efda/drivers/gpu/drm/img-rogue/1.9/handle.c
[modify] https://crrev.com/883eb18b81aeabc0313d913ed976899e8b36efda/drivers/gpu/drm/img-rogue/1.9/rgxray.c
[modify] https://crrev.com/883eb18b81aeabc0313d913ed976899e8b36efda/drivers/gpu/drm/img-rogue/1.9/devicemem_history_server.c
[modify] https://crrev.com/883eb18b81aeabc0313d913ed976899e8b36efda/drivers/gpu/drm/img-rogue/1.9/tlintern.c
[modify] https://crrev.com/883eb18b81aeabc0313d913ed976899e8b36efda/drivers/gpu/drm/img-rogue/1.9/rgxinit.c
[modify] https://crrev.com/883eb18b81aeabc0313d913ed976899e8b36efda/drivers/gpu/drm/img-rogue/1.9/htbserver.c
[modify] https://crrev.com/883eb18b81aeabc0313d913ed976899e8b36efda/drivers/gpu/drm/img-rogue/1.9/cache_km.c

Project Member

Comment 42 by bugdroid1@chromium.org, Feb 26 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/7cb2d44a545387700a9263bbff89471143ca0ba1

commit 7cb2d44a545387700a9263bbff89471143ca0ba1
Author: Frank Binns <frank.binns@imgtec.com>
Date: Mon Feb 26 14:15:45 2018

CHROMIUM: drm/img-rogue/1.9: fix sparse lock context warnings

Fix some sparse warnings of the type:
	warning: context imbalance in 'XXX' - different lock contexts for basic block

BUG= chromium:788882 
TEST=Run the following command before and after this commit and
     compare the results:
     $ `make C=2 CHECK=sparse drivers/gpu/drm/img-rogue/1.9/pvrsrvkm_1_9.ko`

Change-Id: I1d98799f9e1cf1166cb5a3964a46a90221840fff
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-on: https://chromium-review.googlesource.com/916786
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/7cb2d44a545387700a9263bbff89471143ca0ba1/drivers/gpu/drm/img-rogue/1.9/pvr_debug.c

Project Member

Comment 43 by bugdroid1@chromium.org, Mar 5 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/f7ac36d921d5552fdf658efdd26813d0df52f01d

commit f7ac36d921d5552fdf658efdd26813d0df52f01d
Author: Frank Binns <frank.binns@imgtec.com>
Date: Mon Mar 05 15:07:58 2018

CHROMIUM: drm/img-rogue/1.9: fix sparse memset warning

Fix sparse warning:
    warning: memset with byte count of 2097150

BUG= chromium:788882 
TEST=Run the following command before and after this commit and
     compare the results:
     $ `make C=2 CHECK=sparse drivers/gpu/drm/img-rogue/1.9/pvrsrvkm_1_9.ko`

Change-Id: I030194b0ab122f66af5a65897a57210c007c004c
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-on: https://chromium-review.googlesource.com/908757
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/f7ac36d921d5552fdf658efdd26813d0df52f01d/drivers/gpu/drm/img-rogue/1.9/devicemem_history_server.c

Project Member

Comment 44 by bugdroid1@chromium.org, Mar 5 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/c66700a4d60658a1d9ca047a9382928fc7ed30a8

commit c66700a4d60658a1d9ca047a9382928fc7ed30a8
Author: Frank Binns <frank.binns@imgtec.com>
Date: Mon Mar 05 15:08:00 2018

CHROMIUM: drm/img-rogue/1.9: fix some integer as NULL sparse warnings

Fix some sparse warnings of the type:
    warning: Using plain integer as NULL pointer

BUG= chromium:788882 
TEST=Run the following command before and after this commit and
     compare the results:
     $ `make C=2 CHECK=sparse drivers/gpu/drm/img-rogue/1.9/pvrsrvkm_1_9.ko`

Change-Id: I9c7f7bf80fb8712d2a21bd24b704e819d691ed31
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-on: https://chromium-review.googlesource.com/908758
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/c66700a4d60658a1d9ca047a9382928fc7ed30a8/drivers/gpu/drm/img-rogue/1.9/ri_server.c
[modify] https://crrev.com/c66700a4d60658a1d9ca047a9382928fc7ed30a8/drivers/gpu/drm/img-rogue/1.9/handle.c
[modify] https://crrev.com/c66700a4d60658a1d9ca047a9382928fc7ed30a8/drivers/gpu/drm/img-rogue/1.9/rgxray.c
[modify] https://crrev.com/c66700a4d60658a1d9ca047a9382928fc7ed30a8/drivers/gpu/drm/img-rogue/1.9/devicemem_history_server.c
[modify] https://crrev.com/c66700a4d60658a1d9ca047a9382928fc7ed30a8/drivers/gpu/drm/img-rogue/1.9/tlintern.c
[modify] https://crrev.com/c66700a4d60658a1d9ca047a9382928fc7ed30a8/drivers/gpu/drm/img-rogue/1.9/rgxinit.c
[modify] https://crrev.com/c66700a4d60658a1d9ca047a9382928fc7ed30a8/drivers/gpu/drm/img-rogue/1.9/htbserver.c
[modify] https://crrev.com/c66700a4d60658a1d9ca047a9382928fc7ed30a8/drivers/gpu/drm/img-rogue/1.9/cache_km.c

Project Member

Comment 45 by bugdroid1@chromium.org, Mar 5 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/20ea4c0bfe21dadbbf6ec401158e21099e1f5701

commit 20ea4c0bfe21dadbbf6ec401158e21099e1f5701
Author: Frank Binns <frank.binns@imgtec.com>
Date: Mon Mar 05 15:08:03 2018

CHROMIUM: drm/img-rogue/1.9: fix sparse lock context warnings

Fix some sparse warnings of the type:
	warning: context imbalance in 'XXX' - different lock contexts for basic block

BUG= chromium:788882 
TEST=Run the following command before and after this commit and
     compare the results:
     $ `make C=2 CHECK=sparse drivers/gpu/drm/img-rogue/1.9/pvrsrvkm_1_9.ko`

Change-Id: I1d98799f9e1cf1166cb5a3964a46a90221840fff
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-on: https://chromium-review.googlesource.com/908760
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/20ea4c0bfe21dadbbf6ec401158e21099e1f5701/drivers/gpu/drm/img-rogue/1.9/pvr_debug.c

Project Member

Comment 46 by bugdroid1@chromium.org, Mar 6 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/902296dbab5c06dc26b7f39bbe7e54807906734e

commit 902296dbab5c06dc26b7f39bbe7e54807906734e
Author: Frank Binns <frank.binns@imgtec.com>
Date: Tue Mar 06 22:39:11 2018

CHROMIUM: drm/img-rogue/1.9: fix sparse variable length array warnings

Fix some sparse warnings of the type:
    warning: Variable length array is used.

BUG= chromium:788882 
TEST=Run the following command before and after this commit and
     compare the results:
     $ `make C=2 CHECK=sparse drivers/gpu/drm/img-rogue/1.9/pvrsrvkm_1_9.ko`

Change-Id: Ie5f05dd8054e6d8f1453a007a1f9fbcf47a0bab7
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-on: https://chromium-review.googlesource.com/916782
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Reviewed-by: Bernie Thompson <bhthompson@chromium.org>

[modify] https://crrev.com/902296dbab5c06dc26b7f39bbe7e54807906734e/drivers/gpu/drm/img-rogue/1.9/rgxsrvinit.c

Project Member

Comment 47 by bugdroid1@chromium.org, Mar 6 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/29bb4f9aa06b159a1767a8241dbb7d0aabc79a10

commit 29bb4f9aa06b159a1767a8241dbb7d0aabc79a10
Author: Frank Binns <frank.binns@imgtec.com>
Date: Tue Mar 06 22:39:01 2018

CHROMIUM: drm/img-rogue/1.9: fix sparse address space warnings

Fix some sparse warnings of the type:
    warning: incorrect type in argument # (different address spaces)
	warning: cast removes address space of expression

BUG= chromium:788882 
TEST=Run the following command before and after this commit and
     compare the results:
     $ `make C=2 CHECK=sparse drivers/gpu/drm/img-rogue/1.9/pvrsrvkm_1_9.ko`

Change-Id: I7e0c87db3fce8f7635ce811826864ff213d1203a
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-on: https://chromium-review.googlesource.com/916787
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Reviewed-by: Bernie Thompson <bhthompson@chromium.org>

[modify] https://crrev.com/29bb4f9aa06b159a1767a8241dbb7d0aabc79a10/drivers/gpu/drm/img-rogue/1.9/server_pvrtl_bridge.c
[modify] https://crrev.com/29bb4f9aa06b159a1767a8241dbb7d0aabc79a10/drivers/gpu/drm/img-rogue/1.9/server_rgxkicksync_bridge.c
[modify] https://crrev.com/29bb4f9aa06b159a1767a8241dbb7d0aabc79a10/drivers/gpu/drm/img-rogue/1.9/rgxinit.c
[modify] https://crrev.com/29bb4f9aa06b159a1767a8241dbb7d0aabc79a10/drivers/gpu/drm/img-rogue/1.9/sync.c
[modify] https://crrev.com/29bb4f9aa06b159a1767a8241dbb7d0aabc79a10/drivers/gpu/drm/img-rogue/1.9/pvrsrv.c
[modify] https://crrev.com/29bb4f9aa06b159a1767a8241dbb7d0aabc79a10/drivers/gpu/drm/img-rogue/1.9/server_rgxtq2_bridge.c
[modify] https://crrev.com/29bb4f9aa06b159a1767a8241dbb7d0aabc79a10/drivers/gpu/drm/img-rogue/1.9/cache_km.c
[modify] https://crrev.com/29bb4f9aa06b159a1767a8241dbb7d0aabc79a10/drivers/gpu/drm/img-rogue/1.9/pvr_gputrace.c
[modify] https://crrev.com/29bb4f9aa06b159a1767a8241dbb7d0aabc79a10/drivers/gpu/drm/img-rogue/1.9/powervr/sync_external.h
[modify] https://crrev.com/29bb4f9aa06b159a1767a8241dbb7d0aabc79a10/drivers/gpu/drm/img-rogue/1.9/pvr_bridge_k.c
[modify] https://crrev.com/29bb4f9aa06b159a1767a8241dbb7d0aabc79a10/drivers/gpu/drm/img-rogue/1.9/server_rgxray_bridge.c
[modify] https://crrev.com/29bb4f9aa06b159a1767a8241dbb7d0aabc79a10/drivers/gpu/drm/img-rogue/1.9/rgxlayer_impl.c
[modify] https://crrev.com/29bb4f9aa06b159a1767a8241dbb7d0aabc79a10/drivers/gpu/drm/img-rogue/1.9/server_sync_bridge.c
[modify] https://crrev.com/29bb4f9aa06b159a1767a8241dbb7d0aabc79a10/drivers/gpu/drm/img-rogue/1.9/rgxpower.c
[modify] https://crrev.com/29bb4f9aa06b159a1767a8241dbb7d0aabc79a10/drivers/gpu/drm/img-rogue/1.9/pvr_bridge.h
[modify] https://crrev.com/29bb4f9aa06b159a1767a8241dbb7d0aabc79a10/drivers/gpu/drm/img-rogue/1.9/server_cache_bridge.c
[modify] https://crrev.com/29bb4f9aa06b159a1767a8241dbb7d0aabc79a10/drivers/gpu/drm/img-rogue/1.9/osfunc.c
[modify] https://crrev.com/29bb4f9aa06b159a1767a8241dbb7d0aabc79a10/drivers/gpu/drm/img-rogue/1.9/srvcore.c
[modify] https://crrev.com/29bb4f9aa06b159a1767a8241dbb7d0aabc79a10/drivers/gpu/drm/img-rogue/1.9/server_rgxta3d_bridge.c
[modify] https://crrev.com/29bb4f9aa06b159a1767a8241dbb7d0aabc79a10/drivers/gpu/drm/img-rogue/1.9/server_pdump_bridge.c
[modify] https://crrev.com/29bb4f9aa06b159a1767a8241dbb7d0aabc79a10/drivers/gpu/drm/img-rogue/1.9/srvcore.h
[modify] https://crrev.com/29bb4f9aa06b159a1767a8241dbb7d0aabc79a10/drivers/gpu/drm/img-rogue/1.9/server_srvcore_bridge.c
[modify] https://crrev.com/29bb4f9aa06b159a1767a8241dbb7d0aabc79a10/drivers/gpu/drm/img-rogue/1.9/sync_internal.h
[modify] https://crrev.com/29bb4f9aa06b159a1767a8241dbb7d0aabc79a10/drivers/gpu/drm/img-rogue/1.9/powervr/mem_types.h
[modify] https://crrev.com/29bb4f9aa06b159a1767a8241dbb7d0aabc79a10/drivers/gpu/drm/img-rogue/1.9/server_synctracking_bridge.c
[modify] https://crrev.com/29bb4f9aa06b159a1767a8241dbb7d0aabc79a10/drivers/gpu/drm/img-rogue/1.9/rgxdevice.h
[modify] https://crrev.com/29bb4f9aa06b159a1767a8241dbb7d0aabc79a10/drivers/gpu/drm/img-rogue/1.9/server_rgxcmp_bridge.c
[modify] https://crrev.com/29bb4f9aa06b159a1767a8241dbb7d0aabc79a10/drivers/gpu/drm/img-rogue/1.9/server_htbuffer_bridge.c
[modify] https://crrev.com/29bb4f9aa06b159a1767a8241dbb7d0aabc79a10/drivers/gpu/drm/img-rogue/1.9/server_devicememhistory_bridge.c
[modify] https://crrev.com/29bb4f9aa06b159a1767a8241dbb7d0aabc79a10/drivers/gpu/drm/img-rogue/1.9/pvrsrv.h
[modify] https://crrev.com/29bb4f9aa06b159a1767a8241dbb7d0aabc79a10/drivers/gpu/drm/img-rogue/1.9/server_pdumpmm_bridge.c
[modify] https://crrev.com/29bb4f9aa06b159a1767a8241dbb7d0aabc79a10/drivers/gpu/drm/img-rogue/1.9/osfunc.h
[modify] https://crrev.com/29bb4f9aa06b159a1767a8241dbb7d0aabc79a10/drivers/gpu/drm/img-rogue/1.9/rgxfwutils.c
[modify] https://crrev.com/29bb4f9aa06b159a1767a8241dbb7d0aabc79a10/drivers/gpu/drm/img-rogue/1.9/rgxdebug.c
[modify] https://crrev.com/29bb4f9aa06b159a1767a8241dbb7d0aabc79a10/drivers/gpu/drm/img-rogue/1.9/img_defs.h
[modify] https://crrev.com/29bb4f9aa06b159a1767a8241dbb7d0aabc79a10/drivers/gpu/drm/img-rogue/1.9/rgxutils.c
[modify] https://crrev.com/29bb4f9aa06b159a1767a8241dbb7d0aabc79a10/drivers/gpu/drm/img-rogue/1.9/mmu_common.c
[modify] https://crrev.com/29bb4f9aa06b159a1767a8241dbb7d0aabc79a10/drivers/gpu/drm/img-rogue/1.9/sync_server.c
[modify] https://crrev.com/29bb4f9aa06b159a1767a8241dbb7d0aabc79a10/drivers/gpu/drm/img-rogue/1.9/server_ri_bridge.c
[modify] https://crrev.com/29bb4f9aa06b159a1767a8241dbb7d0aabc79a10/drivers/gpu/drm/img-rogue/1.9/server_rgxtq_bridge.c
[modify] https://crrev.com/29bb4f9aa06b159a1767a8241dbb7d0aabc79a10/drivers/gpu/drm/img-rogue/1.9/server_rgxhwperf_bridge.c
[modify] https://crrev.com/29bb4f9aa06b159a1767a8241dbb7d0aabc79a10/drivers/gpu/drm/img-rogue/1.9/server_dmabuf_bridge.c
[modify] https://crrev.com/29bb4f9aa06b159a1767a8241dbb7d0aabc79a10/drivers/gpu/drm/img-rogue/1.9/server_mm_bridge.c

Project Member

Comment 48 by bugdroid1@chromium.org, Mar 7 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/80fd94a2a7b43839321aa0693adb2761e775a698

commit 80fd94a2a7b43839321aa0693adb2761e775a698
Author: Frank Binns <frank.binns@imgtec.com>
Date: Wed Mar 07 16:05:11 2018

CHROMIUM: drm/img-rogue/1.9: fix some sparse "Should it be static?" warnings

Fix some sparse warnings of the type:
    warning: symbol 'gPVRDebugLevel' was not declared. Should it be static?

BUG= chromium:788882 
TEST=Run the following command before and after this commit and
     compare the results:
     $ `make C=2 CHECK=sparse drivers/gpu/drm/img-rogue/1.9/pvrsrvkm_1_9.ko`

Change-Id: I99bee50f44e35443e245cf89c21f70921ac425f6
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-on: https://chromium-review.googlesource.com/916785
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Reviewed-by: Bernie Thompson <bhthompson@chromium.org>

[modify] https://crrev.com/80fd94a2a7b43839321aa0693adb2761e775a698/drivers/gpu/drm/img-rogue/1.9/sync_checkpoint.c
[modify] https://crrev.com/80fd94a2a7b43839321aa0693adb2761e775a698/drivers/gpu/drm/img-rogue/1.9/physmem.c
[modify] https://crrev.com/80fd94a2a7b43839321aa0693adb2761e775a698/drivers/gpu/drm/img-rogue/1.9/module_common.c
[modify] https://crrev.com/80fd94a2a7b43839321aa0693adb2761e775a698/drivers/gpu/drm/img-rogue/1.9/pvr_debug.c

Project Member

Comment 49 by bugdroid1@chromium.org, Mar 7 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/edadb6c9d0dfb9bbd7c31025bb6f433b0036f043

commit edadb6c9d0dfb9bbd7c31025bb6f433b0036f043
Author: Frank Binns <frank.binns@imgtec.com>
Date: Wed Mar 07 18:50:29 2018

CHROMIUM: drm/img-rogue/1.9: fix sparse variable length array warnings

Fix some sparse warnings of the type:
    warning: Variable length array is used.

BUG= chromium:788882 
TEST=Run the following command before and after this commit and
     compare the results:
     $ `make C=2 CHECK=sparse drivers/gpu/drm/img-rogue/1.9/pvrsrvkm_1_9.ko`

Change-Id: Ie5f05dd8054e6d8f1453a007a1f9fbcf47a0bab7
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-on: https://chromium-review.googlesource.com/908756
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Reviewed-by: Bernie Thompson <bhthompson@chromium.org>

[modify] https://crrev.com/edadb6c9d0dfb9bbd7c31025bb6f433b0036f043/drivers/gpu/drm/img-rogue/1.9/rgxsrvinit.c

Project Member

Comment 50 by bugdroid1@chromium.org, Mar 7 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/8212339df38811f75a40e5336447a082d8de747b

commit 8212339df38811f75a40e5336447a082d8de747b
Author: Frank Binns <frank.binns@imgtec.com>
Date: Wed Mar 07 18:50:27 2018

CHROMIUM: drm/img-rogue/1.9: fix some sparse "Should it be static?" warnings

Fix some sparse warnings of the type:
    warning: symbol 'gPVRDebugLevel' was not declared. Should it be static?

BUG= chromium:788882 
TEST=Run the following command before and after this commit and
     compare the results:
     $ `make C=2 CHECK=sparse drivers/gpu/drm/img-rogue/1.9/pvrsrvkm_1_9.ko`

Change-Id: I99bee50f44e35443e245cf89c21f70921ac425f6
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-on: https://chromium-review.googlesource.com/908759
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Reviewed-by: Bernie Thompson <bhthompson@chromium.org>

[modify] https://crrev.com/8212339df38811f75a40e5336447a082d8de747b/drivers/gpu/drm/img-rogue/1.9/sync_checkpoint.c
[modify] https://crrev.com/8212339df38811f75a40e5336447a082d8de747b/drivers/gpu/drm/img-rogue/1.9/physmem.c
[modify] https://crrev.com/8212339df38811f75a40e5336447a082d8de747b/drivers/gpu/drm/img-rogue/1.9/module_common.c
[modify] https://crrev.com/8212339df38811f75a40e5336447a082d8de747b/drivers/gpu/drm/img-rogue/1.9/pvr_debug.c

Project Member

Comment 51 by bugdroid1@chromium.org, Mar 8 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/77313f91626c0e04dfba329eccee6c5633de1d5e

commit 77313f91626c0e04dfba329eccee6c5633de1d5e
Author: Frank Binns <frank.binns@imgtec.com>
Date: Thu Mar 08 12:06:48 2018

CHROMIUM: drm/img-rogue/1.9: fix sparse address space warnings

Fix some sparse warnings of the type:
    warning: incorrect type in argument # (different address spaces)
	warning: cast removes address space of expression

BUG= chromium:788882 
TEST=Run the following command before and after this commit and
     compare the results:
     $ `make C=2 CHECK=sparse drivers/gpu/drm/img-rogue/1.9/pvrsrvkm_1_9.ko`

Change-Id: I7e0c87db3fce8f7635ce811826864ff213d1203a
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-on: https://chromium-review.googlesource.com/908761
Commit-Ready: Frank Binns <frank.binns@imagination.corp-partner.google.com>
Reviewed-by: Bernie Thompson <bhthompson@chromium.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/77313f91626c0e04dfba329eccee6c5633de1d5e/drivers/gpu/drm/img-rogue/1.9/server_pvrtl_bridge.c
[modify] https://crrev.com/77313f91626c0e04dfba329eccee6c5633de1d5e/drivers/gpu/drm/img-rogue/1.9/server_rgxkicksync_bridge.c
[modify] https://crrev.com/77313f91626c0e04dfba329eccee6c5633de1d5e/drivers/gpu/drm/img-rogue/1.9/rgxinit.c
[modify] https://crrev.com/77313f91626c0e04dfba329eccee6c5633de1d5e/drivers/gpu/drm/img-rogue/1.9/sync.c
[modify] https://crrev.com/77313f91626c0e04dfba329eccee6c5633de1d5e/drivers/gpu/drm/img-rogue/1.9/pvrsrv.c
[modify] https://crrev.com/77313f91626c0e04dfba329eccee6c5633de1d5e/drivers/gpu/drm/img-rogue/1.9/server_rgxtq2_bridge.c
[modify] https://crrev.com/77313f91626c0e04dfba329eccee6c5633de1d5e/drivers/gpu/drm/img-rogue/1.9/cache_km.c
[modify] https://crrev.com/77313f91626c0e04dfba329eccee6c5633de1d5e/drivers/gpu/drm/img-rogue/1.9/pvr_gputrace.c
[modify] https://crrev.com/77313f91626c0e04dfba329eccee6c5633de1d5e/drivers/gpu/drm/img-rogue/1.9/powervr/sync_external.h
[modify] https://crrev.com/77313f91626c0e04dfba329eccee6c5633de1d5e/drivers/gpu/drm/img-rogue/1.9/pvr_bridge_k.c
[modify] https://crrev.com/77313f91626c0e04dfba329eccee6c5633de1d5e/drivers/gpu/drm/img-rogue/1.9/server_rgxray_bridge.c
[modify] https://crrev.com/77313f91626c0e04dfba329eccee6c5633de1d5e/drivers/gpu/drm/img-rogue/1.9/rgxlayer_impl.c
[modify] https://crrev.com/77313f91626c0e04dfba329eccee6c5633de1d5e/drivers/gpu/drm/img-rogue/1.9/server_sync_bridge.c
[modify] https://crrev.com/77313f91626c0e04dfba329eccee6c5633de1d5e/drivers/gpu/drm/img-rogue/1.9/rgxpower.c
[modify] https://crrev.com/77313f91626c0e04dfba329eccee6c5633de1d5e/drivers/gpu/drm/img-rogue/1.9/pvr_bridge.h
[modify] https://crrev.com/77313f91626c0e04dfba329eccee6c5633de1d5e/drivers/gpu/drm/img-rogue/1.9/server_cache_bridge.c
[modify] https://crrev.com/77313f91626c0e04dfba329eccee6c5633de1d5e/drivers/gpu/drm/img-rogue/1.9/osfunc.c
[modify] https://crrev.com/77313f91626c0e04dfba329eccee6c5633de1d5e/drivers/gpu/drm/img-rogue/1.9/srvcore.c
[modify] https://crrev.com/77313f91626c0e04dfba329eccee6c5633de1d5e/drivers/gpu/drm/img-rogue/1.9/server_rgxta3d_bridge.c
[modify] https://crrev.com/77313f91626c0e04dfba329eccee6c5633de1d5e/drivers/gpu/drm/img-rogue/1.9/server_pdump_bridge.c
[modify] https://crrev.com/77313f91626c0e04dfba329eccee6c5633de1d5e/drivers/gpu/drm/img-rogue/1.9/srvcore.h
[modify] https://crrev.com/77313f91626c0e04dfba329eccee6c5633de1d5e/drivers/gpu/drm/img-rogue/1.9/server_srvcore_bridge.c
[modify] https://crrev.com/77313f91626c0e04dfba329eccee6c5633de1d5e/drivers/gpu/drm/img-rogue/1.9/sync_internal.h
[modify] https://crrev.com/77313f91626c0e04dfba329eccee6c5633de1d5e/drivers/gpu/drm/img-rogue/1.9/powervr/mem_types.h
[modify] https://crrev.com/77313f91626c0e04dfba329eccee6c5633de1d5e/drivers/gpu/drm/img-rogue/1.9/server_synctracking_bridge.c
[modify] https://crrev.com/77313f91626c0e04dfba329eccee6c5633de1d5e/drivers/gpu/drm/img-rogue/1.9/rgxdevice.h
[modify] https://crrev.com/77313f91626c0e04dfba329eccee6c5633de1d5e/drivers/gpu/drm/img-rogue/1.9/server_rgxcmp_bridge.c
[modify] https://crrev.com/77313f91626c0e04dfba329eccee6c5633de1d5e/drivers/gpu/drm/img-rogue/1.9/server_htbuffer_bridge.c
[modify] https://crrev.com/77313f91626c0e04dfba329eccee6c5633de1d5e/drivers/gpu/drm/img-rogue/1.9/server_devicememhistory_bridge.c
[modify] https://crrev.com/77313f91626c0e04dfba329eccee6c5633de1d5e/drivers/gpu/drm/img-rogue/1.9/pvrsrv.h
[modify] https://crrev.com/77313f91626c0e04dfba329eccee6c5633de1d5e/drivers/gpu/drm/img-rogue/1.9/server_pdumpmm_bridge.c
[modify] https://crrev.com/77313f91626c0e04dfba329eccee6c5633de1d5e/drivers/gpu/drm/img-rogue/1.9/osfunc.h
[modify] https://crrev.com/77313f91626c0e04dfba329eccee6c5633de1d5e/drivers/gpu/drm/img-rogue/1.9/rgxfwutils.c
[modify] https://crrev.com/77313f91626c0e04dfba329eccee6c5633de1d5e/drivers/gpu/drm/img-rogue/1.9/rgxdebug.c
[modify] https://crrev.com/77313f91626c0e04dfba329eccee6c5633de1d5e/drivers/gpu/drm/img-rogue/1.9/img_defs.h
[modify] https://crrev.com/77313f91626c0e04dfba329eccee6c5633de1d5e/drivers/gpu/drm/img-rogue/1.9/rgxutils.c
[modify] https://crrev.com/77313f91626c0e04dfba329eccee6c5633de1d5e/drivers/gpu/drm/img-rogue/1.9/mmu_common.c
[modify] https://crrev.com/77313f91626c0e04dfba329eccee6c5633de1d5e/drivers/gpu/drm/img-rogue/1.9/sync_server.c
[modify] https://crrev.com/77313f91626c0e04dfba329eccee6c5633de1d5e/drivers/gpu/drm/img-rogue/1.9/server_ri_bridge.c
[modify] https://crrev.com/77313f91626c0e04dfba329eccee6c5633de1d5e/drivers/gpu/drm/img-rogue/1.9/server_rgxtq_bridge.c
[modify] https://crrev.com/77313f91626c0e04dfba329eccee6c5633de1d5e/drivers/gpu/drm/img-rogue/1.9/server_rgxhwperf_bridge.c
[modify] https://crrev.com/77313f91626c0e04dfba329eccee6c5633de1d5e/drivers/gpu/drm/img-rogue/1.9/server_dmabuf_bridge.c
[modify] https://crrev.com/77313f91626c0e04dfba329eccee6c5633de1d5e/drivers/gpu/drm/img-rogue/1.9/server_mm_bridge.c

I think we should be Sparse clean now. Can someone at Google confirm whether or not there is anything left to do here?

Comment 53 by groeck@google.com, Mar 9 2018

Status: Fixed (was: Available)
I have not seen a related 0day report recently, so I agree that we should be clean. I'll mark this bug as fixed. If anything new is reported I'll open another bug.

Sign in to add a comment