mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: Return bool from nvgpu_log_mask_enabled
This function returns a boolean describing if a given log mask is enabled for a given GPU. Previously this returned and int but the bool type is far better suited for this. Also implement this function in posix, as it may be useful to have implemented there if any common code chooses to use this function. Change-Id: I7382e73df83282763df1bdbccbbb219c9f3e6f1b Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1938341 Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
ee282de11b
commit
7222826680
@@ -45,9 +45,9 @@ static const char *log_types[] = {
|
||||
"INFO",
|
||||
};
|
||||
|
||||
int nvgpu_log_mask_enabled(struct gk20a *g, u64 log_mask)
|
||||
bool nvgpu_log_mask_enabled(struct gk20a *g, u64 log_mask)
|
||||
{
|
||||
return !!(g->log_mask & log_mask);
|
||||
return (g->log_mask & log_mask) != 0ULL;
|
||||
}
|
||||
|
||||
static inline const char *nvgpu_log_name(struct gk20a *g)
|
||||
|
||||
Reference in New Issue
Block a user