From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4178A21FF23 for ; Sun, 14 Jun 2026 15:45:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781451933; cv=none; b=p9Rvr5ZHbUyubgxgoqat5RyFjs7BxvDNtNwfYnaWRHTYrdFQuqmEr7gdxtFmT4DRGml34Cv4fvmup9G5LDj5FORWMI7crr/GiTwP9ilT35knPf5VzCWukv1jBCGN+6dmO6W1L7gzBHRJ3CKTEyVaP9UzxiDsPoAD5WWTyD4t0iU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781451933; c=relaxed/simple; bh=lhQg0++53cN6YWLsvuYUtWRHnABUxZRuUet4RxtPuNY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tb/8PchPlRAoUX9HK7NB0LIWaLhjZ7q1pSRrgq7BgC58Gfc/i2EkmaVNQe4TznC43685kKEbmQ+ZY/F9JkZgc9IR3I1d7MFZoeXa10uVqaWnDdw8PYq40fox8t7EoKKIJPVV+RAEXi6KUF3iGVZTRmCBhOx72tVozqiB3YsDTbY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=c4b3AnGH; arc=none smtp.client-ip=209.85.128.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="c4b3AnGH" Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-49222b6e871so10881025e9.3 for ; Sun, 14 Jun 2026 08:45:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1781451930; x=1782056730; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=opTcDvpoHFRHn9n+WZGobddkXtZDg7nJ4XpbwWq3BKs=; b=c4b3AnGHaTtEycwvBiJjYZIQsgjJV40Pz3CxIIFjdGBa1D8gFmtN72O5vp9I27Bo0L X9aL13KSWrfYB+XDR1y78nJAMAFppqQqylvmCMWIzwMv0Ea0070KtH9InL9+e4K1zvu+ R3wg1dfDtE75sVOH8EKw9cgIbHfkxADO+azXoecouasc+06IGqaDQbOWR/T6OKLRN1NE rqJXCnc7nMdp4WZCkWZiAaAAh1+tKvgFf3HumC3Vu3qxb8/nzCy20GQRcYEgwO/vRTQm QD50CXn52qZPl8ovF0Fs5hovZXSazcXwp2EyPFhiw9aGX5AmuDaXPDqpnrVTB0ZxBfcQ NZwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781451930; x=1782056730; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=opTcDvpoHFRHn9n+WZGobddkXtZDg7nJ4XpbwWq3BKs=; b=oJ6a6VA/62P/EgzE3cjSxp9yd51ymMEjYaotyEQTbPgV1ZDxWYvrFa5zHEg77VXgYI ZmRKvig/hk0pN0fefQVTyXkp6aknApTDlKi8kRObUOLQOPYC5W/QLuxgpPuJOiDT1wYN hQP+qnpiOzhsG8wChMJZUp0K0kEPFFiwEAauy5ewRrUNFfEbzVi9D6wkl/Sl7CmNZyyU ycj9XFcY3ukuC5BwLOlVaq2ysrH7zH8DJ8SxFAeWmN/jj5hoFP/dK0ZILSnXioQ0CTWJ pFrKf1uapJX23xi7NIn4oVALuDJyxeWe6Gzd1ACcROsNNA2uTgyRU2B0wcyK3yYz+HI4 lvHw== X-Forwarded-Encrypted: i=1; AFNElJ/2cQW1DelrQwT3RamIhLQw7X+cGTQgSKqb3V/ZWIAsnzcXclCGscf3plpSzqJnDi2PkWbdvJlIXOmv+NI=@vger.kernel.org X-Gm-Message-State: AOJu0YwppuoSH/k/0saqLLwaec4miIHURHH+xEkKbLku1dFB/HOmamIN ZSe34oOGLrM3Mba8Z+sjpuFCIAgwGVcinXoqJExqU/gRIt5JA2VW8Wxk X-Gm-Gg: Acq92OHQsXZmT/TXX39aaUrS94Ntv2BQF6d9fnwU5cc8i6pTY1SRdVInIgaSp6eUIqG 2OUphfIBwmjTu7frhSnOoZpVtPcEMQ32hKALU9mTiEiXNW8k3lmSL085Xy3sdHxDPYjtYYKilLd hYNYcej+V05ez76QfcLuzN4MnmHMz/kZb+ofZkL5xwr9NhVVMD+Jczjo6rv29Xj1lAl1FqVqx6M ARPA1dSca5mhfUpcuvF81IsvyDvNM/f1K8+I+t4GxzPJYHL8u8wxjGsD+VrEWo5NIAoeO83lLU6 DbyXJ2PemhaDAymn5xtcRFnvfhAot2NbULzC+wzSsJzLnO5jOS2w2yBGtbFw9jJJjYmKBGmhTgK AvfTWNB/82QVW5weHYFZLLnPTJIYXp4tZGESdU85uYGXvlD9x+fSN6C2dO4DXik+t715j5HPe1p E7HuXECBU/NuzgY2/asn9fvB4QoAGDQY6vQBAhYJgP+GvuyQ== X-Received: by 2002:a05:600c:4685:b0:490:e190:3b50 with SMTP id 5b1f17b1804b1-490ec4d4f7cmr162561785e9.9.1781451929565; Sun, 14 Jun 2026 08:45:29 -0700 (PDT) Received: from fedora ([154.182.122.228]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4922031b7d2sm184237135e9.5.2026.06.14.08.45.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Jun 2026 08:45:29 -0700 (PDT) From: Abdelnasser Hussein To: gregkh@linuxfoundation.org Cc: vaibhav.sr@gmail.com, mgreer@animalcreek.com, johan@kernel.org, elder@kernel.org, greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Abdelnasser Hussein , kernel test robot Subject: [PATCH v3 2/2] staging: greybus: audio_codec: remove redundant else-if check Date: Sun, 14 Jun 2026 18:43:29 +0300 Message-ID: <20260614154329.5176-3-abdelnasserhussein11@gmail.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260614154329.5176-1-abdelnasserhussein11@gmail.com> References: <20260614154329.5176-1-abdelnasserhussein11@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit In gbaudio_module_update(), the widget id is validated earlier in the function to ensure it is either snd_soc_dapm_aif_in or snd_soc_dapm_aif_out. Remove the redundant else-if check for snd_soc_dapm_aif_out. The remaining branch can only handle snd_soc_dapm_aif_out, which avoids a compiler warning about a potentially uninitialized variable. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202606140347.gGVWDnbi-lkp@intel.com/ Signed-off-by: Abdelnasser Hussein --- Changes in v3: - Split from the previous v2 patch to address the uninitialized variable warning separately. drivers/staging/greybus/audio_codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/greybus/audio_codec.c b/drivers/staging/greybus/audio_codec.c index 295222ec0f1a..6daa4e706792 100644 --- a/drivers/staging/greybus/audio_codec.c +++ b/drivers/staging/greybus/audio_codec.c @@ -322,7 +322,7 @@ int gbaudio_module_update(struct gbaudio_codec_info *codec, ret = gbaudio_module_enable_tx(codec, module, dai_id); else ret = gbaudio_module_disable_tx(module, dai_id); - } else if (w->id == snd_soc_dapm_aif_out) { + } else { if (enable) ret = gbaudio_module_enable_rx(codec, module, dai_id); else -- 2.54.0