Skip to content

Commit

Permalink
habanalabs: remove unused but set variable 'ctx_asid'
Browse files Browse the repository at this point in the history
Gcc report warning as follows:

drivers/misc/habanalabs/common/command_submission.c:373:6: warning:
 variable 'ctx_asid' set but not used [-Wunused-but-set-variable]
  373 |  int ctx_asid, rc;
      |      ^~~~~~~~

This variable is not used in function cs_timedout(), this commit
remove it to fix the warning.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Link: https://lore.kernel.org/r/20200729155902.33976-1-weiyongjun1@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Wei Yongjun authored and Greg Kroah-Hartman committed Jul 29, 2020
1 parent 8f04219 commit 22362aa
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/misc/habanalabs/common/command_submission.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ static void cs_do_release(struct kref *ref)
static void cs_timedout(struct work_struct *work)
{
struct hl_device *hdev;
int ctx_asid, rc;
int rc;
struct hl_cs *cs = container_of(work, struct hl_cs,
work_tdr.work);
rc = cs_get_unless_zero(cs);
Expand All @@ -386,7 +386,6 @@ static void cs_timedout(struct work_struct *work)
cs->timedout = true;

hdev = cs->ctx->hdev;
ctx_asid = cs->ctx->asid;

dev_err(hdev->dev,
"Command submission %llu has not finished in time!\n",
Expand Down

0 comments on commit 22362aa

Please sign in to comment.