lkml.org 
[lkml]   [2020]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [alsa-devel] [PATCH 7/9] ASoC: tegra: add Tegra210 based ADMAIF driver
From
Date
20.01.2020 17:23, Sameer Pujar пишет:
[snip]
> +static bool tegra_admaif_wr_reg(struct device *dev, unsigned int reg)
> +{
> + struct tegra_admaif *admaif = dev_get_drvdata(dev);
> + unsigned int ch_stride = TEGRA_ADMAIF_CHANNEL_REG_STRIDE;
> + unsigned int num_ch = admaif->soc_data->num_ch;
> + unsigned int rx_base = admaif->soc_data->rx_base;
> + unsigned int tx_base = admaif->soc_data->tx_base;
> + unsigned int global_base = admaif->soc_data->global_base;
> + unsigned int reg_max = admaif->soc_data->regmap_conf->max_register;
> + unsigned int rx_max = rx_base + (num_ch * ch_stride);
> + unsigned int tx_max = tx_base + (num_ch * ch_stride);
> +
> + if ((reg >= rx_base) && (reg < rx_max)) {

The braces are not needed around the comparisons because they precede
the AND. Same for all other similar occurrences in the code.

\
 
 \ /
  Last update: 2020-01-24 02:28    [W:1.237 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site