mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 01:50:07 +03:00
Instead of using unsigned long for all __hweight variants use unsigned int as it's sufficient to hold the result without any data loss. This also matches with return type used in other OS variants like Linux and helps avoid CERT-C errors. Error: CERT INT31-C: drivers/gpu/nvgpu/common/gr/fs_state.c:76: cert_violation: Casting "__hweight32(val)" from "unsigned long" to "unsigned int" without checking its value may result in lost or misinterpreted data. JIRA NVGPU-3410 Change-Id: I7b9167ee21afd04b4ecc05faa838834e1047bf0d Signed-off-by: Nitin Kumbhar <nkumbhar@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2119993 GVS: Gerrit_Virtual_Submit Reviewed-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>