lkml.org 
[lkml]   [2022]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [Patch v6 2/4] memory: tegra: Add MC error logging on tegra186 onward
From
06.04.2022 08:24, Ashish Mhetre пишет:
> /* clear interrupts */
> - mc_writel(mc, status, MC_INTSTATUS);
> + if (mc->soc->num_channels) {
> + u32 status_chan_bit;
> +
> + mc_ch_writel(mc, channel, status, MC_INTSTATUS);
> + status_chan_bit = BIT(channel) << mc->soc->status_reg_chan_shift;

s/status_reg_chan_shift/global_intstatus_channel_shift/

> + mc_ch_writel(mc, MC_BROADCAST_CHANNEL, status_chan_bit, MC_GLOBAL_INTSTATUS);
and maybe add a one-line mc_channel_to_global_intstatus(mc, channel) helper

mc_ch_writel(mc, MC_BROADCAST_CHANNEL,
mc_channel_to_global_intstatus(mc, chan),
MC_GLOBAL_INTSTATUS);

> + } else
> + mc_writel(mc, status, MC_INTSTATUS);

Missing braces after "else", "./scripts/checkpatch.pl --strict" should warn about this.

Otherwise this patch looks okay at a quick glance.

\
 
 \ /
  Last update: 2022-04-10 16:56    [W:0.134 / U:0.672 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site