]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
nouveau: fix nv40_perfctr_next() cleanup regression
authorArnd Bergmann <arnd@arndb.de>
Mon, 14 Mar 2016 14:24:10 +0000 (15:24 +0100)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 20 Oct 2016 13:06:06 +0000 (08:06 -0500)
commit74efcaa77a2c1d26df627845ec58bb4e612b45cf
treefbc1db92144b6e4e49e41c6a02aa2c1bd9177627
parentb2fe401bf26ea7aa52e7594c50ea15a018d2989c
nouveau: fix nv40_perfctr_next() cleanup regression

BugLink: http://bugs.launchpad.net/bugs/1629386
commit 86d65b7e7a0c927d07d18605c276d0f142438ead upstream.

gcc-6 warns about code in the nouveau driver that is obviously silly:

drivers/gpu/drm/nouveau/nvkm/engine/pm/nv40.c: In function 'nv40_perfctr_next':
drivers/gpu/drm/nouveau/nvkm/engine/pm/nv40.c:62:19: warning: self-comparison always evaluats to false [-Wtautological-compare]
  if (pm->sequence != pm->sequence) {

The behavior was accidentally introduced in a patch described as "This is
purely preparation for upcoming commits, there should be no code changes here.".
As far as I can tell, that was true for the rest of that patch except for
this one function, which has been changed to a NOP.

This patch restores the original behavior.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 8c1aeaa13954 ("drm/nouveau/pm: cosmetic changes")
Reviewed-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/gpu/drm/nouveau/nvkm/engine/pm/nv40.c