bitmap_empty() is more verbose and efficient, as it stops traversing
data_drop mask as soon as the 1st set bit found.

Signed-off-by: Yury Norov (NVIDIA) <[email protected]>
---
 drivers/gpu/drm/xe/xe_eu_stall.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_eu_stall.c b/drivers/gpu/drm/xe/xe_eu_stall.c
index 97dfb7945b7a..b896b7ff5900 100644
--- a/drivers/gpu/drm/xe/xe_eu_stall.c
+++ b/drivers/gpu/drm/xe/xe_eu_stall.c
@@ -544,7 +544,7 @@ static ssize_t xe_eu_stall_stream_read_locked(struct 
xe_eu_stall_data_stream *st
        int ret = 0;
 
        mutex_lock(&stream->xecore_buf_lock);
-       if (bitmap_weight(stream->data_drop.mask, XE_MAX_DSS_FUSE_BITS)) {
+       if (!bitmap_empty(stream->data_drop.mask, XE_MAX_DSS_FUSE_BITS)) {
                if (!stream->data_drop.reported_to_user) {
                        stream->data_drop.reported_to_user = true;
                        xe_gt_dbg(gt, "EU stall data dropped in XeCores: 
%*pb\n",
-- 
2.43.0

Reply via email to