mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 02:52:51 +03:00
gpu: nvgpu: Fix LibC MISRA 17.7 in os/posix
MISRA Rule-17.7 requires the return value of all functions to be used. Fix is either to use the return value or change the function to return void. This patch contains fix for all 17.7 violations instandard C functions in OS/Posix interface. JIRA NVGPU-1036 Change-Id: I2da417edc992f16de24cdff536c0538f1fde8b61 Signed-off-by: Nicolas Benech <nbenech@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1929901 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman <alexw@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
b9e7ea65e1
commit
4e41a0b199
@@ -45,7 +45,7 @@ int nvgpu_timeout_init(struct gk20a *g, struct nvgpu_timeout *timeout,
|
||||
if (flags & ~NVGPU_TIMER_FLAG_MASK)
|
||||
return -EINVAL;
|
||||
|
||||
memset(timeout, 0, sizeof(*timeout));
|
||||
(void) memset(timeout, 0, sizeof(*timeout));
|
||||
|
||||
timeout->g = g;
|
||||
timeout->flags = flags;
|
||||
@@ -68,7 +68,7 @@ static int __nvgpu_timeout_expired_msg_cpu(struct nvgpu_timeout *timeout,
|
||||
if (!(timeout->flags & NVGPU_TIMER_SILENT_TIMEOUT)) {
|
||||
char buf[128];
|
||||
|
||||
vsnprintf(buf, sizeof(buf), fmt, args);
|
||||
(void) vsnprintf(buf, sizeof(buf), fmt, args);
|
||||
|
||||
nvgpu_err(g, "Timeout detected @ %p %s", caller, buf);
|
||||
}
|
||||
@@ -89,7 +89,7 @@ static int __nvgpu_timeout_expired_msg_retry(struct nvgpu_timeout *timeout,
|
||||
if (!(timeout->flags & NVGPU_TIMER_SILENT_TIMEOUT)) {
|
||||
char buf[128];
|
||||
|
||||
vsnprintf(buf, sizeof(buf), fmt, args);
|
||||
(void) vsnprintf(buf, sizeof(buf), fmt, args);
|
||||
|
||||
nvgpu_err(g, "No more retries @ %p %s", caller, buf);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user