From patchwork Thu Jun 27 15:23:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13714666 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 6B4151990D7 for ; Thu, 27 Jun 2024 15:23:52 +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=1719501834; cv=none; b=Fi1xpBHY9TRdd6ViiT3mNMlbRobVXMJViAWFw2PEcWuFdN17EJsgKCyNiVLbgrxzXSlmBp21LKIey37ECEzobxsaeirfD+cM6snHxmfAzG56mW6IsautkYxmfPSWgeK2hdMyLfEOsm0xhBb18PHICYqgx/vCiiZVpUn+NSvjBC4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719501834; c=relaxed/simple; bh=E5oOz7sdP4TDRC9ZCb7arqSJ0fJXExTXVIN5dMViRhE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=JSHml2LoR790aaclc6QSVbSehdskB6oQVETll8SmqJkUAIOmZ96ukkPHDmL1s0F+ij367UrsvAl22W/V0hL1t94/kPliqIu9mjx2Ox2KbB71GeBE/Fk7vcI+6/bNQ3ZS+ogbbwyC4cqvDlLIAc/MyU0A0UYU1Nh5uXAAsah2yfs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=Hbw49NQ0; arc=none smtp.client-ip=209.85.128.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Hbw49NQ0" Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-4255fa23f7bso14313155e9.2 for ; Thu, 27 Jun 2024 08:23:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719501831; x=1720106631; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=13oJHL7pizeIHoUG8WVLWL5BIb0MIcpOEu5bQiczopw=; b=Hbw49NQ07fd5ZP6tyHkc0EukknM0hRROAFfonKv/B2kbfq/+fVD0IOPyKFNwTsTF3T iqMpDaJBdCqCQfw2JL0Y/OSvjpwjdnKWMBA0a6owsqOXafZ7ztpQvHQENnV1mVXaCgNI uV5hlTT+CuxBeAt1mvuMkyKHsS3sVxVsyRni+vaSILW2XnSs9h9QuaAiLmHGO7ZQnu5H Uz/dr2FV81NjvuFBPgS+YYbHh3FHFoAvZ2Iadidea9+/ItIKqINdV4iabvjKHTz8BB+U fo1a2mE4Z9XHQjxVyEZT9KcWmQEBOvWqy2C8wCWmervqLUl8n/KfOLQXN3dmi/qoy1wN x6qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719501831; x=1720106631; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=13oJHL7pizeIHoUG8WVLWL5BIb0MIcpOEu5bQiczopw=; b=f79WSLdSWfQubvfvtZ8FccTKAt7D9FQV7xLzhB+31ZAhA8T0PwMW3pIBNpb4Kuzs31 1+IpfMhE4tHw1ISfck1PTPaBwS74+3xDwDy4g3rzq1vOvIdB+fRDN58K9/Sc8KWxas0F khipLTF54RWkoZpuqu2RX4IhsIDbN/FP/Wh4Pm6YNxttKXzNj1kMcWjwoAvu4WA0jWxS FurMMC85HsroQ8dRa3oEjDKnJ0lhuDFAYMJRr/+fc6bZcAmWZd7VPl1cbjYHJ7opJlvh y6anlBusduUoQUwJH5f9i6AW72FJ5s5wl/4jK9LxOc3s0/jLKvWf8HAd+LEJugdy13sV 0ASA== X-Forwarded-Encrypted: i=1; AJvYcCW3o6WoFAnIijAPFRmhS14vqRyppkZRoYoYcm5zfi7vqc4sDGgZzAbGBygi2bcc1ET6CvNG0t0EdI8EzaRPwmMmcDQmohdoLF9mF9XuQw== X-Gm-Message-State: AOJu0YzZvgm5oT9vHlLzlJUm4zRL48P6173ZfrMbGW7qttBz9Wwzqtp4 hkUVtaTQS2bm874FLP1Nhx+miR7aDK1rttQCKuTKd3q5HyESdLA3rM9qOZK6oJfezrVOn9RDA/A R X-Google-Smtp-Source: AGHT+IG00Cg6oV6ZliCSxQJsuMusb0Dl5UMtna//eXTdeaQJXGsBIZ2HCW+7f3aUgVQQTxJYIV/R2g== X-Received: by 2002:a05:600c:6a1a:b0:424:ac5e:eedf with SMTP id 5b1f17b1804b1-424ac5eef8emr40354185e9.16.1719501830661; Thu, 27 Jun 2024 08:23:50 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.137]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42564bb59b7sm32783185e9.34.2024.06.27.08.23.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jun 2024 08:23:50 -0700 (PDT) From: Krzysztof Kozlowski Date: Thu, 27 Jun 2024 17:23:43 +0200 Subject: [PATCH 1/4] ASoC: codecs: lpass-rx-macro: Simplify with devm allocations Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240627-b4-qcom-audio-lpass-codec-cleanups-v1-1-ede31891d238@linaro.org> References: <20240627-b4-qcom-audio-lpass-codec-cleanups-v1-0-ede31891d238@linaro.org> In-Reply-To: <20240627-b4-qcom-audio-lpass-codec-cleanups-v1-0-ede31891d238@linaro.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2547; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=E5oOz7sdP4TDRC9ZCb7arqSJ0fJXExTXVIN5dMViRhE=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmfYQAe0I1btoC63u16bijpn+fzlW1AXZpq9Cd/ Rzui/72X/yJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZn2EAAAKCRDBN2bmhouD 19nMEACUIwhiWwj9WBEryPz80KjgFMFzDmMHT39ES+0mBv0cmrlKejxjeXPqNK+f/g/sUl9nyd0 YcPwTb6xIA5s8+HOuO2riq5OQ/zfLOZKuPGitH+otvSFYWSVsivXsbr3iQpSuJiyrQuXf2SlSI5 Gb1WqCbt87VGYjDY3+z0H40G+QY1e1pfXp8isc+rttY/ZGQTIwECLFeHusI8PxfV+uwPvtKHCGN QmBvEr5o9Y4ObFNTa4sEFxSDotDgJASIIJkwvNIje2LwPkwMUNJsJvvNNswrHUSeZiLzstB0SJA 6pbhxTpK42pXxcFg9WpMLAf30NQ4U2I3OzDkhM/LvlCswgkAI3lGRC2gbg3eTfRXpBoxY+hQt3g srcPw6Ftwic71FiQUsWxlBB/IKWCrV1CJdiD5p0SpcsgyGq/dulH4M3gjv+LNkw9ZRjg29iVCD8 SWN8P77D21K/Pf+OeF6PRA9vIKtf3YqEjqBMgCeHKJ/QJwoWxg4gHnFHbSm4H0Siegz0W26SKqx smaNQyORq8sx7jHRsmbpL9gd88NkcKVcJES0jBa1UMjytcMZ9AA2p2fQ4R6nLqXS3KXTtmUpq1e TJ7XkLyVboR7mH9h4y+FlT0QOxBFxGTrkEvBwOHCLRdxCcDiyFLjbBt/QF/lk491zDrvSpdsaQx bbabGG7xO10D6Ww== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Allocate the default register values array with devm interface to reduce number of error paths. The array is not used after initializing regmap, so move the freeing to place right after devm_regmap_init_mmio() to make it obvious. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov --- sound/soc/codecs/lpass-rx-macro.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/sound/soc/codecs/lpass-rx-macro.c b/sound/soc/codecs/lpass-rx-macro.c index 9c4f0763675d..59fe76b13cdb 100644 --- a/sound/soc/codecs/lpass-rx-macro.c +++ b/sound/soc/codecs/lpass-rx-macro.c @@ -3817,7 +3817,9 @@ static int rx_macro_probe(struct platform_device *pdev) case LPASS_CODEC_VERSION_2_1: rx->rxn_reg_stride = 0x80; def_count = ARRAY_SIZE(rx_defaults) + ARRAY_SIZE(rx_pre_2_5_defaults); - reg_defaults = kmalloc_array(def_count, sizeof(struct reg_default), GFP_KERNEL); + reg_defaults = devm_kmalloc_array(dev, def_count, + sizeof(struct reg_default), + GFP_KERNEL); if (!reg_defaults) { ret = -ENOMEM; goto err; @@ -3832,7 +3834,9 @@ static int rx_macro_probe(struct platform_device *pdev) case LPASS_CODEC_VERSION_2_8: rx->rxn_reg_stride = 0xc0; def_count = ARRAY_SIZE(rx_defaults) + ARRAY_SIZE(rx_2_5_defaults); - reg_defaults = kmalloc_array(def_count, sizeof(struct reg_default), GFP_KERNEL); + reg_defaults = devm_kmalloc_array(dev, def_count, + sizeof(struct reg_default), + GFP_KERNEL); if (!reg_defaults) { ret = -ENOMEM; goto err; @@ -3853,8 +3857,9 @@ static int rx_macro_probe(struct platform_device *pdev) rx->regmap = devm_regmap_init_mmio(dev, base, &rx_regmap_config); if (IS_ERR(rx->regmap)) { ret = PTR_ERR(rx->regmap); - goto err_ver; + goto err; } + devm_kfree(dev, reg_defaults); dev_set_drvdata(dev, rx); @@ -3866,7 +3871,7 @@ static int rx_macro_probe(struct platform_device *pdev) ret = clk_prepare_enable(rx->macro); if (ret) - goto err_ver; + goto err; ret = clk_prepare_enable(rx->dcodec); if (ret) @@ -3912,7 +3917,6 @@ static int rx_macro_probe(struct platform_device *pdev) if (ret) goto err_clkout; - kfree(reg_defaults); return 0; err_clkout: @@ -3925,8 +3929,6 @@ static int rx_macro_probe(struct platform_device *pdev) clk_disable_unprepare(rx->dcodec); err_dcodec: clk_disable_unprepare(rx->macro); -err_ver: - kfree(reg_defaults); err: lpass_macro_pds_exit(rx->pds); From patchwork Thu Jun 27 15:23:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13714667 Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) (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 B81DC1991B3 for ; Thu, 27 Jun 2024 15:23:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719501835; cv=none; b=nQ843xFQ1LnW7E/T+cx1kDBQm8q0lXq+B0PLc0or9K7xfF9gvOrZUbCWZGUExveqwUcL1ujhAxZr0KJtBUTnEaGWSvX0gDHyeM95RMGcUDSKTShwQ5wUde08na2ZG5e7wDf11sNEGMNGP/RS5XXb1VK5wBA1ZDkzteWN2oR8wNY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719501835; c=relaxed/simple; bh=bGXi5j7RtMWqTV/YOEsZohRFyc1PuafBeHL3YjZpRpI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=JoefaMnlIWc9tkot5Nvtr4IEAdU/3Faw+K4OJxS2Lr+PppkX0mrEfe7T6m7YHbGzSzbTdSI23ZgfUdyxJY9LfyJvh31r3VzU9xFVR4R2hw8LfA5jsHaPCrMBblTaH5vIMnO9R1uEt4k611FbBMvYv7sfmt+WCiv32Bhk2ZwO9Rg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=Nki+dQg6; arc=none smtp.client-ip=209.85.167.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Nki+dQg6" Received: by mail-lf1-f46.google.com with SMTP id 2adb3069b0e04-52cdebf9f53so5641975e87.2 for ; Thu, 27 Jun 2024 08:23:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719501832; x=1720106632; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=RYQGDqdm11IXNknTjts1TE9ajQ2ABZYYP3j2vEJ9x9w=; b=Nki+dQg6HXUxSjkUzd3N5d9NlSR4r+d9J9FCTT18aLKXyOUYxNI/qehx9MkBtUyX0a pBSNhfEz3hs/Iv5rCWD1A2I+Mur4ug6+g8dhm1ILkWbrvasUsoiMQzpB/yeeqU+ZfEsN O9IyB5mqCKGBo++Yx0PVSOC0ZMJS78r2NoDcULA9udSIzfdZjTGsUKKYa7+Pziq2tltR ox93Dg5KWmqDPmlejfLhZBJrAEOSeH7cVdRFOKejeB8tuN0THqMN0EDCafDik/DKVIlG 7IsxK1hJS3yrQcHbEp6awetmznRXeKj3L3pNcV7w0RBobHZREYweMSJWEKBUMJV0+eRD gMvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719501832; x=1720106632; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RYQGDqdm11IXNknTjts1TE9ajQ2ABZYYP3j2vEJ9x9w=; b=WbFOByk6WlIGpVfzZRb4QqMpAGhfBYUeO2iQER5q8cyfA75KE7eXvcv14HO58SmJ4g VGt4wwbV1w1O3RvgNuEfqQaUJamI69qdKujeOrWUpxcOaAVUHwsrTdpq+UmMi8E99eU8 9759MH0SD08+Z4GoAyVErwOwdlX325DVM/wGi2x97Q/kJ95rCNb0JdpZgouzcNSyDtH8 p/34x6eqVzekmzXM9GibScz9+2qDpb8X1qIgzDY8qExk8geoJ80v3GFk2tnA9JZB6qSk oew/y1B9ACmHtb1EcYHt77m3r9S6yVF5EdBf4yamN3FsFRdn4UzdsGC11mAvZYLC2yYk Kp/A== X-Forwarded-Encrypted: i=1; AJvYcCV4pkfz6FRE+Ieu6BlVybK8nd6sLtzPRb7afRHIMYVFrVY1R0GJWV+VBQvWRzUQXcmhbIAuNXyG/FJ1PW62g65fY1wf38zp6ZFrU4Lz/Q== X-Gm-Message-State: AOJu0YyCuh+ZyIi4MXj3bXbDsdtWX0/4NqH18A/6WvSaubXWqMoo7y/1 +SCjlL26WFSMHsjbHztdf66b1uDXwYkIrr6ZAJek7JA1tVXj2yMJz6l1IKyICO0= X-Google-Smtp-Source: AGHT+IF9f7edEKwKerNIjhX3uTXOTM1OPnrW5fODb6A/0TRznA8i8xLuQYfbAyXq18C3tMQn2lJbpQ== X-Received: by 2002:a05:6512:3988:b0:52d:b1e4:b327 with SMTP id 2adb3069b0e04-52db1e4b3eamr4743847e87.43.1719501831927; Thu, 27 Jun 2024 08:23:51 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.137]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42564bb59b7sm32783185e9.34.2024.06.27.08.23.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jun 2024 08:23:51 -0700 (PDT) From: Krzysztof Kozlowski Date: Thu, 27 Jun 2024 17:23:44 +0200 Subject: [PATCH 2/4] ASoC: codecs: lpass-rx-macro: Keep static regmap_config as const Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240627-b4-qcom-audio-lpass-codec-cleanups-v1-2-ede31891d238@linaro.org> References: <20240627-b4-qcom-audio-lpass-codec-cleanups-v1-0-ede31891d238@linaro.org> In-Reply-To: <20240627-b4-qcom-audio-lpass-codec-cleanups-v1-0-ede31891d238@linaro.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2386; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=bGXi5j7RtMWqTV/YOEsZohRFyc1PuafBeHL3YjZpRpI=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmfYQBx7fY0kBJ6jxCqWdY53la071tLtaabndv0 1oUeEZeorqJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZn2EAQAKCRDBN2bmhouD 1yaxEACWVO+e6qA0ml86PfmOMaxQrfhrDhHJZDwq9gLbpH9gauNvKjHRjs/cRMitM74rqiTToDr LhxqR09dLUBiLiFNXwXlT6jvzLrDeFq8JJiQER1cwbe3woa7ZVT/eCdPDg1oBD0Iqt/bJZZmoLJ Ook2x1Wst9yTJ3XtyYN7PYn5MU7saXsHWiXIMonKKzkGF6EZYLNSQeZoQua12hI4Os/SFRleSvK jJ4WfYQjlrKGH7vgKEWF8LbFWdr89OHdACdjNHDipmvFaH2+JmOYuM8xdBhR67qLi3y/BZFiPIC EgzMM7qpSQyK7GUPnycZgim+5ZXmUmQ4RmwvfaZx+eeM3jyP1fDbNYmep1nfUZRh4XWm3xhVd+r 4KNh6/ymz9ockw8H6J8gYkr9VoVROJ8DXUlm2eaf7vXaliBPfatmhejfdKOXkrjQRvzRi3A14tr tIUr+oehD9e//w99AgzREShKuZ4NYIratbA6YRftz3s2t6D3pLdoD4ocrzO8I9W00jX/CSNzX8g +qvXzqmNC5xcwevDI2drbRpb6qn7j5ZcTRaDSgfwI9/a+9xzgeJ0d7cJMhU7vEAEncPdrsf4LxV 2Kt019sa3oRdD/xoAk6VKaI6wHqaaItuD6GUY+Bwmuf9t5iTf/0XtV2yXMAR0qLAk1/W+S4XLoL fURMQr5rzgXvFYw== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B The driver has static 'struct regmap_config', which is then customized depending on device version. This works fine, because there should not be two devices in a system simultaneously and even less likely that such two devices would have different versions, thus different regmap config. However code is cleaner and more obvious when static data in the driver is also const - it serves as a template. Mark the 'struct regmap_config' as const and duplicate it in the probe() with devm_kmemdup to allow customizing per detected device variant. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov --- sound/soc/codecs/lpass-rx-macro.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/lpass-rx-macro.c b/sound/soc/codecs/lpass-rx-macro.c index 59fe76b13cdb..3d8149665439 100644 --- a/sound/soc/codecs/lpass-rx-macro.c +++ b/sound/soc/codecs/lpass-rx-macro.c @@ -1662,7 +1662,7 @@ static bool rx_is_readable_register(struct device *dev, unsigned int reg) return rx_is_rw_register(dev, reg); } -static struct regmap_config rx_regmap_config = { +static const struct regmap_config rx_regmap_config = { .name = "rx_macro", .reg_bits = 16, .val_bits = 32, /* 8 but with 32 bit read/write */ @@ -3765,6 +3765,7 @@ static const struct snd_soc_component_driver rx_macro_component_drv = { static int rx_macro_probe(struct platform_device *pdev) { struct reg_default *reg_defaults; + struct regmap_config *reg_config; struct device *dev = &pdev->dev; kernel_ulong_t flags; struct rx_macro *rx; @@ -3851,14 +3852,22 @@ static int rx_macro_probe(struct platform_device *pdev) goto err; } - rx_regmap_config.reg_defaults = reg_defaults; - rx_regmap_config.num_reg_defaults = def_count; + reg_config = devm_kmemdup(dev, &rx_regmap_config, sizeof(*reg_config), + GFP_KERNEL); + if (!reg_config) { + ret = -ENOMEM; + goto err; + } - rx->regmap = devm_regmap_init_mmio(dev, base, &rx_regmap_config); + reg_config->reg_defaults = reg_defaults; + reg_config->num_reg_defaults = def_count; + + rx->regmap = devm_regmap_init_mmio(dev, base, reg_config); if (IS_ERR(rx->regmap)) { ret = PTR_ERR(rx->regmap); goto err; } + devm_kfree(dev, reg_config); devm_kfree(dev, reg_defaults); dev_set_drvdata(dev, rx); From patchwork Thu Jun 27 15:23:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13714668 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (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 A481C199228 for ; Thu, 27 Jun 2024 15:23:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719501836; cv=none; b=sIy4KLxP6DwxhX0LP+vCiwczd9WZRlD9XgHyZCemV0jwKNMN9YEjL1zgyDkXSTOzUxkLuqrh4elWiV8406GDvA9/62BFsmIYsr+gcjuY0lgFuWYwHxgCtR4f2Kymw2mVLXUMwikX6kHUa5Eqobws8NQHLjpdUGb29+wsmPfGz9E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719501836; c=relaxed/simple; bh=aBdsa363wYorx7OqK8Nq8RDf9xf/aTP7aoUD8NTcA04=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=EB8t1aKfju2QACLfd8ZQFQA32pehDWX5VxDADKD8iqG1aAktasv+FStDp4YJCXMCLEEWN7oZbOr9TSlbCIKA9LOCsHKOgCC+I1I2Y8OzmAE6GdhNY8RA5kH4/27Iy/NilyFe66day0xy4pW6yk2gwOT61vgniQzSvFgwGrmeBKo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=PbUwnP7O; arc=none smtp.client-ip=209.85.128.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="PbUwnP7O" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-42565697036so4868055e9.1 for ; Thu, 27 Jun 2024 08:23:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719501833; x=1720106633; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Z+Qye23XNNbt3oIc75EavUvJnN6rEV1YtqVZ+ai5H9w=; b=PbUwnP7OdGv6EQQjfdCnR1Sii9pV7BAgleXyDcbAO0LXZhEYQoFMQ5frZH/IXYgoJ8 NlHqMjQ1qLYdSyjRiggs2e64Ef0N3Kru3iPOozcCClItpKcJOU7s4vHGGZ1dLBhi1nZ9 mUH2ZjwqtRTn6++LQM/j30vAwXMog32mhexMcoReuF1T9E5m1AknwqkYJCKqaqx78nJm uZlYzyC87oC/XlZ626V+lzXM/1zJQrI1oUoZfgs9LiH/vZOLwHDMgsngTUv8OBcCVRB7 zRxFVqGQ0MsCHjfSj+L4eQemzBUW4myDxvVo5V1MbEZNmDaRgnkLt8qJi/Y9hyqBb4gF w2Fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719501833; x=1720106633; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Z+Qye23XNNbt3oIc75EavUvJnN6rEV1YtqVZ+ai5H9w=; b=LHa6mvgMVJsFaju+oDywYO7eJ/UDO4VC4hiL68fh130rI3SmZxLdK8u0bhtmKcl2Wj FLUmmWkCPIGowYknttJJKt638kywCRBZxKDjmHQM3jrgoojZQ/K8PaodpwoyQLqj/jCo yJIHCqYmx0fxFYIYiqySsQi8xJlBl32iTHp6jAFYifYIR1+4mjp7jZhMbuwD3blKF2Xl dnVqMR6611xp1oV/iaXOP+OBrgmY8wj02IyAKPPiCibYblWY0vQeFu2HkPYieTzl8i4+ yKGGqPx8LYU8HpHDgrHZrC+tYvh6iQNQG39ZXpdNEn+2WuL8np87NaInI44qLcBLgni+ qO8Q== X-Forwarded-Encrypted: i=1; AJvYcCWxTOiJL+Bn6aovP4eN8PAudZ4K92rHEErWnHVziHCybHfIvKNwGE6NOsRS1gnRbHwNaD6i/Z6+M55GL1px9vf+WmttZD3eMPGca0ZZ/A== X-Gm-Message-State: AOJu0YwyXNqwjr5o8i/J+eLlVE1PHPR+9E/cNE+gL9K37Qn1Idu2tcVp i0cIBA+WR67rhY9hM3duIcYjgWURnLhCbn1drY4iPkOPq3TtU77EGfnWUbN68I0= X-Google-Smtp-Source: AGHT+IEbhmY2QIczH1le+6f1QjH9zMOlmpjfYaMsVN+8XQHIvad2N1tVs+Oa3zO8On+XqmYI5s4aEw== X-Received: by 2002:a05:600c:3c8b:b0:424:8a34:9890 with SMTP id 5b1f17b1804b1-4256450c71cmr23818275e9.7.1719501833143; Thu, 27 Jun 2024 08:23:53 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.137]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42564bb59b7sm32783185e9.34.2024.06.27.08.23.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jun 2024 08:23:52 -0700 (PDT) From: Krzysztof Kozlowski Date: Thu, 27 Jun 2024 17:23:45 +0200 Subject: [PATCH 3/4] ASoC: dapm: Use unsigned for number of widgets in snd_soc_dapm_new_controls() Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240627-b4-qcom-audio-lpass-codec-cleanups-v1-3-ede31891d238@linaro.org> References: <20240627-b4-qcom-audio-lpass-codec-cleanups-v1-0-ede31891d238@linaro.org> In-Reply-To: <20240627-b4-qcom-audio-lpass-codec-cleanups-v1-0-ede31891d238@linaro.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1586; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=aBdsa363wYorx7OqK8Nq8RDf9xf/aTP7aoUD8NTcA04=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmfYQC2DaMhs+zDgAaWx2Kzj30we//VkAvaxY8i WfJkJ5viuOJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZn2EAgAKCRDBN2bmhouD 1z6GD/93ndHokDVXfI34SLvxVyQePq57WTmIum2zcV1FB4uydLnPOanizt/2hF+tlqvJ7hfpG0X cQDCkUvB6uFUTlDKz0hwjnkFknvQHlwXopBbmk6x8G38HyRPrgF18YWhcQxLl+hoB/nyTFzoW9B VfS8Cgr5LU1YNElJ1agEmd4kpewhiCflZ7yJ9lJJb9g/HiW7dwOR+X09UNi7OgmQ0DkutH+qRha b5S0uRxDQ0JRMdE0o8PZryhVfyVfEqYbn4YCuBiTYgMqcFENyhqda31Pt0wNgmjXgdfvRsCcWf5 eq3QJ10MJ5wVXNLPYtu3B4lh/35ZulFxNG3ciTRxBMkJhI7D+o1SATbtN+0Rt5ERFStCc4mz8+0 XZGt8sUVcG0Y458AHWuviebgAd3+6x/Xq6BhAK/MiJeT1X20wtFfXtPAXOqRKONEAdTlip+Cl4t 4BY5/5URrVRz+GqeiTN4MWDnW5MbKXZ5XIgLmjZmu54QxPdH6UFQtsT+PbitrZp4y9Pjo/C7UNB w1DzVlmS7ukcP/DlQtuvwQeoEqAUqcoERhSZWTAC0rqed91oWvcbq7D90NGWgqeNz/+1atwP34t F5osG8x7tGBQjbnCXtiRk7XgTM1FR6Nhx7otPlcy9TVeNPgfQP62/lMDheoaFyhdEKNEduUnXKp /PswNYJwN2P+U2A== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Number of widgets in array passed to snd_soc_dapm_new_controls() cannot be negative, so make it explicit by using 'unsigned int', just like snd_soc_add_component_controls() is doing. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov --- include/sound/soc-dapm.h | 2 +- sound/soc/soc-dapm.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index 667ecd4daa68..12cd7b5a2202 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h @@ -457,7 +457,7 @@ int snd_soc_dapm_get_pin_switch(struct snd_kcontrol *kcontrol, int snd_soc_dapm_put_pin_switch(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *uncontrol); int snd_soc_dapm_new_controls(struct snd_soc_dapm_context *dapm, - const struct snd_soc_dapm_widget *widget, int num); + const struct snd_soc_dapm_widget *widget, unsigned int num); struct snd_soc_dapm_widget *snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm, const struct snd_soc_dapm_widget *widget); struct snd_soc_dapm_widget *snd_soc_dapm_new_control_unlocked(struct snd_soc_dapm_context *dapm, diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 16dad4a45443..32cc90d09bc2 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -3857,7 +3857,7 @@ EXPORT_SYMBOL_GPL(snd_soc_dapm_new_control); */ int snd_soc_dapm_new_controls(struct snd_soc_dapm_context *dapm, const struct snd_soc_dapm_widget *widget, - int num) + unsigned int num) { int i; int ret = 0; From patchwork Thu Jun 27 15:23:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13714669 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (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 D5C0119AD46 for ; Thu, 27 Jun 2024 15:23:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719501838; cv=none; b=adS4u4GFoapTBr9v18NDkmBpAVkim+O4//MMRf+M1gCvcXtF0clNwWOk4nZQw/h157CKr33ehH2F4ugit4ZFx0E7YA5KgtsT5xVu7kh9bgDuTTkPCKOJ4tuRrWKYn7PVfl10n/5byaXpnMch1xdTpjUKK7kejVoIsFvPATrnLhA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719501838; c=relaxed/simple; bh=l8Fs7uNm1FChU4HgNrAzvxr0CjT3lQ1EHDABQ5Se0aU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=M+EN8D1NdjJZvplROb1Y8Rgake/3eplCYSHvi7T3vJQKM4e6832kp/WklCS2HYl/u8ipo83103W/8s3Q/F/noxcB2nMf4FKhKabg/dhB3WM2DRJO76Jz/ZcV5SJvW28qe+GAT1FMW0eyqIoQQC2JxUpVM6tSRqgCkt6CQ8mxfFw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=O4jRsBdD; arc=none smtp.client-ip=209.85.128.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="O4jRsBdD" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-42138eadf64so68782255e9.3 for ; Thu, 27 Jun 2024 08:23:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719501834; x=1720106634; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=x7JX1Bcmrsym1bUeGPwa5YrFI0Ft58jDDZJ4/xxAojk=; b=O4jRsBdDbdPuc0npGe19bnuyXA1/w/07VlJDYFLJM/gWfacPamIwZ8N5RCO/dxnGK+ Bk0OVOhlPqUonBPLnK6sH/edy2B/Pa7t5nKPm1Eww308OS3e8zVAsyOQ43f9S1haSZD4 hgXBGLFp82y5T5sagbEwU05RGW+gTDv6lDyZfQ9MXPbWb4uutOshYX7L0r+7Y9qaW2MY AABZ7RsKuGrOBkue919t40UQx2BGGCDhcPjzCWb66cNPvthITai6EegzAr/aauNtPv4w HFDwGQQ0eVElN7TLdj+XhHiLcT/K2FCygEnRHSTcdkQ/ySZPjKMpIfQaycwXff/Hic1b rhgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719501834; x=1720106634; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=x7JX1Bcmrsym1bUeGPwa5YrFI0Ft58jDDZJ4/xxAojk=; b=vXTzM6y3bGepvWWzlvNmGUwnVyJK3978/oIwkO4i3bEqcuexI6dKTf8UuZiHKkA8t4 Ve+dsvejMumrAfFDgKTsRKLj+P3wYxx3pVyuxIqOKT+iQzwVxSC/AcuUhHcBo8FFfAqy RbCC6jpfRsrwkKym0brbyjdqxD2V8k+stAexd4GxT6FkfsPIWUOBrE4xhdKcsG4+lFdY gYDZv+G1d0PN0ntL9WDXfe6U8qoJb3c3FJAhfqs1kr9L+sKwx8ewz6o4mzwBxLTAyyj+ gg5rCw7cY5vfLUbaZaFvFqnCBL5AdQSNp/7vKkopnu3vQ2DYIMHlniYXJKzrtJTyT3Sx 92cQ== X-Forwarded-Encrypted: i=1; AJvYcCW2oYGvbWpWoMZrxxGNLht8PonWiWnJJ0sseIcpQbUITUnWG2rOWmeI6hmcncOKrQ7oKRQsZ68U/McnYepEr+YsIEUxnByOKTAcHGA/Zw== X-Gm-Message-State: AOJu0Yz+E/tRIxPBM0eI0PZRvtNrgYMAbjBuIY73wcap0qGMTHZnWjG7 JiwwJFjKauF5byziojQdcfmbsh16h8PO3yOBL5dYc0E3UBVjUHD/BWZnAQpMbWU= X-Google-Smtp-Source: AGHT+IHU0uHfAgbvO3wWQFz4VkorLowhWrH3I6Q0ilQ6xxfYkyzq0SbVy9LBPiGmf7/YXOrhPlwUkw== X-Received: by 2002:a05:600c:4451:b0:422:62db:5a02 with SMTP id 5b1f17b1804b1-4248cc586ddmr102982145e9.32.1719501834317; Thu, 27 Jun 2024 08:23:54 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.137]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42564bb59b7sm32783185e9.34.2024.06.27.08.23.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jun 2024 08:23:53 -0700 (PDT) From: Krzysztof Kozlowski Date: Thu, 27 Jun 2024 17:23:46 +0200 Subject: [PATCH 4/4] ASoC: codecs: lpass-rx-macro: Use unsigned for number of widgets Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240627-b4-qcom-audio-lpass-codec-cleanups-v1-4-ede31891d238@linaro.org> References: <20240627-b4-qcom-audio-lpass-codec-cleanups-v1-0-ede31891d238@linaro.org> In-Reply-To: <20240627-b4-qcom-audio-lpass-codec-cleanups-v1-0-ede31891d238@linaro.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=946; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=l8Fs7uNm1FChU4HgNrAzvxr0CjT3lQ1EHDABQ5Se0aU=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmfYQD7NGFlFAPZPk5oxOO2+MovrmCbj4uOIsyP e/OfXBPY16JAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZn2EAwAKCRDBN2bmhouD 15n/D/9qgH86TgweMDT2rs2qJsT1XmlVEPhyqpMP/R9xme0SJMtfcuduTkwsrgdmqKSINPbIQf9 u3d/5f8FCg8Eb9FhBU9vJJC5JYMLnU1gTKMoGG/DVrc28B4nTWP+FtO3VMEoYagqUJK/h9Z73RP HAUXqZ+R+Naqh4KBkVy5HW2m773Y7w2QRH0DdDHOC+hLjjL3nSr29P3ymYl0IBzza5eevLAxmx1 /bJLceFRg8tedElAOIyRliiJq/z9V/zM0WKHyeVrxea90Jq2bnJ0c/KyKQpigZlyJjHRa+N6wa+ Hr/aWoCzC1t599cRI3v+lROegFbtmpv6IgC1XPPoW8UwUNZk7JY+wy0PLBLwyvaQaEg8xLE+WmM HN6C6+dAz9zhak70UZ/oGbaSTx5UhcO/SVeTOteIzaxSyGF/BSwxy+b3R/hfKk0ORfgzBLUxMEh aJMTnkAnYopE185qHVVsSd7zNktFrNBouS33h5HPi7DSi6+Qs3RFHwjI5D+6x/pdKa0UpCpk8ot KFEIUX8fyfloTZrs0gvzm336tjIiuJohOp9kh0z2+VJ8kTlxd0deYc8BpqPbQFAtNiortgQZvnK p+CWP1afNQhnCiliM1vaAutzd21oORxUBoRQD9s2auCRtUilOI26FPIi8ULQvPAgBEz23+vLVan j8qaYgqDZPJsEaQ== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Driver uses ARRAY_SIZE() to get number of widgets later passed to snd_soc_dapm_new_controls(), which is an 'unsigned int'. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov --- sound/soc/codecs/lpass-rx-macro.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/lpass-rx-macro.c b/sound/soc/codecs/lpass-rx-macro.c index 3d8149665439..bfcbfbe8b086 100644 --- a/sound/soc/codecs/lpass-rx-macro.c +++ b/sound/soc/codecs/lpass-rx-macro.c @@ -3611,8 +3611,8 @@ static int rx_macro_component_probe(struct snd_soc_component *component) struct rx_macro *rx = snd_soc_component_get_drvdata(component); const struct snd_soc_dapm_widget *widgets; const struct snd_kcontrol_new *controls; - unsigned int num_controls; - int ret, num_widgets; + unsigned int num_controls, num_widgets; + int ret; snd_soc_component_init_regmap(component, rx->regmap);