asoc: flags is used but is uninitialized
initialize flags to resolve static code analysis issue Change-Id: I23e74050e69db6894b02cbc00605861abdce0e56 Signed-off-by: Deru Wang <deruwang@codeaurora.org>
这个提交包含在:

提交者
Gerrit - the friendly Code Review server

父节点
700bd78ede
当前提交
f1a7ecab50
@@ -1252,7 +1252,7 @@ static int msm_lsm_ioctl_shared(struct snd_pcm_substream *substream,
|
|||||||
unsigned int cmd, void *arg)
|
unsigned int cmd, void *arg)
|
||||||
{
|
{
|
||||||
struct snd_soc_pcm_runtime *rtd;
|
struct snd_soc_pcm_runtime *rtd;
|
||||||
unsigned long flags;
|
unsigned long flags = 0;
|
||||||
int ret;
|
int ret;
|
||||||
struct snd_lsm_sound_model_v2 snd_model_v2;
|
struct snd_lsm_sound_model_v2 snd_model_v2;
|
||||||
struct snd_lsm_session_data session_data;
|
struct snd_lsm_session_data session_data;
|
||||||
|
@@ -161,7 +161,7 @@ static void pcm_afe_process_tx_pkt(uint32_t opcode,
|
|||||||
void *priv)
|
void *priv)
|
||||||
{
|
{
|
||||||
struct pcm_afe_info *prtd = priv;
|
struct pcm_afe_info *prtd = priv;
|
||||||
unsigned long dsp_flags;
|
unsigned long dsp_flags = 0;
|
||||||
struct snd_pcm_substream *substream = NULL;
|
struct snd_pcm_substream *substream = NULL;
|
||||||
struct snd_pcm_runtime *runtime = NULL;
|
struct snd_pcm_runtime *runtime = NULL;
|
||||||
uint16_t event;
|
uint16_t event;
|
||||||
@@ -255,7 +255,7 @@ static void pcm_afe_process_rx_pkt(uint32_t opcode,
|
|||||||
void *priv)
|
void *priv)
|
||||||
{
|
{
|
||||||
struct pcm_afe_info *prtd = priv;
|
struct pcm_afe_info *prtd = priv;
|
||||||
unsigned long dsp_flags;
|
unsigned long dsp_flags = 0;
|
||||||
struct snd_pcm_substream *substream = NULL;
|
struct snd_pcm_substream *substream = NULL;
|
||||||
struct snd_pcm_runtime *runtime = NULL;
|
struct snd_pcm_runtime *runtime = NULL;
|
||||||
struct snd_soc_pcm_runtime *rtd = NULL;
|
struct snd_soc_pcm_runtime *rtd = NULL;
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-only
|
// SPDX-License-Identifier: GPL-2.0-only
|
||||||
/* Copyright (c) 2013-2014, 2017-2019 The Linux Foundation. All rights reserved.
|
/* Copyright (c) 2013-2014, 2017-2020 The Linux Foundation. All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
@@ -224,7 +224,7 @@ static int msm_pcm_capture_copy(struct snd_pcm_substream *substream,
|
|||||||
struct dtmf_buf_node *buf_node = NULL;
|
struct dtmf_buf_node *buf_node = NULL;
|
||||||
struct snd_pcm_runtime *runtime = substream->runtime;
|
struct snd_pcm_runtime *runtime = substream->runtime;
|
||||||
struct dtmf_drv_info *prtd = runtime->private_data;
|
struct dtmf_drv_info *prtd = runtime->private_data;
|
||||||
unsigned long dsp_flags;
|
unsigned long dsp_flags = 0;
|
||||||
|
|
||||||
ret = wait_event_interruptible_timeout(prtd->out_wait,
|
ret = wait_event_interruptible_timeout(prtd->out_wait,
|
||||||
(!list_empty(&prtd->out_queue)),
|
(!list_empty(&prtd->out_queue)),
|
||||||
@@ -324,7 +324,7 @@ static int msm_pcm_close(struct snd_pcm_substream *substream)
|
|||||||
struct snd_pcm_substream *c_substream;
|
struct snd_pcm_substream *c_substream;
|
||||||
struct snd_pcm_runtime *runtime = substream->runtime;
|
struct snd_pcm_runtime *runtime = substream->runtime;
|
||||||
struct dtmf_drv_info *prtd = runtime->private_data;
|
struct dtmf_drv_info *prtd = runtime->private_data;
|
||||||
unsigned long dsp_flags;
|
unsigned long dsp_flags = 0;
|
||||||
|
|
||||||
pr_debug("%s() DTMF\n", __func__);
|
pr_debug("%s() DTMF\n", __func__);
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-only
|
// SPDX-License-Identifier: GPL-2.0-only
|
||||||
/* Copyright (c) 2013-2019, The Linux Foundation. All rights reserved.
|
/* Copyright (c) 2013-2020, The Linux Foundation. All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
@@ -678,7 +678,7 @@ static void hpcm_copy_capture_data_to_queue(struct dai_data *dai_data,
|
|||||||
uint32_t len)
|
uint32_t len)
|
||||||
{
|
{
|
||||||
struct hpcm_buf_node *buf_node = NULL;
|
struct hpcm_buf_node *buf_node = NULL;
|
||||||
unsigned long dsp_flags;
|
unsigned long dsp_flags = 0;
|
||||||
|
|
||||||
if (dai_data->substream == NULL)
|
if (dai_data->substream == NULL)
|
||||||
return;
|
return;
|
||||||
@@ -987,7 +987,7 @@ static int msm_pcm_close(struct snd_pcm_substream *substream)
|
|||||||
struct snd_dma_buffer *dma_buf;
|
struct snd_dma_buffer *dma_buf;
|
||||||
struct snd_pcm_runtime *runtime;
|
struct snd_pcm_runtime *runtime;
|
||||||
struct hpcm_drv *prtd;
|
struct hpcm_drv *prtd;
|
||||||
unsigned long dsp_flags;
|
unsigned long dsp_flags = 0;
|
||||||
struct dai_data *dai_data = NULL;
|
struct dai_data *dai_data = NULL;
|
||||||
struct tap_point *tp = NULL;
|
struct tap_point *tp = NULL;
|
||||||
struct tappnt_mxr_data *tmd = NULL;
|
struct tappnt_mxr_data *tmd = NULL;
|
||||||
@@ -1077,7 +1077,7 @@ static int msm_pcm_playback_copy(struct snd_pcm_substream *substream, int a,
|
|||||||
struct snd_pcm_runtime *runtime = substream->runtime;
|
struct snd_pcm_runtime *runtime = substream->runtime;
|
||||||
struct hpcm_drv *prtd = runtime->private_data;
|
struct hpcm_drv *prtd = runtime->private_data;
|
||||||
struct dai_data *dai_data = hpcm_get_dai_data(substream->pcm->id, prtd);
|
struct dai_data *dai_data = hpcm_get_dai_data(substream->pcm->id, prtd);
|
||||||
unsigned long dsp_flags;
|
unsigned long dsp_flags = 0;
|
||||||
|
|
||||||
if (dai_data == NULL) {
|
if (dai_data == NULL) {
|
||||||
pr_err("%s, dai_data is null\n", __func__);
|
pr_err("%s, dai_data is null\n", __func__);
|
||||||
@@ -1129,7 +1129,7 @@ static int msm_pcm_capture_copy(struct snd_pcm_substream *substream,
|
|||||||
struct snd_pcm_runtime *runtime = substream->runtime;
|
struct snd_pcm_runtime *runtime = substream->runtime;
|
||||||
struct hpcm_drv *prtd = runtime->private_data;
|
struct hpcm_drv *prtd = runtime->private_data;
|
||||||
struct dai_data *dai_data = hpcm_get_dai_data(substream->pcm->id, prtd);
|
struct dai_data *dai_data = hpcm_get_dai_data(substream->pcm->id, prtd);
|
||||||
unsigned long dsp_flags;
|
unsigned long dsp_flags = 0;
|
||||||
|
|
||||||
if (dai_data == NULL) {
|
if (dai_data == NULL) {
|
||||||
pr_err("%s, dai_data is null\n", __func__);
|
pr_err("%s, dai_data is null\n", __func__);
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-only
|
// SPDX-License-Identifier: GPL-2.0-only
|
||||||
/* Copyright (c) 2012-2019, The Linux Foundation. All rights reserved.
|
/* Copyright (c) 2012-2020, The Linux Foundation. All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
@@ -508,7 +508,7 @@ static void voip_process_dl_pkt(uint8_t *voc_pkt, void *private_data)
|
|||||||
{
|
{
|
||||||
struct voip_buf_node *buf_node = NULL;
|
struct voip_buf_node *buf_node = NULL;
|
||||||
struct voip_drv_info *prtd = private_data;
|
struct voip_drv_info *prtd = private_data;
|
||||||
unsigned long dsp_flags;
|
unsigned long dsp_flags = 0;
|
||||||
uint32_t rate_type;
|
uint32_t rate_type;
|
||||||
uint32_t frame_rate;
|
uint32_t frame_rate;
|
||||||
u32 pkt_len;
|
u32 pkt_len;
|
||||||
@@ -778,7 +778,7 @@ static int msm_pcm_playback_copy(struct snd_pcm_substream *substream, int a,
|
|||||||
struct voip_buf_node *buf_node = NULL;
|
struct voip_buf_node *buf_node = NULL;
|
||||||
struct snd_pcm_runtime *runtime = substream->runtime;
|
struct snd_pcm_runtime *runtime = substream->runtime;
|
||||||
struct voip_drv_info *prtd = runtime->private_data;
|
struct voip_drv_info *prtd = runtime->private_data;
|
||||||
unsigned long dsp_flags;
|
unsigned long dsp_flags = 0;
|
||||||
|
|
||||||
pr_debug("%s: fbytes=%lu\n", __func__, fbytes);
|
pr_debug("%s: fbytes=%lu\n", __func__, fbytes);
|
||||||
|
|
||||||
@@ -852,7 +852,7 @@ static int msm_pcm_capture_copy(struct snd_pcm_substream *substream,
|
|||||||
struct voip_buf_node *buf_node = NULL;
|
struct voip_buf_node *buf_node = NULL;
|
||||||
struct snd_pcm_runtime *runtime = substream->runtime;
|
struct snd_pcm_runtime *runtime = substream->runtime;
|
||||||
struct voip_drv_info *prtd = runtime->private_data;
|
struct voip_drv_info *prtd = runtime->private_data;
|
||||||
unsigned long dsp_flags;
|
unsigned long dsp_flags = 0;
|
||||||
int size;
|
int size;
|
||||||
|
|
||||||
pr_debug("%s: fbytes = %lu\n", __func__, fbytes);
|
pr_debug("%s: fbytes = %lu\n", __func__, fbytes);
|
||||||
@@ -941,7 +941,7 @@ static int msm_pcm_close(struct snd_pcm_substream *substream)
|
|||||||
struct snd_pcm_substream *p_substream, *c_substream;
|
struct snd_pcm_substream *p_substream, *c_substream;
|
||||||
struct snd_pcm_runtime *runtime;
|
struct snd_pcm_runtime *runtime;
|
||||||
struct voip_drv_info *prtd;
|
struct voip_drv_info *prtd;
|
||||||
unsigned long dsp_flags;
|
unsigned long dsp_flags = 0;
|
||||||
|
|
||||||
if (substream == NULL) {
|
if (substream == NULL) {
|
||||||
pr_err("substream is NULL\n");
|
pr_err("substream is NULL\n");
|
||||||
|
@@ -1200,7 +1200,7 @@ int msm_adsp_inform_mixer_ctl(struct snd_soc_pcm_runtime *rtd,
|
|||||||
int ctl_len = 0, ret = 0;
|
int ctl_len = 0, ret = 0;
|
||||||
struct dsp_stream_callback_list *new_event;
|
struct dsp_stream_callback_list *new_event;
|
||||||
struct dsp_stream_callback_list *oldest_event;
|
struct dsp_stream_callback_list *oldest_event;
|
||||||
unsigned long spin_flags;
|
unsigned long spin_flags = 0;
|
||||||
struct dsp_stream_callback_prtd *kctl_prtd = NULL;
|
struct dsp_stream_callback_prtd *kctl_prtd = NULL;
|
||||||
struct msm_adsp_event_data *event_data = NULL;
|
struct msm_adsp_event_data *event_data = NULL;
|
||||||
const char *mixer_ctl_name = DSP_STREAM_CALLBACK;
|
const char *mixer_ctl_name = DSP_STREAM_CALLBACK;
|
||||||
@@ -1309,7 +1309,7 @@ int msm_adsp_stream_callback_get(struct snd_kcontrol *kcontrol,
|
|||||||
{
|
{
|
||||||
uint32_t payload_size = 0;
|
uint32_t payload_size = 0;
|
||||||
struct dsp_stream_callback_list *oldest_event;
|
struct dsp_stream_callback_list *oldest_event;
|
||||||
unsigned long spin_flags;
|
unsigned long spin_flags = 0;
|
||||||
struct dsp_stream_callback_prtd *kctl_prtd = NULL;
|
struct dsp_stream_callback_prtd *kctl_prtd = NULL;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-only
|
// SPDX-License-Identifier: GPL-2.0-only
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
@@ -36,7 +36,7 @@ int apr_tal_write(struct apr_svc_ch_dev *apr_ch, void *data,
|
|||||||
struct apr_pkt_priv *pkt_priv, int len)
|
struct apr_pkt_priv *pkt_priv, int len)
|
||||||
{
|
{
|
||||||
int rc = 0, retries = 0;
|
int rc = 0, retries = 0;
|
||||||
unsigned long flags;
|
unsigned long flags = 0;
|
||||||
struct rpmsg_device *rpdev = NULL;
|
struct rpmsg_device *rpdev = NULL;
|
||||||
|
|
||||||
if (!apr_ch || len > APR_MAX_BUF ||
|
if (!apr_ch || len > APR_MAX_BUF ||
|
||||||
@@ -186,7 +186,7 @@ static int apr_tal_rpmsg_callback(struct rpmsg_device *rpdev,
|
|||||||
void *data, int len, void *priv, u32 addr)
|
void *data, int len, void *priv, u32 addr)
|
||||||
{
|
{
|
||||||
struct apr_svc_ch_dev *apr_ch = dev_get_drvdata(&rpdev->dev);
|
struct apr_svc_ch_dev *apr_ch = dev_get_drvdata(&rpdev->dev);
|
||||||
unsigned long flags;
|
unsigned long flags = 0;
|
||||||
|
|
||||||
if (!apr_ch || !data) {
|
if (!apr_ch || !data) {
|
||||||
pr_err("%s: Invalid apr_ch or ptr\n", __func__);
|
pr_err("%s: Invalid apr_ch or ptr\n", __func__);
|
||||||
|
在新工单中引用
屏蔽一个用户