mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 09:57:08 +03:00
gpu: nvgpu: MISRA fixes in gr_intr file
Fix one violation for MISRA Rule-13.5 - Expression after || has persistent side effect Fix two violation for MISRA Rule-17.7 - Return value is unused Jira NVGPU-3227 Change-Id: I29127914ffcf2b075c4ac515b3a998f98c779556 Signed-off-by: Vinod G <vinodg@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2109778 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
61e2b47b21
commit
83f873c95d
@@ -635,8 +635,13 @@ void nvgpu_gr_intr_handle_notify_pending(struct gk20a *g,
|
||||
struct nvgpu_gr_isr_data *isr_data)
|
||||
{
|
||||
struct channel_gk20a *ch = isr_data->ch;
|
||||
int err;
|
||||
|
||||
if (ch == NULL || tsg_gk20a_from_ch(ch) == NULL) {
|
||||
if (ch == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (tsg_gk20a_from_ch(ch) == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -646,7 +651,10 @@ void nvgpu_gr_intr_handle_notify_pending(struct gk20a *g,
|
||||
nvgpu_cyclestats_exec(g, ch, isr_data->data_lo);
|
||||
#endif
|
||||
|
||||
nvgpu_cond_broadcast_interruptible(&ch->notifier_wq);
|
||||
err = nvgpu_cond_broadcast_interruptible(&ch->notifier_wq);
|
||||
if (err != 0) {
|
||||
nvgpu_log(g, gpu_dbg_intr, "failed to broadcast");
|
||||
}
|
||||
}
|
||||
|
||||
void nvgpu_gr_intr_handle_semaphore_pending(struct gk20a *g,
|
||||
@@ -661,10 +669,15 @@ void nvgpu_gr_intr_handle_semaphore_pending(struct gk20a *g,
|
||||
|
||||
tsg = tsg_gk20a_from_ch(ch);
|
||||
if (tsg != NULL) {
|
||||
int err;
|
||||
|
||||
g->ops.tsg.post_event_id(tsg,
|
||||
NVGPU_EVENT_ID_GR_SEMAPHORE_WRITE_AWAKEN);
|
||||
|
||||
nvgpu_cond_broadcast(&ch->semaphore_wq);
|
||||
err = nvgpu_cond_broadcast(&ch->semaphore_wq);
|
||||
if (err != 0) {
|
||||
nvgpu_log(g, gpu_dbg_intr, "failed to broadcast");
|
||||
}
|
||||
} else {
|
||||
nvgpu_err(g, "chid: %d is not bound to tsg", ch->chid);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user