mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-17 17:24:17 +08:00
Merge series "ASoC: fsl: remove cppcheck warnings" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
Nothing critical and no functional changes. The only change that needs attention if the 'fsl_ssi: remove unnecessary tests' patch, where variables are to zero, then tested to set register fields. Either the tests are indeed redundant or the entire programming sequence is incorrect. Pierre-Louis Bossart (9): ASoC: fsl: fsl_asrc: remove useless assignment ASoC: fsl: fsl_dma: remove unused variable ASoC: fsl: fsl_easrc: remove useless assignments ASoC: fsl: fsl_esai: clarify expression ASoC: fsl: fsl_ssi: remove unnecessary tests ASoC: fsl: imx-hdmi: remove unused structure members ASoC: fsl: mpc5200: signed parameter in snprintf format ASoC: fsl: mpc8610: remove useless assignment ASoC: fsl: p1022_ds: remove useless assignment sound/soc/fsl/fsl_asrc.c | 2 +- sound/soc/fsl/fsl_dma.c | 3 --- sound/soc/fsl/fsl_easrc.c | 6 +++--- sound/soc/fsl/fsl_esai.c | 2 +- sound/soc/fsl/fsl_ssi.c | 5 ++--- sound/soc/fsl/imx-hdmi.c | 4 ---- sound/soc/fsl/mpc5200_dma.c | 2 +- sound/soc/fsl/mpc8610_hpcd.c | 2 +- sound/soc/fsl/p1022_ds.c | 2 +- 9 files changed, 10 insertions(+), 18 deletions(-) -- 2.25.1
This commit is contained in:
commit
029448a856
@ -610,7 +610,7 @@ static void fsl_asrc_select_clk(struct fsl_asrc_priv *asrc_priv,
|
||||
struct asrc_config *config = pair_priv->config;
|
||||
int rate[2], select_clk[2]; /* Array size 2 means IN and OUT */
|
||||
int clk_rate, clk_index;
|
||||
int i = 0, j = 0;
|
||||
int i, j;
|
||||
|
||||
rate[IN] = in_rate;
|
||||
rate[OUT] = out_rate;
|
||||
|
@ -392,7 +392,6 @@ static int fsl_dma_open(struct snd_soc_component *component,
|
||||
dma_addr_t ld_buf_phys;
|
||||
u64 temp_link; /* Pointer to next link descriptor */
|
||||
u32 mr;
|
||||
unsigned int channel;
|
||||
int ret = 0;
|
||||
unsigned int i;
|
||||
|
||||
@ -408,8 +407,6 @@ static int fsl_dma_open(struct snd_soc_component *component,
|
||||
return ret;
|
||||
}
|
||||
|
||||
channel = substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? 0 : 1;
|
||||
|
||||
if (dma->assigned) {
|
||||
dev_err(dev, "dma channel already assigned\n");
|
||||
return -EBUSY;
|
||||
|
@ -710,7 +710,7 @@ static int fsl_easrc_max_ch_for_slot(struct fsl_asrc_pair *ctx,
|
||||
struct fsl_easrc_slot *slot)
|
||||
{
|
||||
struct fsl_easrc_ctx_priv *ctx_priv = ctx->private;
|
||||
int st1_mem_alloc = 0, st2_mem_alloc = 0;
|
||||
int st1_mem_alloc = 0, st2_mem_alloc;
|
||||
int pf_mem_alloc = 0;
|
||||
int max_channels = 8 - slot->num_channel;
|
||||
int channels = 0;
|
||||
@ -748,7 +748,7 @@ static int fsl_easrc_config_one_slot(struct fsl_asrc_pair *ctx,
|
||||
{
|
||||
struct fsl_asrc *easrc = ctx->asrc;
|
||||
struct fsl_easrc_ctx_priv *ctx_priv = ctx->private;
|
||||
int st1_chanxexp, st1_mem_alloc = 0, st2_mem_alloc = 0;
|
||||
int st1_chanxexp, st1_mem_alloc = 0, st2_mem_alloc;
|
||||
unsigned int reg0, reg1, reg2, reg3;
|
||||
unsigned int addr;
|
||||
|
||||
@ -1328,7 +1328,7 @@ static int fsl_easrc_stop_context(struct fsl_asrc_pair *ctx)
|
||||
{
|
||||
struct fsl_asrc *easrc = ctx->asrc;
|
||||
int val, i;
|
||||
int size = 0;
|
||||
int size;
|
||||
int retry = 200;
|
||||
|
||||
regmap_read(easrc->regmap, REG_EASRC_CC(ctx->index), &val);
|
||||
|
@ -304,7 +304,7 @@ static int fsl_esai_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id,
|
||||
|
||||
if (IS_ERR(clksrc)) {
|
||||
dev_err(dai->dev, "no assigned %s clock\n",
|
||||
clk_id % 2 ? "extal" : "fsys");
|
||||
(clk_id % 2) ? "extal" : "fsys");
|
||||
return PTR_ERR(clksrc);
|
||||
}
|
||||
clk_rate = clk_get_rate(clksrc);
|
||||
|
@ -747,7 +747,7 @@ static int fsl_ssi_set_bclk(struct snd_pcm_substream *substream,
|
||||
sub *= 100000;
|
||||
do_div(sub, freq);
|
||||
|
||||
if (sub < savesub && !(i == 0 && psr == 0 && div2 == 0)) {
|
||||
if (sub < savesub && !(i == 0)) {
|
||||
baudrate = tmprate;
|
||||
savesub = sub;
|
||||
pm = i;
|
||||
@ -764,8 +764,7 @@ static int fsl_ssi_set_bclk(struct snd_pcm_substream *substream,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
stccr = SSI_SxCCR_PM(pm + 1) | (div2 ? SSI_SxCCR_DIV2 : 0) |
|
||||
(psr ? SSI_SxCCR_PSR : 0);
|
||||
stccr = SSI_SxCCR_PM(pm + 1);
|
||||
mask = SSI_SxCCR_PM_MASK | SSI_SxCCR_DIV2 | SSI_SxCCR_PSR;
|
||||
|
||||
/* STCCR is used for RX in synchronous mode */
|
||||
|
@ -10,16 +10,12 @@
|
||||
|
||||
/**
|
||||
* struct cpu_priv - CPU private data
|
||||
* @sysclk_freq: SYSCLK rates for set_sysclk()
|
||||
* @sysclk_dir: SYSCLK directions for set_sysclk()
|
||||
* @sysclk_id: SYSCLK ids for set_sysclk()
|
||||
* @slot_width: Slot width of each frame
|
||||
*
|
||||
* Note: [1] for tx and [0] for rx
|
||||
*/
|
||||
struct cpu_priv {
|
||||
unsigned long sysclk_freq[2];
|
||||
u32 sysclk_dir[2];
|
||||
u32 sysclk_id[2];
|
||||
u32 slot_width;
|
||||
};
|
||||
|
@ -411,7 +411,7 @@ int mpc5200_audio_dma_create(struct platform_device *op)
|
||||
psc_dma->dev = &op->dev;
|
||||
psc_dma->playback.psc_dma = psc_dma;
|
||||
psc_dma->capture.psc_dma = psc_dma;
|
||||
snprintf(psc_dma->name, sizeof psc_dma->name, "PSC%u", psc_dma->id);
|
||||
snprintf(psc_dma->name, sizeof(psc_dma->name), "PSC%d", psc_dma->id);
|
||||
|
||||
/* Find the address of the fifo data registers and setup the
|
||||
* DMA tasks */
|
||||
|
@ -190,7 +190,7 @@ static int mpc8610_hpcd_probe(struct platform_device *pdev)
|
||||
struct device_node *codec_np = NULL;
|
||||
struct mpc8610_hpcd_data *machine_data;
|
||||
struct snd_soc_dai_link_component *comp;
|
||||
int ret = -ENODEV;
|
||||
int ret;
|
||||
const char *sprop;
|
||||
const u32 *iprop;
|
||||
|
||||
|
@ -200,7 +200,7 @@ static int p1022_ds_probe(struct platform_device *pdev)
|
||||
struct device_node *codec_np = NULL;
|
||||
struct machine_data *mdata;
|
||||
struct snd_soc_dai_link_component *comp;
|
||||
int ret = -ENODEV;
|
||||
int ret;
|
||||
const char *sprop;
|
||||
const u32 *iprop;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user