All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: oded.gabbay@gmail.com
Cc: dri-devel@lists.freedesktop.org
Subject: re: drm/amdgpu: add amdgpu <--> amdkfd gfx7 interface
Date: Tue, 28 Jul 2015 18:56:52 +0300	[thread overview]
Message-ID: <20150728155652.GD25739@mwanda> (raw)

Hello Oded Gabbay,

The patch 32c22e994f44: "drm/amdgpu: add amdgpu <--> amdkfd gfx7
interface" from Jun 12, 2015, leads to the following static checker
warning:

	drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c:453 kgd_hqd_destroy()
	warn: bitwise AND condition is false here

drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c
   439  static int kgd_hqd_destroy(struct kgd_dev *kgd, uint32_t reset_type,
   440                                  unsigned int timeout, uint32_t pipe_id,
   441                                  uint32_t queue_id)
   442  {
   443          struct amdgpu_device *adev = get_amdgpu_device(kgd);
   444          uint32_t temp;
   445  
   446          acquire_queue(kgd, pipe_id, queue_id);
   447          WREG32(mmCP_HQD_PQ_DOORBELL_CONTROL, 0);
   448  
   449          WREG32(mmCP_HQD_DEQUEUE_REQUEST, reset_type);
   450  
   451          while (true) {
   452                  temp = RREG32(mmCP_HQD_ACTIVE);
   453                  if (temp & CP_HQD_ACTIVE__ACTIVE__SHIFT)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Never true.  ANDing against a shift is weird.  A zero shift is sort of
pointless, also.

   454                          break;
   455                  if (timeout == 0) {
   456                          pr_err("kfd: cp queue preemption time out (%dms)\n",
   457                                  temp);
   458                          release_queue(kgd);
   459                          return -ETIME;
   460                  }
   461                  msleep(20);
   462                  timeout -= 20;
   463          }
   464  
   465          release_queue(kgd);
   466          return 0;
   467  }

regards,
dan carpenter
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

             reply	other threads:[~2015-07-28 15:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-28 15:56 Dan Carpenter [this message]
2015-07-29  7:31 ` drm/amdgpu: add amdgpu <--> amdkfd gfx7 interface Oded Gabbay

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150728155652.GD25739@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=oded.gabbay@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.