All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: Re: [PATCH v2 5/5] ASoC: codecs: Add WCD939x Codec driver
Date: Wed, 6 Dec 2023 01:45:23 +0800	[thread overview]
Message-ID: <202312060127.FLhplIP3-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20231201-topic-sm8650-upstream-wcd939x-codec-v2-5-94ed814b25aa@linaro.org>
References: <20231201-topic-sm8650-upstream-wcd939x-codec-v2-5-94ed814b25aa@linaro.org>
TO: Neil Armstrong <neil.armstrong@linaro.org>
TO: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
TO: Banajit Goswami <bgoswami@quicinc.com>
TO: Andy Gross <agross@kernel.org>
TO: Bjorn Andersson <andersson@kernel.org>
TO: Konrad Dybcio <konrad.dybcio@linaro.org>
TO: Liam Girdwood <lgirdwood@gmail.com>
TO: Mark Brown <broonie@kernel.org>
TO: Rob Herring <robh+dt@kernel.org>
TO: Krzysztof Kozlowski <krzk@kernel.org>
TO: Conor Dooley <conor+dt@kernel.org>
TO: Jaroslav Kysela <perex@perex.cz>
TO: Takashi Iwai <tiwai@suse.com>
CC: linux-arm-msm@vger.kernel.org
CC: alsa-devel@alsa-project.org
CC: linux-sound@vger.kernel.org
CC: devicetree@vger.kernel.org
CC: linux-kernel@vger.kernel.org
CC: Neil Armstrong <neil.armstrong@linaro.org>

Hi Neil,

kernel test robot noticed the following build warnings:

[auto build test WARNING on broonie-sound/for-next]
[also build test WARNING on linus/master v6.7-rc4 next-20231205]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Neil-Armstrong/ASoC-dt-bindings-document-WCD939x-Audio-Codec/20231202-000916
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
patch link:    https://lore.kernel.org/r/20231201-topic-sm8650-upstream-wcd939x-codec-v2-5-94ed814b25aa%40linaro.org
patch subject: [PATCH v2 5/5] ASoC: codecs: Add WCD939x Codec driver
:::::: branch date: 4 days ago
:::::: commit date: 4 days ago
config: powerpc64-randconfig-r081-20231204 (https://download.01.org/0day-ci/archive/20231206/202312060127.FLhplIP3-lkp@intel.com/config)
compiler: powerpc64-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231206/202312060127.FLhplIP3-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202312060127.FLhplIP3-lkp@intel.com/

New smatch warnings:
sound/soc/codecs/wcd939x.c:3168 wcd939x_typec_mux_set() error: 'wcd939x' dereferencing possible ERR_PTR()
sound/soc/codecs/wcd939x.c:3221 wcd939x_swap_gnd_mic() warn: signedness bug returning '(-22)'

Old smatch warnings:
sound/soc/codecs/wcd939x.c:3170 wcd939x_typec_mux_set() error: 'wcd939x' dereferencing possible ERR_PTR()
sound/soc/codecs/wcd939x.c:3173 wcd939x_typec_mux_set() error: 'wcd939x' dereferencing possible ERR_PTR()
sound/soc/codecs/wcd939x.c:3174 wcd939x_typec_mux_set() error: 'wcd939x' dereferencing possible ERR_PTR()
sound/soc/codecs/wcd939x.c:3176 wcd939x_typec_mux_set() error: 'wcd939x' dereferencing possible ERR_PTR()
sound/soc/codecs/wcd939x.c:3177 wcd939x_typec_mux_set() error: 'wcd939x' dereferencing possible ERR_PTR()
sound/soc/codecs/wcd939x.c:3179 wcd939x_typec_mux_set() error: 'wcd939x' dereferencing possible ERR_PTR()

vim +/wcd939x +3168 sound/soc/codecs/wcd939x.c

6c302e2f95b1d1 Neil Armstrong 2023-12-01  3163  
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3164  static int wcd939x_typec_mux_set(struct typec_mux_dev *mux,
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3165  				 struct typec_mux_state *state)
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3166  {
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3167  	struct wcd939x_priv *wcd939x = typec_mux_get_drvdata(mux);
6c302e2f95b1d1 Neil Armstrong 2023-12-01 @3168  	unsigned int previous_mode = wcd939x->typec_mode;
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3169  
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3170  	if (!wcd939x->wcd_mbhc)
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3171  		return -EINVAL;
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3172  
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3173  	if (wcd939x->typec_mode != state->mode) {
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3174  		wcd939x->typec_mode = state->mode;
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3175  
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3176  		if (wcd939x->typec_mode == TYPEC_MODE_AUDIO)
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3177  			return wcd_mbhc_typec_report_plug(wcd939x->wcd_mbhc);
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3178  		else if (previous_mode == TYPEC_MODE_AUDIO)
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3179  			return wcd_mbhc_typec_report_unplug(wcd939x->wcd_mbhc);
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3180  	}
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3181  
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3182  	return 0;
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3183  }
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3184  
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3185  static void wcd939x_dt_parse_micbias_info(struct device *dev, struct wcd939x_priv *wcd)
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3186  {
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3187  	struct device_node *np = dev->of_node;
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3188  	u32 prop_val = 0;
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3189  	int rc = 0;
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3190  
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3191  	rc = of_property_read_u32(np, "qcom,micbias1-microvolt",  &prop_val);
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3192  	if (!rc)
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3193  		wcd->micb1_mv = prop_val / 1000;
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3194  	else
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3195  		dev_info(dev, "%s: Micbias1 DT property not found\n", __func__);
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3196  
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3197  	rc = of_property_read_u32(np, "qcom,micbias2-microvolt",  &prop_val);
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3198  	if (!rc)
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3199  		wcd->micb2_mv = prop_val / 1000;
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3200  	else
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3201  		dev_info(dev, "%s: Micbias2 DT property not found\n", __func__);
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3202  
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3203  	rc = of_property_read_u32(np, "qcom,micbias3-microvolt", &prop_val);
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3204  	if (!rc)
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3205  		wcd->micb3_mv = prop_val / 1000;
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3206  	else
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3207  		dev_info(dev, "%s: Micbias3 DT property not found\n", __func__);
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3208  
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3209  	rc = of_property_read_u32(np, "qcom,micbias4-microvolt",  &prop_val);
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3210  	if (!rc)
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3211  		wcd->micb4_mv = prop_val / 1000;
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3212  	else
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3213  		dev_info(dev, "%s: Micbias4 DT property not found\n", __func__);
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3214  }
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3215  
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3216  static bool wcd939x_swap_gnd_mic(struct snd_soc_component *component, bool active)
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3217  {
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3218  	struct wcd939x_priv *wcd939x = snd_soc_component_get_drvdata(component);
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3219  
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3220  	if (!wcd939x->typec_analog_mux || !wcd939x->typec_switch)
6c302e2f95b1d1 Neil Armstrong 2023-12-01 @3221  		return -EINVAL;
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3222  
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3223  	/* Report inversion via Type Switch of USBSS */
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3224  	return typec_switch_set(wcd939x->typec_switch,
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3225  				wcd939x->typec_orientation == TYPEC_ORIENTATION_REVERSE ?
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3226  					TYPEC_ORIENTATION_NORMAL : TYPEC_ORIENTATION_REVERSE);
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3227  }
6c302e2f95b1d1 Neil Armstrong 2023-12-01  3228  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

             reply	other threads:[~2023-12-05 17:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-05 17:45 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-12-01 15:08 [PATCH v2 0/5] ASoC: codecs: add support for WCD939x Codec Neil Armstrong
2023-12-01 15:08 ` [PATCH v2 5/5] ASoC: codecs: Add WCD939x Codec driver Neil Armstrong
2023-12-05 17:12   ` kernel test robot
2023-12-05 17:22   ` kernel test robot
2023-12-06  5:39   ` Dan Carpenter
2023-12-06  8:10     ` Neil Armstrong
2023-12-06  7:10   ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202312060127.FLhplIP3-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=error27@gmail.com \
    --cc=oe-kbuild@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.