mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: fix misra errors nvgpu.common.clk_arb
- Rule 5.7 doesn't allow an identifier to be reused. This patch renames identifier 'notification' to resolve this violation. - Rule 8.3 requires all functions and prototypes to have same parameter names and type qualifier. - Rule 10.x necessitates operands to have essential type, and left and right operands should be of same width. - Rule 11.9 requires pointers to be compared with 'NULL' instead of '0'. - Rule 14.4 requires if statement condition to be Boolean type. - Rule 15.7 needs if-elseif constructs to be terminated with else statement. - Rule 16.x requires all switch statements to be well-formed with unconditional break statement terminate every switch-clause. - Rule 20.7 requires macro parameters to be enclosed in parentheses. - Rule 21.x doesn't allow reserved identifier or macro names to be reused or defined. This patch fixes above listed violations in common/clk_arb/clk_arb.c. Jira NVGPU-3740 Change-Id: I871ce240ca7fb0372240a8886a53c8d4c460acea Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2147640 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
1b746425c0
commit
d5a573db9a
@@ -174,8 +174,9 @@ static inline u32 __pending_event(struct nvgpu_clk_dev *dev,
|
||||
|
||||
if (_WRAPGTEQ(tail, head) && info) {
|
||||
head++;
|
||||
p_notif = &dev->queue.notifications[head % dev->queue.size];
|
||||
events = p_notif->notification;
|
||||
p_notif = &dev->queue.clk_q_notifications[
|
||||
head % dev->queue.size];
|
||||
events = p_notif->clk_notification;
|
||||
info->event_id = ffs(events) - 1;
|
||||
info->timestamp = p_notif->timestamp;
|
||||
nvgpu_atomic_set(&dev->queue.head, head);
|
||||
|
||||
Reference in New Issue
Block a user