From 65c20fe411d9d50f6791edf6e06dfce34beb8d61 Mon Sep 17 00:00:00 2001 From: Philip Elcan Date: Tue, 22 Jan 2019 15:44:57 -0500 Subject: [PATCH] gpu: nvgpu: clk: pass u32 for event number Change the type of the event_number parameter of nvgpu_clk_notification_queue_alloc() from size_t to u32 since it's used everywhere as a u32. JIRA NVGPU-1008 Change-Id: I4305a3816a55a9f5c91439e141d0811bd1b422e8 Signed-off-by: Philip Elcan Reviewed-on: https://git-master.nvidia.com/r/2001229 Reviewed-by: svc-mobile-coverity Reviewed-by: svc-mobile-misra GVS: Gerrit_Virtual_Submit Reviewed-by: Abdul Salam Reviewed-by: Alex Waterman Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/pmu/clk/clk_arb.c | 2 +- drivers/gpu/nvgpu/include/nvgpu/clk_arb.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/nvgpu/common/pmu/clk/clk_arb.c b/drivers/gpu/nvgpu/common/pmu/clk/clk_arb.c index 7d56203ad..d057ba9fd 100644 --- a/drivers/gpu/nvgpu/common/pmu/clk/clk_arb.c +++ b/drivers/gpu/nvgpu/common/pmu/clk/clk_arb.c @@ -43,7 +43,7 @@ int nvgpu_clk_notification_queue_alloc(struct gk20a *g, struct nvgpu_clk_notification_queue *queue, - size_t events_number) { + u32 events_number) { queue->notifications = nvgpu_kcalloc(g, events_number, sizeof(struct nvgpu_clk_notification)); if (!queue->notifications) diff --git a/drivers/gpu/nvgpu/include/nvgpu/clk_arb.h b/drivers/gpu/nvgpu/include/nvgpu/clk_arb.h index 161ac9516..063d5d7c9 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/clk_arb.h +++ b/drivers/gpu/nvgpu/include/nvgpu/clk_arb.h @@ -40,7 +40,7 @@ struct gk20a; #include #define MAX_F_POINTS 256 -#define DEFAULT_EVENT_NUMBER 32 +#define DEFAULT_EVENT_NUMBER 32U struct nvgpu_clk_dev; struct nvgpu_clk_arb_target; @@ -360,7 +360,7 @@ u32 nvgpu_clk_arb_notify(struct nvgpu_clk_dev *dev, int nvgpu_clk_notification_queue_alloc(struct gk20a *g, struct nvgpu_clk_notification_queue *queue, - size_t events_number); + u32 events_number); void nvgpu_clk_notification_queue_free(struct gk20a *g, struct nvgpu_clk_notification_queue *queue);