Skip to content

Commit

Permalink
drivers: hv: dxgkrnl: Silence -Wunused-result around refcount_inc_not…
Browse files Browse the repository at this point in the history
…_zero

Signed-off-by: Nathan Chancellor <[email protected]>
Signed-off-by: Diab Neiroukh <[email protected]>
  • Loading branch information
nathanchance authored and lzlrd committed Jan 26, 2021
1 parent 0c1090a commit 0a9eadf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/hv/dxgkrnl/dxgadapter.c
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,8 @@ void dxgresource_destroy(struct dxgresource *resource)

void dxgresource_acquire_reference(struct dxgresource *resource)
{
refcount_inc_not_zero(&resource->refcount);
if (refcount_inc_not_zero(&resource->refcount))
;
}

void dxgresource_release_reference(struct dxgresource *resource)
Expand Down Expand Up @@ -1330,7 +1331,8 @@ void dxgsyncobject_acquire_reference(struct dxgsyncobject *syncobj)
{
TRACE_DEBUG(1, "%s 0x%p %d",
__func__, syncobj, refcount_read(&syncobj->refcount));
refcount_inc_not_zero(&syncobj->refcount);
if (refcount_inc_not_zero(&syncobj->refcount))
;
}

void dxgsyncobject_release_reference(struct dxgsyncobject *syncobj)
Expand Down

0 comments on commit 0a9eadf

Please sign in to comment.