From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="jofVXjQa" Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08E391A5 for ; Tue, 5 Dec 2023 21:39:15 -0800 (PST) Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-40bd5eaa66cso56336455e9.2 for ; Tue, 05 Dec 2023 21:39:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701841153; x=1702445953; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:message-id:subject:cc :to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=O4u7u9EhMLinCMKXbsJZZCgBovG/kdzoMMlzODKZOcY=; b=jofVXjQav42skNKW3WVLcTJv9Yb1fCMYBw/D+5st8Aa31DdsPJk4pJiyMLALucbvKF rID76S5sQtqqRQw4NkcsIB/vVfYCI7U6UNF3WSSA4RsDe9h20OiAPiso3EMnFtQYtopf n6nMD+O4zp9upBcBtOhgzwj6qFNxXiduWVK1g090cklFyrxIo5yHPilfIr76pCsnUSiU 6i3uve0asHudlEEvWvQPNJNwCSvAjdpdX14D0HzdmjzbZ6fsg5tReDzvptCzO2UkB153 LCzmhWQRP/ply6rBAhlbsX8ZnmnnoZUp85/JTfvJsfFIGRBAJLAlVnq/xOi9C/37bLbe Qo8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701841153; x=1702445953; h=in-reply-to:content-disposition:mime-version:message-id:subject:cc :to:from:date:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=O4u7u9EhMLinCMKXbsJZZCgBovG/kdzoMMlzODKZOcY=; b=nLfQI+XY9yRGlpIJjyunp0onatSAYuiU5G7x2rOsnrF8jIr/59vaLsmpSwB9hN2Cf7 xSYeRLd+YhwX1dSgjlWu6rIRhlta6Qmvo6xCPqBJb2qfJPXTuCtUCn+nzaPTU1oH9VS0 fgtPz1f0P8OY/0mfvlNwdDzHsuk9J7rZEZguXJQu7dzzkTNflFGq2et8Wur+ZkhD7C+O myxEQ4hWAPL3lZxr9E4bLr4rIS0a2GmDI7Gt5mNgPjc1zonx+fqInwegYzV43VhrXWWA FCwrJNSdSlXpIYFnTilTdNnAfLi5NIT+2N4tNI+SEkKTCSTdOX5QZli33sd7otpCXogI NOkQ== X-Gm-Message-State: AOJu0Yw6fXV1SughrGDsmP0nyq+x1FF7oKVQsQhiGNx/YX4UwlG7SKn+ vI+zDv6Nhs6ZOlZRloL6wfY0GA== X-Google-Smtp-Source: AGHT+IFAy6YDNnloe+CZg+064fYW1hphxl7Aimv9oj+A8PdlsOtVdmaSug/MC0yOqj37RYmzI49Gwg== X-Received: by 2002:a05:600c:4f15:b0:40c:192f:6ae8 with SMTP id l21-20020a05600c4f1500b0040c192f6ae8mr258952wmq.115.1701841153488; Tue, 05 Dec 2023 21:39:13 -0800 (PST) Received: from localhost ([102.36.222.112]) by smtp.gmail.com with ESMTPSA id fs16-20020a05600c3f9000b0040b48690c49sm20593171wmb.6.2023.12.05.21.39.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 21:39:13 -0800 (PST) Date: Wed, 6 Dec 2023 08:39:10 +0300 From: Dan Carpenter To: oe-kbuild@lists.linux.dev, Neil Armstrong , Srinivas Kandagatla , Banajit Goswami , Andy Gross , Bjorn Andersson , Konrad Dybcio , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jaroslav Kysela , Takashi Iwai Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev, linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Neil Armstrong Subject: Re: [PATCH v2 5/5] ASoC: codecs: Add WCD939x Codec driver Message-ID: <1a09512c-aaff-4fb6-914e-db755ce6e667@suswa.mountain> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231201-topic-sm8650-upstream-wcd939x-codec-v2-5-94ed814b25aa@linaro.org> Hi Neil, kernel test robot noticed the following build warnings: 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 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 | Reported-by: Dan Carpenter | 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 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; The Kconfig should probably depend on CONFIG_TYPEC to avoid a crash here. 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 } [ snip ] 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; This is type bool. return false? 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 } -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki