gpu: nvgpu: Fix MISRA rule 8.2

MISRA rule 8.2 requires function prototypes to have defined and named
parameters. This avoids undefined behavior and ensures variable type
check. Specifying parameter name can provide more information.

Jira NVGPU-861

Change-Id: I7c4669c2b2c57336e0f978d7e67425bf2687fbad
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2095656
Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Adeel Raza <araza@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Vedashree Vidwans
2019-04-11 14:25:00 -07:00
committed by mobile promotions
parent 437a5474a9
commit 1e3cac3bc8
2 changed files with 4 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2017-2019, NVIDIA CORPORATION. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -58,7 +58,8 @@ void nvgpu_nvhost_syncpt_set_safe_state(
struct nvgpu_nvhost_dev *nvhost_dev, u32 id);
int nvgpu_nvhost_intr_register_notifier(struct nvgpu_nvhost_dev *nvhost_dev,
u32 id, u32 thresh, void (*callback)(void *, int), void *private_data);
u32 id, u32 thresh, void (*callback)(void *priv, int nr_completed),
void *private_data);
const char *nvgpu_nvhost_syncpt_get_name(struct nvgpu_nvhost_dev *nvhost_dev,
int id);

View File

@@ -84,7 +84,7 @@ u32 nvgpu_nvhost_syncpt_incr_max_ext(
int nvgpu_nvhost_intr_register_notifier(
struct nvgpu_nvhost_dev *nvhost_dev, u32 id, u32 thresh,
void (*callback)(void *, int), void *private_data)
void (*callback)(void *priv, int nr_completed), void *private_data)
{
BUG();
return 0;