From patchwork Thu May 18 07:27:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 684521 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 72AE6C77B7D for ; Thu, 18 May 2023 07:29:46 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id A2954204; Thu, 18 May 2023 09:28:53 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A2954204 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1684394983; bh=d+VL79f1FoMJqQbqX2Mgk/NMY05JmQb72dmkEbSNu4Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=t6Cc5Q6W0CjFsvkdNF7j4JvY54rYVU7lF+1Uhf7mApLdrF6Eh9MCg/pgMRiGTkeba e2MVpwZcGWearkv3473Z65WfWJYYD5vUzqjdRlAaYH3EmhJoHCDsKIPxZWyNaCXxWM fH1SSLreWqU+8BIK+7qylLmGSR190EG3O9j3D0AE= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1DD1EF8055C; Thu, 18 May 2023 09:28:22 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 01DAEF80553; Thu, 18 May 2023 09:28:22 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A15AAF80552; Thu, 18 May 2023 09:28:11 +0200 (CEST) Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 05DBBF8025A for ; Thu, 18 May 2023 09:27:59 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 05DBBF8025A Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=VdCXcIJz Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-965c3f9af2aso252776166b.0 for ; Thu, 18 May 2023 00:27:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684394878; x=1686986878; 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=xY4US8j109ap8g7iJPTxaqGh/0KFUvHJ6e/HWa50JR0=; b=VdCXcIJz3zJr+Z194kctgRAjtWQyZ8oKgT3cqsKr2mbtExnmGXiP6sq1k6ff7pm/cB /2TbXgKWQfA5/hdwYF5YeQPaNdZAM6GBNHvIztoou8hegf3uUbCwiCQxBQX7becb0J6M lSzA5ZWORuBJMzq9QGt1+2CoYD/6tUMsrMb+62zbEZTlWDdZp4urjE1QejdtIqapndS6 J/0dwAFwWXC1PxLwiryYg76queLaMNfzQKhH1j10QGIqdXI/u+qvtIS2ObSyuWofmM4x Rj4fm6iHvvf27XCjbs63mUYGm8d37NdEiWizcFIZBEva1cii+s7v/DLYuB2hA1gu/0bl GaEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684394878; x=1686986878; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xY4US8j109ap8g7iJPTxaqGh/0KFUvHJ6e/HWa50JR0=; b=LA//oZqRHjfUWdam6X6Hd90/oeOHyHGNyhamvpqMaFlhOitrcZVTiISTam2gwrnynx Mc6qa68zHhreu22jV9YfZ+jyJaTs9/M4+Vilpqgn4tYmXKVsh02MiB3P14a2dZ0Tx14d OHMB44YLw/5WoCHmfqbA1VNrzHVBuGfgrzzsYmkFrSEnODnEnGceFHycthPmd/5rw5IL kwyxL0VFb2ydBW8YX5n8S16qPlpUbkTyTakNLToafSzl4d8vfewuF3WPGkOPIU7wI7sQ jkUaQ/VJ8bfD2qpEvOHd+eFhd75zGH5gtMTM03s4/K/w3xQe/Z+RS5bqQ22NCy+IKv49 wZNg== X-Gm-Message-State: AC+VfDw+671OnTdp7R9lVye1lWGOcFE0KRVK7mQTJVgH7vCAn4krwKwb AkFTLT7iVmN4dMDPddQZSWB9Vg== X-Google-Smtp-Source: ACHHUZ54EI6Z2Sgw4IUl4GkQXP2DPVdI/bOYfBxdQhdJbWUdQ69lrxWikweBVU6nlqSvZnHHhpQn9w== X-Received: by 2002:a17:907:1ca8:b0:96a:bfc:7342 with SMTP id nb40-20020a1709071ca800b0096a0bfc7342mr32079981ejc.62.1684394878057; Thu, 18 May 2023 00:27:58 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:a2b:c408:5834:f48e]) by smtp.gmail.com with ESMTPSA id g17-20020a17090669d100b00965aee5be9asm594241ejs.170.2023.05.18.00.27.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 00:27:57 -0700 (PDT) From: Krzysztof Kozlowski To: Oder Chiou , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski , Pierre-Louis Bossart Subject: [RESEND PATCH 01/12] ASoC: codecs: rt1308: do not store status in state container Date: Thu, 18 May 2023 09:27:42 +0200 Message-Id: <20230518072753.7361-2-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230518072753.7361-1-krzysztof.kozlowski@linaro.org> References: <20230518072753.7361-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Message-ID-Hash: JHWPWZWBHVKJ64QSTZOFJNBUANCJUTUR X-Message-ID-Hash: JHWPWZWBHVKJ64QSTZOFJNBUANCJUTUR X-MailFrom: krzysztof.kozlowski@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Driver in its update status callback stores Soundwire device status in state container but it never uses it later. Simplify the code a bit. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Pierre-Louis Bossart --- sound/soc/codecs/rt1308-sdw.c | 5 +---- sound/soc/codecs/rt1308-sdw.h | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/sound/soc/codecs/rt1308-sdw.c b/sound/soc/codecs/rt1308-sdw.c index 1797af824f60..313e97c94532 100644 --- a/sound/soc/codecs/rt1308-sdw.c +++ b/sound/soc/codecs/rt1308-sdw.c @@ -304,9 +304,6 @@ static int rt1308_update_status(struct sdw_slave *slave, { struct rt1308_sdw_priv *rt1308 = dev_get_drvdata(&slave->dev); - /* Update the status */ - rt1308->status = status; - if (status == SDW_SLAVE_UNATTACHED) rt1308->hw_init = false; @@ -314,7 +311,7 @@ static int rt1308_update_status(struct sdw_slave *slave, * Perform initialization only if slave status is present and * hw_init flag is false */ - if (rt1308->hw_init || rt1308->status != SDW_SLAVE_ATTACHED) + if (rt1308->hw_init || status != SDW_SLAVE_ATTACHED) return 0; /* perform I/O transfers required for Slave initialization */ diff --git a/sound/soc/codecs/rt1308-sdw.h b/sound/soc/codecs/rt1308-sdw.h index 04ff18fa18e2..f816c73e247e 100644 --- a/sound/soc/codecs/rt1308-sdw.h +++ b/sound/soc/codecs/rt1308-sdw.h @@ -159,7 +159,6 @@ struct rt1308_sdw_priv { struct snd_soc_component *component; struct regmap *regmap; struct sdw_slave *sdw_slave; - enum sdw_slave_status status; struct sdw_bus_params params; bool hw_init; bool first_hw_init; From patchwork Thu May 18 07:27:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 684520 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 64593C7EE23 for ; Thu, 18 May 2023 07:30:08 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 4E7C8825; Thu, 18 May 2023 09:29:16 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4E7C8825 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1684395006; bh=MnQ97/hVN5FSzJzUz6uJLPHxJiB0a87/C3eBZvHKaHQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=EcxjiMpwKTsBIjmV2g40xggULa6etoOGzMu42A3ExFe/6nJCvf0O0jlfGDAIVVh+z K1SOc9A1JOaENsUatTBplHjWJIkhfoa2ylbb5gtdbccYqZxgXMeUQLSHv6pKEseF2d /b2XRHCjiSuzVDkvwkGsr729LkqL6B/FZP8RPSks= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 15F65F80544; Thu, 18 May 2023 09:28:30 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id D59C9F80578; Thu, 18 May 2023 09:28:29 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id AC33AF80553; Thu, 18 May 2023 09:28:19 +0200 (CEST) Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 86641F80087 for ; Thu, 18 May 2023 09:28:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 86641F80087 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=WP+J1VwS Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-96aadfb19d7so316865666b.2 for ; Thu, 18 May 2023 00:28:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684394879; x=1686986879; 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=LC/zIc8X+SN3v3HkNtTVdt1UL4xSDxpH+q1cQ2DHdvs=; b=WP+J1VwSUrjRPf0WUHV5s4C8tvmBJHGuOzF1k5aWgcB+Mw3xKYuBhbCXu364BdOCwP 2VDyyUqIYQB2hGqLRmtrHJqOENQpwdUYXOiEui9j2ebQGU1cL5VjZ0FTb1/kbr24Q6Np 0kAN0HTBxFawRRBs36ejvFCGYOCWC14xl/3tSjX/YRbONRJgr4+2Aa3/W7ELX3uVPddk FACbZtF5IlbdDmQldf6ObNjB9PAe5niHMcjTthzN4iZCtNhmLie3vFqFlArzytN5XBp9 vM+hvr9BLbJWMNy5YnSAybjVHoq8ftywfjwUrE7QTdpVYMawZcEQgVKEWoYor4GE53ci wyKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684394879; x=1686986879; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LC/zIc8X+SN3v3HkNtTVdt1UL4xSDxpH+q1cQ2DHdvs=; b=Hgx8w0OoSc0o4ozMRPrUp4n2AADSNjvgZbHJlFhK+dwbhAWGBx6HcXiEZxUTPBAGZF dBJ25ecZJwstmukpAFrqWqYckgxCxkyC4Z475hJh8a7IVwGsVCII/n/NwniEQFyKQBa7 R4RrfnR1LUksgOQMky7yEAnsBmVPeDBOpaH2NV10b3yuZ/4xZB+4OIFKFz+sT0H/F9cs 7NLfe8V992zocU26cAWQuTIeyr3fpx2KZ9TlZKU721G5LhhnBuOON7VyHHC1qYFnb5K1 OjBh34cjamDztsOua3TpMkKe3fffDXCUgSKu85m8KUZGduLUD22BzljhtGOXYVdGVDsU RIlw== X-Gm-Message-State: AC+VfDxKYh43QAGhuQ/mq3IlOFmYbLlrt2jKzgk+OR4RErzaaZIxQa9S zl5L1H5D5k3mqGXZ+HWaIip3Ig== X-Google-Smtp-Source: ACHHUZ6bymIhEgJDfUzkeFREt4EtG+UMkBzeSiCgNymRaghAk/dTfP/cemBVaWPSj4Cv08e99FsHpQ== X-Received: by 2002:a17:906:d54b:b0:94f:3980:bf91 with SMTP id cr11-20020a170906d54b00b0094f3980bf91mr46254817ejc.19.1684394879305; Thu, 18 May 2023 00:27:59 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:a2b:c408:5834:f48e]) by smtp.gmail.com with ESMTPSA id g17-20020a17090669d100b00965aee5be9asm594241ejs.170.2023.05.18.00.27.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 00:27:58 -0700 (PDT) From: Krzysztof Kozlowski To: Oder Chiou , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski , Pierre-Louis Bossart Subject: [RESEND PATCH 02/12] ASoC: codecs: rt1316: do not store status in state container Date: Thu, 18 May 2023 09:27:43 +0200 Message-Id: <20230518072753.7361-3-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230518072753.7361-1-krzysztof.kozlowski@linaro.org> References: <20230518072753.7361-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Message-ID-Hash: G5FKLTESVHMKQWNYSQ7RQ5OWXCJG2IQJ X-Message-ID-Hash: G5FKLTESVHMKQWNYSQ7RQ5OWXCJG2IQJ X-MailFrom: krzysztof.kozlowski@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Driver in its update status callback stores Soundwire device status in state container but it never uses it later. Simplify the code a bit. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Pierre-Louis Bossart --- sound/soc/codecs/rt1316-sdw.c | 5 +---- sound/soc/codecs/rt1316-sdw.h | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/sound/soc/codecs/rt1316-sdw.c b/sound/soc/codecs/rt1316-sdw.c index 2ee5e763e345..601b76320124 100644 --- a/sound/soc/codecs/rt1316-sdw.c +++ b/sound/soc/codecs/rt1316-sdw.c @@ -323,9 +323,6 @@ static int rt1316_update_status(struct sdw_slave *slave, { struct rt1316_sdw_priv *rt1316 = dev_get_drvdata(&slave->dev); - /* Update the status */ - rt1316->status = status; - if (status == SDW_SLAVE_UNATTACHED) rt1316->hw_init = false; @@ -333,7 +330,7 @@ static int rt1316_update_status(struct sdw_slave *slave, * Perform initialization only if slave status is present and * hw_init flag is false */ - if (rt1316->hw_init || rt1316->status != SDW_SLAVE_ATTACHED) + if (rt1316->hw_init || status != SDW_SLAVE_ATTACHED) return 0; /* perform I/O transfers required for Slave initialization */ diff --git a/sound/soc/codecs/rt1316-sdw.h b/sound/soc/codecs/rt1316-sdw.h index e37121655bc1..dc1bfe40edd3 100644 --- a/sound/soc/codecs/rt1316-sdw.h +++ b/sound/soc/codecs/rt1316-sdw.h @@ -42,7 +42,6 @@ struct rt1316_sdw_priv { struct snd_soc_component *component; struct regmap *regmap; struct sdw_slave *sdw_slave; - enum sdw_slave_status status; struct sdw_bus_params params; bool hw_init; bool first_hw_init; From patchwork Thu May 18 07:27:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 684516 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 514D3C77B7D for ; Thu, 18 May 2023 07:32:23 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id CA2DC20C; Thu, 18 May 2023 09:31:30 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz CA2DC20C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1684395140; bh=C1mPqbFYhsJBdKbdcVgm69H9b0K10gG7zIsQ3bKYjGc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=jLv2HpxLaX6g6wnJqZd3kz5fJosBLmX7yAdoAlt8DPPLaDdfrqxkvKCRQ6CA2ajGY cVMOPlAE43IRavc2oKS01KEEIfXOsoGm5YFUn2vS+w1r2PznOfl91NXg5m6TM7YVPX Zo52m5wnINHdbqdXptQGpndgNKRFHpMESW5AT48E= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6544AF805F8; Thu, 18 May 2023 09:28:47 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id D95BEF805F5; Thu, 18 May 2023 09:28:46 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B4B87F805A9; Thu, 18 May 2023 09:28:31 +0200 (CEST) Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id A02F8F80272 for ; Thu, 18 May 2023 09:28:02 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A02F8F80272 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=O9ourAIq Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-96aae59bbd6so318891166b.3 for ; Thu, 18 May 2023 00:28:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684394880; x=1686986880; 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=jJY+f/kyvGT80qDu/2YzrWbFWrXecvsPv92RJrnC6oM=; b=O9ourAIqiWUoA66Do64H+sF3x/mqeWBFY1RLtuUwyPqlqUUj+RaoCyPjATbGFzY6uP vv0n+QcH0YiWtYMVbl1DtrxKnskNmlVpnXcM2bELSuVYkIkwQyakVQiDdim2G6qCuZ1b LTF2tCNi+KHuG/hw6oFjAiK8qNLZebZYgeBnKvMH41x6m4T1LBtpxQF/ljm3QFHyRiHL lwwJMfNpG9gK6QGBkGC0iebrnNFhiQk8ThPZ+PMDWSxHwb1c5tpfQ6dsDevIxJgPybVS artNLQuSEdRZ6dsivfMk0624OjTfKDz7aKmjWmcOYrWkAVkDK0TrwPjDrlc42proM92w ofEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684394880; x=1686986880; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jJY+f/kyvGT80qDu/2YzrWbFWrXecvsPv92RJrnC6oM=; b=LsfAzil7kiW3QAgQ4Wpf7UN4IgeQjd6RIf9Txfuw57/965qbWbqigLsOYYrwmRJuhr wQ55o3bbMSXKuw+5kaFHOgSVywm2bXfq0fB+vJ2E2KQSpLIwLU8EwVIo7D6+bpPlSPfO PCnsoH3tIR/okrp9tyCWtJ5PufkOBe3ivXp5yYFtdgaj9adM1zfqMYQIBtWhSPCnfwr4 tbe76MQoljhxaKHQ6+ZCS2Nqwx/tryDcgjj7RSNMfHVvZ/UyUiKFoLuLfRiJVsR1MvOV yi2IgOutYdBL7NDozSAqVaZtuSYFp6RysIkWL6slOeeB/pF7EShI3yseNOZ/NCUObpki RIFA== X-Gm-Message-State: AC+VfDyqQ/INS+U/NRJR32tYqS+B+CgcUc5J9IlBtI2L2asUA9X/wU2M 7adLe+gbFOzNg2j+i+abVI+Adkb/aNh+m/fXBNULZw== X-Google-Smtp-Source: ACHHUZ4u5KhX1gbFbc1OQdpkGq4jRhdU94xrmSghEO85zLrbApdS3ipuJkXCJSa18RAmDtrB+J5qjA== X-Received: by 2002:a17:906:ee82:b0:94f:1a23:2f1c with SMTP id wt2-20020a170906ee8200b0094f1a232f1cmr36770723ejb.50.1684394880586; Thu, 18 May 2023 00:28:00 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:a2b:c408:5834:f48e]) by smtp.gmail.com with ESMTPSA id g17-20020a17090669d100b00965aee5be9asm594241ejs.170.2023.05.18.00.27.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 00:28:00 -0700 (PDT) From: Krzysztof Kozlowski To: Oder Chiou , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski , Pierre-Louis Bossart Subject: [RESEND PATCH 03/12] ASoC: codecs: rt1318: do not store status in state container Date: Thu, 18 May 2023 09:27:44 +0200 Message-Id: <20230518072753.7361-4-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230518072753.7361-1-krzysztof.kozlowski@linaro.org> References: <20230518072753.7361-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Message-ID-Hash: LQ2FC4JOL3UCSSL7QARXG67JO5W4WAOR X-Message-ID-Hash: LQ2FC4JOL3UCSSL7QARXG67JO5W4WAOR X-MailFrom: krzysztof.kozlowski@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Driver in its update status callback stores Soundwire device status in state container but it never uses it later. Simplify the code a bit. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Pierre-Louis Bossart --- sound/soc/codecs/rt1318-sdw.c | 5 +---- sound/soc/codecs/rt1318-sdw.h | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/sound/soc/codecs/rt1318-sdw.c b/sound/soc/codecs/rt1318-sdw.c index 795accedc22c..3751d923611c 100644 --- a/sound/soc/codecs/rt1318-sdw.c +++ b/sound/soc/codecs/rt1318-sdw.c @@ -456,9 +456,6 @@ static int rt1318_update_status(struct sdw_slave *slave, { struct rt1318_sdw_priv *rt1318 = dev_get_drvdata(&slave->dev); - /* Update the status */ - rt1318->status = status; - if (status == SDW_SLAVE_UNATTACHED) rt1318->hw_init = false; @@ -466,7 +463,7 @@ static int rt1318_update_status(struct sdw_slave *slave, * Perform initialization only if slave status is present and * hw_init flag is false */ - if (rt1318->hw_init || rt1318->status != SDW_SLAVE_ATTACHED) + if (rt1318->hw_init || status != SDW_SLAVE_ATTACHED) return 0; /* perform I/O transfers required for Slave initialization */ diff --git a/sound/soc/codecs/rt1318-sdw.h b/sound/soc/codecs/rt1318-sdw.h index 85918c184f16..86e83d63a017 100644 --- a/sound/soc/codecs/rt1318-sdw.h +++ b/sound/soc/codecs/rt1318-sdw.h @@ -88,7 +88,6 @@ struct rt1318_sdw_priv { struct snd_soc_component *component; struct regmap *regmap; struct sdw_slave *sdw_slave; - enum sdw_slave_status status; struct sdw_bus_params params; bool hw_init; bool first_hw_init; From patchwork Thu May 18 07:27:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 684518 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9F0D1C7EE23 for ; Thu, 18 May 2023 07:31:23 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 71CCE207; Thu, 18 May 2023 09:30:31 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 71CCE207 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1684395081; bh=Mm3BcrtKO/D6sJIuNKdAO6zr/1mpu+if2RbWQh1ZnvE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=jfFPycVaUuUIBtQBbSjQKn0oDe2kldEtfaGoXRsdASLG0RPirv+11d5l9EETcCRBc SPew2vpVvhP3bbfouu+n6ZPHnUGlcOt5YUBTEzRFXQF19vMy0F/HLchsFrwqANl0kn D3wRev7Av79SeKJEiBn08tTPf2DIa/axXAnX3LRw= Received: by alsa1.perex.cz (Postfix, from userid 50401) id AA725F805C6; Thu, 18 May 2023 09:28:36 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 4C915F805C2; Thu, 18 May 2023 09:28:36 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B2CD2F80542; Thu, 18 May 2023 09:28:26 +0200 (CEST) Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id BA1F7F80431 for ; Thu, 18 May 2023 09:28:06 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz BA1F7F80431 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=zNNOgZ+A Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-9659e9bbff5so300217766b.1 for ; Thu, 18 May 2023 00:28:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684394881; x=1686986881; 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=w7CXEP7TWtcrBNlAfURzS7ZFy4jvErEzkp1RHuGj8Jo=; b=zNNOgZ+A7E64Nl/R3Y706ivhMQUe0MZ6cSd3utBHP+wuuEm+nHd0T7bOehTUAg4M6Z 1s/Wd/s+mlBNQv+MZwjIwsSdULFtvLqfHzEbPZ84qOA4mQmjwr0vEJSBLjLgoBtxRXUw QZ0JpYoizjZeN3450GpOd+ZtxLEaQRM1aUPFDIkw49zFz9c16FMD9TB+SJO5lepqBbUF BI7rFyrPYi7BudVocZzJuDletVdEKHlxPrY2qj4XCsbPTLeDrUe9gfEFCtpvtNZikuJh DJd+0Iuj4CSQwRnUgnzKJ5I2K2zu46WEt6Eq0/3x+EagoXEp/DUZlnsvpKWzPUk9ATn9 Ll3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684394881; x=1686986881; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=w7CXEP7TWtcrBNlAfURzS7ZFy4jvErEzkp1RHuGj8Jo=; b=PNHBlgdTeBHaDIs8789q2E55a9vwc3wmmjD1TmMXWXpUMi9M6ShY5N1mHuCasnGrqQ cNcR1Sw+2cQQ4n9JfXrrkwgRFd21Yf1buQFudEcy6rNxAEArAsfFsA8sMrv2stuQYgni RMDGEObi7o/XtwB3CA4eQjE97Uf1wutmmgC8G2jWMiyS3JsIBPnbnwXCFuWpydRqWxsY iVEivRbWATMuIL+SYGNu/Bp7GIkIrHVhBV+oo1qdSlxIJ1M9QxdQdwkI3BJNg2c+pKla s/ffydI5Evk+bRVOv3GK+D7rDAuup1DSByDWgbRr2LjVtIxeux4renj0typWpV1g9ThQ MEFg== X-Gm-Message-State: AC+VfDyYcVXHY6tb+pfslC/EkESGL+HR3rs1Ov7g2r2jee+OCZ0Gnp2V GpTEDJNx4aYv+bFILP+z/IWqZw== X-Google-Smtp-Source: ACHHUZ4/BXuDRatOd8zzB4wDFspbxkWZb05FKBdp4JpW2IYHJUYzkUo/o1NSv6Ji2yDgaD+9+uPkIg== X-Received: by 2002:a17:906:6a1f:b0:968:a237:f955 with SMTP id qw31-20020a1709066a1f00b00968a237f955mr33784630ejc.64.1684394881605; Thu, 18 May 2023 00:28:01 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:a2b:c408:5834:f48e]) by smtp.gmail.com with ESMTPSA id g17-20020a17090669d100b00965aee5be9asm594241ejs.170.2023.05.18.00.28.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 00:28:01 -0700 (PDT) From: Krzysztof Kozlowski To: Oder Chiou , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski , Pierre-Louis Bossart Subject: [RESEND PATCH 04/12] ASoC: codecs: rt5682: do not store status in state container Date: Thu, 18 May 2023 09:27:45 +0200 Message-Id: <20230518072753.7361-5-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230518072753.7361-1-krzysztof.kozlowski@linaro.org> References: <20230518072753.7361-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Message-ID-Hash: EM5LZMG2JAENUEZA6G2RLRN3S4XN6JAO X-Message-ID-Hash: EM5LZMG2JAENUEZA6G2RLRN3S4XN6JAO X-MailFrom: krzysztof.kozlowski@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Driver in its update status callback stores Soundwire device status in state container but it never uses it later. Simplify the code a bit. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Pierre-Louis Bossart --- sound/soc/codecs/rt5682-sdw.c | 5 +---- sound/soc/codecs/rt5682.h | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/sound/soc/codecs/rt5682-sdw.c b/sound/soc/codecs/rt5682-sdw.c index 6e3b5c5eced1..67404f45389f 100644 --- a/sound/soc/codecs/rt5682-sdw.c +++ b/sound/soc/codecs/rt5682-sdw.c @@ -500,9 +500,6 @@ static int rt5682_update_status(struct sdw_slave *slave, { struct rt5682_priv *rt5682 = dev_get_drvdata(&slave->dev); - /* Update the status */ - rt5682->status = status; - if (status == SDW_SLAVE_UNATTACHED) rt5682->hw_init = false; @@ -510,7 +507,7 @@ static int rt5682_update_status(struct sdw_slave *slave, * Perform initialization only if slave status is present and * hw_init flag is false */ - if (rt5682->hw_init || rt5682->status != SDW_SLAVE_ATTACHED) + if (rt5682->hw_init || status != SDW_SLAVE_ATTACHED) return 0; /* perform I/O transfers required for Slave initialization */ diff --git a/sound/soc/codecs/rt5682.h b/sound/soc/codecs/rt5682.h index d568c6993c33..301d1817f8f1 100644 --- a/sound/soc/codecs/rt5682.h +++ b/sound/soc/codecs/rt5682.h @@ -1440,7 +1440,6 @@ struct rt5682_priv { bool disable_irq; struct mutex calibrate_mutex; struct sdw_slave *slave; - enum sdw_slave_status status; struct sdw_bus_params params; bool hw_init; bool first_hw_init; From patchwork Thu May 18 07:27:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 683415 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7AA91C77B7D for ; Thu, 18 May 2023 07:30:59 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id EAFAE828; Thu, 18 May 2023 09:30:06 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz EAFAE828 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1684395057; bh=ppJAT4sui0E4j+uCtyTmcrJ/oYYjLlk6LkkobvzbBAo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=X76BOjBG46NH8UeRhBTWqCnsKXhvXMRCT4LjheCf0ElrGSEqaP1MNQExYrdjrHTRi bdacQ1QGpISJmkFO87zzJcVEieJb2sT7yvFsP8Pp2xe0pyWjyqFLRe6EOEO4Y8i2Ga 4y7vs74LOd2FcalOeRg1V/aVaE3OGTnrctbNDUfw= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 84E89F805B3; Thu, 18 May 2023 09:28:35 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id CEA3EF805B4; Thu, 18 May 2023 09:28:34 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 541CBF802E8; Thu, 18 May 2023 09:28:25 +0200 (CEST) Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 6A1E7F80542 for ; Thu, 18 May 2023 09:28:06 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6A1E7F80542 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=M8Z6vWY0 Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-9659e9bbff5so300219466b.1 for ; Thu, 18 May 2023 00:28:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684394882; x=1686986882; 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=C1eT2t6FyxP9v83v8PrBLX9IzlgvVZW+pMXaKU/JtJI=; b=M8Z6vWY0wCGKAcqY9LaP8M36odcIRn0KCyKWNrqM5ddKXkyrIU91p680g/kzWZJm2w 09b4ex46qbjwZSYSqaACstpD+I9r8FxtvIOG1XjHF+EETJZmimB0gy8lziYy3wmWV4ql viZEV65VAOX4zkrD/hQnwsW0GPCcMaqQ4h32e2qTlqsHBJ3smGTN38fbiGQfqkDthQ/H oUcxO2J04xq+u6rPLfZfVH9wO/byS1P5SNfQOBflWeKZo/WjWtkoZnV33IdBu2iVmxZP BhFufBFLBwHrli6CC+Mpz0HEzlIjFupoepTi6k1k9Wr+V2llmRdxJJJm4xDlGWhe2KIY KiHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684394882; x=1686986882; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=C1eT2t6FyxP9v83v8PrBLX9IzlgvVZW+pMXaKU/JtJI=; b=f3v8db4vWoyO68alg/1AfldFyw93rjY9KYB5c97Ox/cjJ5gT+faV/JG+bYCm7Oo5DO GGQ6VVYH/6JYCSaPMM8qtf98/XD5SIEDyxQC2DrCIhJfh9JjL///HUaubhtz/R7Z9GD7 ePmlEhggg/jjC0pgs8DdGiQeK7rUmh4Xxvu36nYA6JAJJgnkyrVIyh+WqjiPTzGhEZ/G zMYgKY7GL4+XWljUJetqXJ8z/jjA6Y+HEbH1RY1cba66GXN63WcpM2YrwqNO23awCan0 0LI+059uWBOGHxxZ5Y4GKLSo2mu4lSrUYW2tjLnf8lbRnQjM/N8aokshqe8qbS0nsz9w gDLg== X-Gm-Message-State: AC+VfDwF2ME1glsLRIS+gwmDraadTZri43h/fJeAqgA4RAB28jo2O/wQ BF9spDTPECo75hqkGLkBKFaD75NTjv9XnwfVlZ8RhQ== X-Google-Smtp-Source: ACHHUZ5ygHn4ldIoZ76oJhZdVGGwuW1NLDvZkJWMysRNSoLrD1RTw0zMlD9CIej5G8rxwodu/f9YUQ== X-Received: by 2002:a17:907:a424:b0:96a:246b:c65d with SMTP id sg36-20020a170907a42400b0096a246bc65dmr27786016ejc.12.1684394882778; Thu, 18 May 2023 00:28:02 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:a2b:c408:5834:f48e]) by smtp.gmail.com with ESMTPSA id g17-20020a17090669d100b00965aee5be9asm594241ejs.170.2023.05.18.00.28.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 00:28:02 -0700 (PDT) From: Krzysztof Kozlowski To: Oder Chiou , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski , Pierre-Louis Bossart Subject: [RESEND PATCH 05/12] ASoC: codecs: rt700: do not store status in state container Date: Thu, 18 May 2023 09:27:46 +0200 Message-Id: <20230518072753.7361-6-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230518072753.7361-1-krzysztof.kozlowski@linaro.org> References: <20230518072753.7361-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Message-ID-Hash: T5IY236KIB6KAH5FGGRPFFN6MYSWICLK X-Message-ID-Hash: T5IY236KIB6KAH5FGGRPFFN6MYSWICLK X-MailFrom: krzysztof.kozlowski@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Driver in its update status callback stores Soundwire device status in state container but it never uses it later. Simplify the code a bit. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Pierre-Louis Bossart --- sound/soc/codecs/rt700-sdw.c | 5 +---- sound/soc/codecs/rt700.h | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/sound/soc/codecs/rt700-sdw.c b/sound/soc/codecs/rt700-sdw.c index 96fc5f36d0d0..ba7767bee07c 100644 --- a/sound/soc/codecs/rt700-sdw.c +++ b/sound/soc/codecs/rt700-sdw.c @@ -315,9 +315,6 @@ static int rt700_update_status(struct sdw_slave *slave, { struct rt700_priv *rt700 = dev_get_drvdata(&slave->dev); - /* Update the status */ - rt700->status = status; - if (status == SDW_SLAVE_UNATTACHED) rt700->hw_init = false; @@ -325,7 +322,7 @@ static int rt700_update_status(struct sdw_slave *slave, * Perform initialization only if slave status is present and * hw_init flag is false */ - if (rt700->hw_init || rt700->status != SDW_SLAVE_ATTACHED) + if (rt700->hw_init || status != SDW_SLAVE_ATTACHED) return 0; /* perform I/O transfers required for Slave initialization */ diff --git a/sound/soc/codecs/rt700.h b/sound/soc/codecs/rt700.h index 93c44005d38c..491774d207de 100644 --- a/sound/soc/codecs/rt700.h +++ b/sound/soc/codecs/rt700.h @@ -15,7 +15,6 @@ struct rt700_priv { struct regmap *regmap; struct regmap *sdw_regmap; struct sdw_slave *slave; - enum sdw_slave_status status; struct sdw_bus_params params; bool hw_init; bool first_hw_init; From patchwork Thu May 18 07:27:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 684519 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 99292C7EE23 for ; Thu, 18 May 2023 07:30:56 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 605F274C; Thu, 18 May 2023 09:30:04 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 605F274C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1684395054; bh=9X62j4kwqih0Ta5q9aF+pncNuZKECt1KZ7b6uFl28DA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=ayzKHxke1c3RJO1zK+2mKlG1Vy+gxvtLrAZoJ2g7zp1cBKqX+zA/ZhCysokt97YlD 0F0oLPnOJjOunoX7WnP9Dii86b7mBdvkIPaAc7zMW+TSlwLOkwGNvTzCmvdnZxtna0 uekWjOu6OC08E2tvJyiyBik/XjQ3RlfKEhkzUdos= Received: by alsa1.perex.cz (Postfix, from userid 50401) id EC3C8F80548; Thu, 18 May 2023 09:28:33 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 29A77F805AF; Thu, 18 May 2023 09:28:33 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4F766F80567; Thu, 18 May 2023 09:28:24 +0200 (CEST) Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 4055BF802E8 for ; Thu, 18 May 2023 09:28:06 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4055BF802E8 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=ryT3oII2 Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-965b8a969b3so179811466b.1 for ; Thu, 18 May 2023 00:28:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684394884; x=1686986884; 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=fXL5o5qPvph6Jym30uHyOqMAZEOM4W+jtVScVxTiDlk=; b=ryT3oII2qDSHvEnNd8R3Sxowcji9SoTEbJkcGp19IIs+FWqR5+MsE+p0x5qh15PDQd i6kTbi07i9WT+RjRbfYWccwFP297hTr1IW9+vIW4y4ldZsySI2GacVMRsOWHWD8vRcXw fCCnIuBKoI3pQB7+fpAmk5rlAASAmGvL26SC0XR8c6iX5K3N3H6oIawvpL+EHYoS3M5v HIx3FfeqyJLxmgdWEtMNZpAKwrdmlAmTdwGVSFpHRDWy8/1qpho/tf2ePrHktnIReFPK 3viszkD0I3ZkFL5h9H4v05K/ZzLF1WRU3TmaQZb8h16t18DKTxcZ8XTnXie3BvMdrFJf PcHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684394884; x=1686986884; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fXL5o5qPvph6Jym30uHyOqMAZEOM4W+jtVScVxTiDlk=; b=kRH+LpbM36HG4oiCFKJrDG8yquT1/wwN2P3B+iWBlfEC7dDHm0HY3EfS4ZirT+jBKB brQAQadTtjgmXE2SoaVS3x+7M+QjcBpbQ5Uhi/ysh4wdU3/ixesjfQG5zfzdLnoJpuaO zR8bW5EgO/uVVWmZAptouM6d1i1jQMmM13bayDCe2O8MYGoaLmhJi5PbDSxnSZ0ePBjI 3d3rRGxJUFn07VpS/uFhGg4XGcr8wyCt/98oKLQxjTukWF6wZ3g0myTgkeIOlohVgNXi bjSKg9R7XYCi6Y6uRg2XfEm65DNhnaFMhYF02fy7nOuWVNhmRKtQ9ezQekyC/mzEQCmO LhJQ== X-Gm-Message-State: AC+VfDwbVhbDGJdfNu5FaJlIqY9iLpr8evjbbIMrXhjOWL3BgO8a4uwU /E6zOAnnVjD+qCbh772kDufv5Q== X-Google-Smtp-Source: ACHHUZ6jvtLDiIknXfnlrRB0KFzN9p8chuhdTxU60B7h54mon8DHKl9rh8r1GsMm+rETremULB/ksA== X-Received: by 2002:a17:907:3d93:b0:94a:4739:bed9 with SMTP id he19-20020a1709073d9300b0094a4739bed9mr5233414ejc.13.1684394883911; Thu, 18 May 2023 00:28:03 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:a2b:c408:5834:f48e]) by smtp.gmail.com with ESMTPSA id g17-20020a17090669d100b00965aee5be9asm594241ejs.170.2023.05.18.00.28.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 00:28:03 -0700 (PDT) From: Krzysztof Kozlowski To: Oder Chiou , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski , Pierre-Louis Bossart Subject: [RESEND PATCH 06/12] ASoC: codecs: rt711-sdca: do not store status in state container Date: Thu, 18 May 2023 09:27:47 +0200 Message-Id: <20230518072753.7361-7-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230518072753.7361-1-krzysztof.kozlowski@linaro.org> References: <20230518072753.7361-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Message-ID-Hash: QVMTSWSQ5DDMPKWS3W5AIMQS7WE4ESOE X-Message-ID-Hash: QVMTSWSQ5DDMPKWS3W5AIMQS7WE4ESOE X-MailFrom: krzysztof.kozlowski@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Driver in its update status callback stores Soundwire device status in state container but it never uses it later. Simplify the code a bit. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Pierre-Louis Bossart --- sound/soc/codecs/rt711-sdca-sdw.c | 5 +---- sound/soc/codecs/rt711-sdca.h | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/sound/soc/codecs/rt711-sdca-sdw.c b/sound/soc/codecs/rt711-sdca-sdw.c index 51f3335343e0..2c5eb28259dc 100644 --- a/sound/soc/codecs/rt711-sdca-sdw.c +++ b/sound/soc/codecs/rt711-sdca-sdw.c @@ -143,9 +143,6 @@ static int rt711_sdca_update_status(struct sdw_slave *slave, { struct rt711_sdca_priv *rt711 = dev_get_drvdata(&slave->dev); - /* Update the status */ - rt711->status = status; - if (status == SDW_SLAVE_UNATTACHED) rt711->hw_init = false; @@ -168,7 +165,7 @@ static int rt711_sdca_update_status(struct sdw_slave *slave, * Perform initialization only if slave status is present and * hw_init flag is false */ - if (rt711->hw_init || rt711->status != SDW_SLAVE_ATTACHED) + if (rt711->hw_init || status != SDW_SLAVE_ATTACHED) return 0; /* perform I/O transfers required for Slave initialization */ diff --git a/sound/soc/codecs/rt711-sdca.h b/sound/soc/codecs/rt711-sdca.h index 22076f268577..11d421e8ab2b 100644 --- a/sound/soc/codecs/rt711-sdca.h +++ b/sound/soc/codecs/rt711-sdca.h @@ -19,7 +19,6 @@ struct rt711_sdca_priv { struct regmap *regmap, *mbq_regmap; struct snd_soc_component *component; struct sdw_slave *slave; - enum sdw_slave_status status; struct sdw_bus_params params; bool hw_init; bool first_hw_init; From patchwork Thu May 18 07:27:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 683416 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B3D58C77B7D for ; Thu, 18 May 2023 07:30:30 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 301AA1F9; Thu, 18 May 2023 09:29:38 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 301AA1F9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1684395028; bh=DweD3/hXISGu2olz6GU84WxSgV5Br9xBsvlyxrZPLEQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=UGwER5DE+CvrnWR/PIYS4ly750KZWh2cucnxtKozttQ6AKyucu/UXChqIThP00KYn etip3zrZLjdPllncXRjYalam4+DZDewQzYPiFfh9S9134gJgSl1oSmR4C6haoqSdFC zsYcNyZg58msZW4ywNROU6qGHICKsJ1lbfk/mt6k= Received: by alsa1.perex.cz (Postfix, from userid 50401) id B98A3F80589; Thu, 18 May 2023 09:28:32 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id ACD8DF805A1; Thu, 18 May 2023 09:28:31 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 339D5F8055A; Thu, 18 May 2023 09:28:22 +0200 (CEST) Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id E9A63F8053D for ; Thu, 18 May 2023 09:28:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E9A63F8053D Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=kqlVceO0 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-965a68abfd4so309027366b.2 for ; Thu, 18 May 2023 00:28:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684394885; x=1686986885; 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=XZcG0tmVXg695NcraCbh92aOOhRlMkU+haSPEq2t8Oc=; b=kqlVceO0GYGYsCRODhYZpkuyquIG9tGnV+eKMqZNHFtn5bmjaMeQNDmIEqV0/Srk4J qJh6FxhAkoM/SFU4Z6Vn3DviBh6qiMGUMcmO0yhXb7904wb7AsJwj9qdDcAI0sj6G7Tk rkz1/gHrydVt9UQsmYxqM9fnoPZzxZ2bbw77m2s1NFmbTpwIgq4C1ofrJFtY+6TD0CVY 53l4rvZ741mvTSAubv2RZuEtlXizhMLlHnuAMUFyN6C1NxdTCB5ILVcXRhpy5B9wvhGL QJGpb3ruBj9ZST7urHEaiU24IU0IAFqBZbmUBZNo4+xHihGhTZ8zd8L+tJZ+mML264E7 aP9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684394885; x=1686986885; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XZcG0tmVXg695NcraCbh92aOOhRlMkU+haSPEq2t8Oc=; b=Cpc9HctNfApMVBEnYjltLeb1bLJC4EGtk7Vf2QWD/Bg0728aDJRgjoQj1PVyPcEwo6 TLKCozTLK+TgnkyC3x6Nlqy00ug4pIkPE31JQ1/216cSY897T8wAnn2s6VFvRtG26IKF Vnnnxptsbn3hN5gm5ZOo+MmEfN7tHjhAbsPUXie8PS4uki066Je5V8WtSoj4PphTc/Qy RiU1FQIisaNU84hG/JvJSRMT2vsd2QCTBWl/h73cN8vr4CeavspQ7iafAA2kM4g+N9+c nBj/ANkAhcdRntfqFgOsLfWGD1+WqCykW516Wj4XPy6J4ag9p83dFR9/7hqpDksveH+o zXTQ== X-Gm-Message-State: AC+VfDx6lmjM/1mwkoPPLK0oF1Ec+k3HcdjIXgKi0/v6OgBlRadM0UY1 XD3pIRa2qKaTkqELRIZ4hgpRtw== X-Google-Smtp-Source: ACHHUZ7pRjddpTaqA+rNwwqWdUkP3ix36JOQEr5MtBnN2+HAoHp+/Fm52aUqp3PwSgtFo4Tme5DiVw== X-Received: by 2002:a17:907:9405:b0:957:12a6:a00f with SMTP id dk5-20020a170907940500b0095712a6a00fmr38215544ejc.21.1684394885268; Thu, 18 May 2023 00:28:05 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:a2b:c408:5834:f48e]) by smtp.gmail.com with ESMTPSA id g17-20020a17090669d100b00965aee5be9asm594241ejs.170.2023.05.18.00.28.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 00:28:04 -0700 (PDT) From: Krzysztof Kozlowski To: Oder Chiou , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski , Pierre-Louis Bossart Subject: [RESEND PATCH 07/12] ASoC: codecs: rt711: do not store status in state container Date: Thu, 18 May 2023 09:27:48 +0200 Message-Id: <20230518072753.7361-8-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230518072753.7361-1-krzysztof.kozlowski@linaro.org> References: <20230518072753.7361-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Message-ID-Hash: UIANKMJIUNEEQBGUNF3EMK5DCICRB24R X-Message-ID-Hash: UIANKMJIUNEEQBGUNF3EMK5DCICRB24R X-MailFrom: krzysztof.kozlowski@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Driver in its update status callback stores Soundwire device status in state container but it never uses it later. Simplify the code a bit. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Pierre-Louis Bossart --- sound/soc/codecs/rt711-sdw.c | 5 +---- sound/soc/codecs/rt711.h | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/sound/soc/codecs/rt711-sdw.c b/sound/soc/codecs/rt711-sdw.c index 4fe68bcf2a7c..b8ed3c6236d8 100644 --- a/sound/soc/codecs/rt711-sdw.c +++ b/sound/soc/codecs/rt711-sdw.c @@ -319,9 +319,6 @@ static int rt711_update_status(struct sdw_slave *slave, { struct rt711_priv *rt711 = dev_get_drvdata(&slave->dev); - /* Update the status */ - rt711->status = status; - if (status == SDW_SLAVE_UNATTACHED) rt711->hw_init = false; @@ -329,7 +326,7 @@ static int rt711_update_status(struct sdw_slave *slave, * Perform initialization only if slave status is present and * hw_init flag is false */ - if (rt711->hw_init || rt711->status != SDW_SLAVE_ATTACHED) + if (rt711->hw_init || status != SDW_SLAVE_ATTACHED) return 0; /* perform I/O transfers required for Slave initialization */ diff --git a/sound/soc/codecs/rt711.h b/sound/soc/codecs/rt711.h index b31351f11df9..491e357191f9 100644 --- a/sound/soc/codecs/rt711.h +++ b/sound/soc/codecs/rt711.h @@ -15,7 +15,6 @@ struct rt711_priv { struct regmap *sdw_regmap; struct snd_soc_component *component; struct sdw_slave *slave; - enum sdw_slave_status status; struct sdw_bus_params params; bool hw_init; bool first_hw_init; From patchwork Thu May 18 07:27:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 683412 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0F945C7EE23 for ; Thu, 18 May 2023 07:32:42 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 04E47820; Thu, 18 May 2023 09:31:50 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 04E47820 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1684395160; bh=Iqyby5VEg0SeiuVu7tvN9a01i2rhmWAoC4yPy1hiHpo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=S5Y2kGS68cVjwSyg+eXc/fTbZJv7tZizx/f0B8ozKj4QoJxNW8Grvn04/erXTmzs2 YAl3g0NFBcbLYArLbwR8Y4PmcTD3RMZ7zT/IwKTc1v1+FJTiVD3mhZ4VjaMGlE/cAy FimZankIMknXU842VUN5c7oD6cILL10lcuwtGMc0= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 911B4F80603; Thu, 18 May 2023 09:28:49 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 0885CF805FF; Thu, 18 May 2023 09:28:49 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 68136F805AC; Thu, 18 May 2023 09:28:33 +0200 (CEST) Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 263D3F80548 for ; Thu, 18 May 2023 09:28:08 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 263D3F80548 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=fGc0R2lA Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-965b5f3b9ffso177822266b.0 for ; Thu, 18 May 2023 00:28:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684394886; x=1686986886; 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=YAnyusDSWoWYoHl8ExRyZExxONPzTQENQiwitAy+Yow=; b=fGc0R2lAtf83BfVI6TvwcDj2bdZJTVJZqt4QHboCsxtKA0NQJfBqJqUxxJDCmQfDql VSahfgrHD3mnGLxahg7xk8X1YbExxhcUrrUW5INaUyBgR74rNCJBZqO9i0Sc93LZeXlF V8YFqCJzT/ulYdMA/4oqonmaURd3fn96NaHWKQkzNHj3o+Y+Yovm01/Is22QDfnv2Xxv +mxn/yVHYCknBOQFhLTivV5OP7w8wUsSB7npWly5VaKDSsoSIIKF+sK2JnVpJfhudJ0f 55/vf049iXJOBbjzw+10+Xsfwj/gP5WpRR8lOyYqV0q++J2sJGDarPcLSHPr3S3epPbk CBsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684394886; x=1686986886; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YAnyusDSWoWYoHl8ExRyZExxONPzTQENQiwitAy+Yow=; b=STbDNHjMY1RK3+m/18cbdRpsy/hP4X6LHpvAV5mOOi9m1fhUDrrjsrtGwkTwX3DBqw lbv/ObWLCL6tNoW6OaZIYJY6tvPy+cokTLulQ9yiJyTa4FsYYNpruHI7VEO0kM1sV9Kf RQMsJOesYBUsiBeSECV8VO4lfDAyFq9cdaMTbqQlagEMLbcyALUgtZE42OrbF/c/r9In ncD27vlnQLmpnoZf6t4fAqSWFVSJVgHAtjO0J+YVGpARJCsPos2NDe0RKAGlS6vfAf8c 135s1Sh1ZttHA2WJ/fHok3tscEWn3Ns0+wrKrc7/0DGT0e8OXnecNm1Qb9/9zoOBJVNX 0RjA== X-Gm-Message-State: AC+VfDyXxxBsKFocCQPn3vA+6BVVUf/8zOQENNIsqJ3V4axl/ddQ2wD5 HHopQ0kDOAaK23WwZxBYxGi+6w== X-Google-Smtp-Source: ACHHUZ7A6J5q3lKRmQdoRE77X3+XkJxZpq6vCwemsAeRMtFaxdKJGUtSy7k0o4X3f46sQBZJ573Usw== X-Received: by 2002:a17:907:96a1:b0:94f:236b:9e3a with SMTP id hd33-20020a17090796a100b0094f236b9e3amr4762971ejc.3.1684394886350; Thu, 18 May 2023 00:28:06 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:a2b:c408:5834:f48e]) by smtp.gmail.com with ESMTPSA id g17-20020a17090669d100b00965aee5be9asm594241ejs.170.2023.05.18.00.28.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 00:28:05 -0700 (PDT) From: Krzysztof Kozlowski To: Oder Chiou , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski , Pierre-Louis Bossart Subject: [RESEND PATCH 08/12] ASoC: codecs: rt712-sdca-dmic: do not store status in state container Date: Thu, 18 May 2023 09:27:49 +0200 Message-Id: <20230518072753.7361-9-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230518072753.7361-1-krzysztof.kozlowski@linaro.org> References: <20230518072753.7361-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Message-ID-Hash: 7JNZMDQ72OXUZO4EDWYRSNUCDXOYMQCN X-Message-ID-Hash: 7JNZMDQ72OXUZO4EDWYRSNUCDXOYMQCN X-MailFrom: krzysztof.kozlowski@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Driver in its update status callback stores Soundwire device status in state container but it never uses it later. Simplify the code a bit. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Pierre-Louis Bossart --- sound/soc/codecs/rt712-sdca-dmic.c | 5 +---- sound/soc/codecs/rt712-sdca-dmic.h | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/sound/soc/codecs/rt712-sdca-dmic.c b/sound/soc/codecs/rt712-sdca-dmic.c index 09807b6d6353..847198e6c07e 100644 --- a/sound/soc/codecs/rt712-sdca-dmic.c +++ b/sound/soc/codecs/rt712-sdca-dmic.c @@ -803,9 +803,6 @@ static int rt712_sdca_dmic_update_status(struct sdw_slave *slave, { struct rt712_sdca_dmic_priv *rt712 = dev_get_drvdata(&slave->dev); - /* Update the status */ - rt712->status = status; - if (status == SDW_SLAVE_UNATTACHED) rt712->hw_init = false; @@ -813,7 +810,7 @@ static int rt712_sdca_dmic_update_status(struct sdw_slave *slave, * Perform initialization only if slave status is present and * hw_init flag is false */ - if (rt712->hw_init || rt712->status != SDW_SLAVE_ATTACHED) + if (rt712->hw_init || status != SDW_SLAVE_ATTACHED) return 0; /* perform I/O transfers required for Slave initialization */ diff --git a/sound/soc/codecs/rt712-sdca-dmic.h b/sound/soc/codecs/rt712-sdca-dmic.h index 74c29677c251..110154e74efe 100644 --- a/sound/soc/codecs/rt712-sdca-dmic.h +++ b/sound/soc/codecs/rt712-sdca-dmic.h @@ -16,7 +16,6 @@ struct rt712_sdca_dmic_priv { struct regmap *mbq_regmap; struct snd_soc_component *component; struct sdw_slave *slave; - enum sdw_slave_status status; struct sdw_bus_params params; bool hw_init; bool first_hw_init; From patchwork Thu May 18 07:27:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 683414 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 67C57C7EE24 for ; Thu, 18 May 2023 07:31:32 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 341C7827; Thu, 18 May 2023 09:30:40 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 341C7827 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1684395090; bh=72IOSX+RBqqWeihAkeUuZGbYVOJ/4lmBe8Q/033gqUg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=DnhvCtIlbejSFuESbVDYVVhRRv0vYRZtAZ8IUaBm7+xEQUGIuVcdRF5PZtkhxIsuQ NxG5Ysf0khHugQRnNeyCJ98ZFV7Cy0/IwW9cvWqgZ1TU7DkCWaONj8rZNEy26nJt45 BDLLXXEzkbpL69cCFHJ0Hz4uJ5/7EhV8TEGZukQI= Received: by alsa1.perex.cz (Postfix, from userid 50401) id A79C8F805D9; Thu, 18 May 2023 09:28:39 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 277D4F805CA; Thu, 18 May 2023 09:28:39 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7C226F80544; Thu, 18 May 2023 09:28:28 +0200 (CEST) Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id CEEE3F80544 for ; Thu, 18 May 2023 09:28:09 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CEEE3F80544 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=ekpuCluP Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-50be17a1eceso2943732a12.2 for ; Thu, 18 May 2023 00:28:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684394887; x=1686986887; 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=qojvzkxpai9FaVqu5a3rsXDeVwEMlNrj9bbWfn2RUs4=; b=ekpuCluPIWtdcF+DlLdXQuBzWj2T3yqpK1eo5JOW9J+oC2TnU4Cu1/c3Qnl+cfxOMw QBDnMXqS5j84+cx64RCXvTyFPrrcphblozW0EG3ZzG2JV1guL8LrjNwOtLCGCRsvPZ8S OuE6Binws0/Z/JuQXY+w2aI57UE1CxV3oiLNa2MzgQJ+3uHfPm+vH/1bl6BXXzLkK2B4 dNDXzwm6LPn9xO7B/LrYtwYKooOXnDsoQ89EboL03MI+GbDcdrNKo5x8aoUVPY0YphO2 n+f3oAlZzVl0enXvl953TFLLYHfNmW0zKDx2Zi2aAEcCyaSPpaWJIiuvpWghqsooIe6l Ppxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684394887; x=1686986887; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qojvzkxpai9FaVqu5a3rsXDeVwEMlNrj9bbWfn2RUs4=; b=JlSTy1ncXgREM9mmCP2VW7D0+sMVnbwiN2rIYYg6WkCVXYp1QTduZm3xlr0GYZ8ulx OMeK+fGxcf7CAKVPqTdVHJt5T7C+5lVUS7DgKHtE6cmVEZUF2Ca33C3+wxs8S7qCUeaM hVeg1clHTjYCr8Q5uYuYgoezD7T293YXXzhX9aWW/gDN3/3NgmTPg64WbJYgNTZSnLm2 0we/yXuXLFlC/cLWqa1+f+HKAqqsRcvl9+LoXdvBIu/hQdwyU4nJYYky9sTPj8sqSJ5C 8EdSO+LSsH2Q8cHO4mgHT8MmzVvqEmLDefqWoG8nkH2UYp2QBltYaai9iB4TQhxu7isH 7mVA== X-Gm-Message-State: AC+VfDygrH955MaykZzecVReSFJc8Z4dFvagX6rVKAoYgG4Ch59UJywN MHNlMee8BEEeOToK34wUXGimZQ== X-Google-Smtp-Source: ACHHUZ7SDfkB5r68xXymWzpYbDvg/6rwAIMLjQpgKOm1OMdIsaHCpDhTO5xEPRYHd2ZoKGeNEKYr8g== X-Received: by 2002:a17:907:31cb:b0:95e:ce3b:a471 with SMTP id xf11-20020a17090731cb00b0095ece3ba471mr42167358ejb.55.1684394887570; Thu, 18 May 2023 00:28:07 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:a2b:c408:5834:f48e]) by smtp.gmail.com with ESMTPSA id g17-20020a17090669d100b00965aee5be9asm594241ejs.170.2023.05.18.00.28.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 00:28:07 -0700 (PDT) From: Krzysztof Kozlowski To: Oder Chiou , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski , Pierre-Louis Bossart Subject: [RESEND PATCH 09/12] ASoC: codecs: rt712-sdca: do not store status in state container Date: Thu, 18 May 2023 09:27:50 +0200 Message-Id: <20230518072753.7361-10-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230518072753.7361-1-krzysztof.kozlowski@linaro.org> References: <20230518072753.7361-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Message-ID-Hash: YX7JXFYCC7HT6H5N2RNLXCHRMJUSS5YG X-Message-ID-Hash: YX7JXFYCC7HT6H5N2RNLXCHRMJUSS5YG X-MailFrom: krzysztof.kozlowski@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Driver in its update status callback stores Soundwire device status in state container but it never uses it later. Simplify the code a bit. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Pierre-Louis Bossart --- sound/soc/codecs/rt712-sdca-sdw.c | 5 +---- sound/soc/codecs/rt712-sdca.h | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/sound/soc/codecs/rt712-sdca-sdw.c b/sound/soc/codecs/rt712-sdca-sdw.c index 3f319459dfec..8f65516e7562 100644 --- a/sound/soc/codecs/rt712-sdca-sdw.c +++ b/sound/soc/codecs/rt712-sdca-sdw.c @@ -140,9 +140,6 @@ static int rt712_sdca_update_status(struct sdw_slave *slave, { struct rt712_sdca_priv *rt712 = dev_get_drvdata(&slave->dev); - /* Update the status */ - rt712->status = status; - if (status == SDW_SLAVE_UNATTACHED) rt712->hw_init = false; @@ -165,7 +162,7 @@ static int rt712_sdca_update_status(struct sdw_slave *slave, * Perform initialization only if slave status is present and * hw_init flag is false */ - if (rt712->hw_init || rt712->status != SDW_SLAVE_ATTACHED) + if (rt712->hw_init || status != SDW_SLAVE_ATTACHED) return 0; /* perform I/O transfers required for Slave initialization */ diff --git a/sound/soc/codecs/rt712-sdca.h b/sound/soc/codecs/rt712-sdca.h index c6a94a23f46e..ff79e03118ce 100644 --- a/sound/soc/codecs/rt712-sdca.h +++ b/sound/soc/codecs/rt712-sdca.h @@ -20,7 +20,6 @@ struct rt712_sdca_priv { struct regmap *mbq_regmap; struct snd_soc_component *component; struct sdw_slave *slave; - enum sdw_slave_status status; struct sdw_bus_params params; bool hw_init; bool first_hw_init; From patchwork Thu May 18 07:27:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 684517 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D8EE8C7EE23 for ; Thu, 18 May 2023 07:31:49 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 8A47A208; Thu, 18 May 2023 09:30:57 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8A47A208 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1684395107; bh=Vu09X0qw5LIqSG3SsUGg6W4knv1eorf2cYkNr0qLpFs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=PYp+jPgT9+VDTXcCIvXU39UN5tDWdD4kLc5VWYyaY+lI7eOANRF9InBkkuKnTOeCA /vdNL+MK52WNMUQlJG+a1dI0IUAdN2hf4H44MJtOF/PhgqfmlMzT66kbYwctjY+sYv Lv8j5Sfh4RnYHojXGRSHk97zEBBBIisjPWGoaLEE= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 93F62F805E6; Thu, 18 May 2023 09:28:42 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id C73EDF805C0; Thu, 18 May 2023 09:28:41 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 795E3F805A9; Thu, 18 May 2023 09:28:30 +0200 (CEST) Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 09434F8025A for ; Thu, 18 May 2023 09:28:10 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 09434F8025A Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=TznhBWZE Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-953343581a4so250395966b.3 for ; Thu, 18 May 2023 00:28:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684394889; x=1686986889; 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=WSuhjZFmCIUit+haslyLLFjLlYcrxcE4KHcrJzAwJBY=; b=TznhBWZE03vv3t6BYxwUACwueYgrs1Ep3am2yskk4mEYGRjuema9R0bhklB/A4EYwq xq/kh/yu/4rwL9VhJPMfJS0lEVnKKv1az7+D9EicsrG+MicaTGHQFqn3+JEg2DI/X7Fb C+qzU/kJAFGbXFHTHMMYV8g6qAusfkex407LywnkHKTONWMAX7lqCi/piOOmH3amTtuS ZkOf57RBU9nd12mJzy1DZpOD7RQvNhZOxMq2r4452BSN7mjw+j28ELcvKSNmmtTT+nPg hMxwfQIAv5NlxIp8w+yqPqay10dOLP70vMRa5pncT+r8uYjN7/mf8UfaB6m5XfjjjKTE vriQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684394889; x=1686986889; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WSuhjZFmCIUit+haslyLLFjLlYcrxcE4KHcrJzAwJBY=; b=hE8I0x0W0uIFTTknfdtBhlCb3LVL5ODTgI6MnpH6RD62+08/vJAlwiaSg8Z17KvulT 4u3o9jrmWvj3b08i6rFO/4a1/2OwHsYO5Tuose0qv7XruoWUM7WZgB/SYA+epsrg7xsK Pk2nf3G+0FC/GgDV2pJwDVtI5dxAG1Z6HtxMLgWTlB0iJRA/bSzo4VyFig0DlFPEMb8k kpD29ZKp+csDqEaxIhqRX73P3zh9uw8WA/9l0BQtjqXJqRIMnho1SiXsx4hEO3UNX7L6 3kBwhYXaOHitF8VpJYpwsNni+kxgyCfVEJYYHz/RMEfHzlXvUS0EZT4sm9wEQGquCyFa g2jw== X-Gm-Message-State: AC+VfDyTkq5jPw1zOd01Z6NqvL6l/NWcGfldpsBq1ARB+r/cnDaoy1ZS jcMYTJNYMqCfEeK3v6BiEWDl1dW1H1JBAKNxNfhxOA== X-Google-Smtp-Source: ACHHUZ4McNgf/1YlCyZhja1AYOncpGaPhNUPxjBOY/NlnHGibDpAgAupegzUKCoSeRkDzpsEpb9d9g== X-Received: by 2002:a17:907:7293:b0:969:dda1:38a4 with SMTP id dt19-20020a170907729300b00969dda138a4mr32698956ejc.38.1684394888689; Thu, 18 May 2023 00:28:08 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:a2b:c408:5834:f48e]) by smtp.gmail.com with ESMTPSA id g17-20020a17090669d100b00965aee5be9asm594241ejs.170.2023.05.18.00.28.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 00:28:08 -0700 (PDT) From: Krzysztof Kozlowski To: Oder Chiou , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski , Pierre-Louis Bossart Subject: [RESEND PATCH 10/12] ASoC: codecs: rt715-sdca: do not store status in state container Date: Thu, 18 May 2023 09:27:51 +0200 Message-Id: <20230518072753.7361-11-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230518072753.7361-1-krzysztof.kozlowski@linaro.org> References: <20230518072753.7361-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Message-ID-Hash: GIVUE4JTSHVH5NRFGNWLC56652TF7DKC X-Message-ID-Hash: GIVUE4JTSHVH5NRFGNWLC56652TF7DKC X-MailFrom: krzysztof.kozlowski@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Driver in its update status callback stores Soundwire device status in state container but it never uses it later. Simplify the code a bit. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Pierre-Louis Bossart --- sound/soc/codecs/rt715-sdca-sdw.c | 5 +---- sound/soc/codecs/rt715-sdca.h | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/sound/soc/codecs/rt715-sdca-sdw.c b/sound/soc/codecs/rt715-sdca-sdw.c index 38a82e4e2f95..7e5ddce8097d 100644 --- a/sound/soc/codecs/rt715-sdca-sdw.c +++ b/sound/soc/codecs/rt715-sdca-sdw.c @@ -121,14 +121,11 @@ static int rt715_sdca_update_status(struct sdw_slave *slave, { struct rt715_sdca_priv *rt715 = dev_get_drvdata(&slave->dev); - /* Update the status */ - rt715->status = status; - /* * Perform initialization only if slave status is present and * hw_init flag is false */ - if (rt715->hw_init || rt715->status != SDW_SLAVE_ATTACHED) + if (rt715->hw_init || status != SDW_SLAVE_ATTACHED) return 0; /* perform I/O transfers required for Slave initialization */ diff --git a/sound/soc/codecs/rt715-sdca.h b/sound/soc/codecs/rt715-sdca.h index 7577f3151934..e5d6928ecaba 100644 --- a/sound/soc/codecs/rt715-sdca.h +++ b/sound/soc/codecs/rt715-sdca.h @@ -24,7 +24,6 @@ struct rt715_sdca_priv { int dbg_nid; int dbg_vid; int dbg_payload; - enum sdw_slave_status status; struct sdw_bus_params params; bool hw_init; bool first_hw_init; From patchwork Thu May 18 07:27:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 684515 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5D543C77B7D for ; Thu, 18 May 2023 07:32:50 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 5381D847; Thu, 18 May 2023 09:31:58 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5381D847 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1684395168; bh=xYxu2C2nbnCatdsx3U2EwKp8dc9IRWJAjK8i3LnwSfk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=i8QSgd2ApnO40SJzMAyeJIQ6P4Eg5VIuUOVOKxKiDCxyj5jDzG4aPpFnJnvlgvJyO 6/B5elmP+KhXU6hzlOEO4E4pdg9Oqy7yRWfAb6Y7pLG5V1lEzNe7cGasy2CWqg9Vpx 3tm/e2D6Hmmc7c4AyyvbaGrpvqCOOYPFtD+6lUec= Received: by alsa1.perex.cz (Postfix, from userid 50401) id CB371F8060A; Thu, 18 May 2023 09:28:53 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id F1337F80601; Thu, 18 May 2023 09:28:52 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0DDB9F805B3; Thu, 18 May 2023 09:28:33 +0200 (CEST) Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id C0140F80551 for ; Thu, 18 May 2023 09:28:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C0140F80551 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=SY4zlhD/ Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-94a342f7c4cso318871666b.0 for ; Thu, 18 May 2023 00:28:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684394890; x=1686986890; 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=XVXk2J0zDtxw+0Qou5QUMtzlXSrHNQ48trwuAxglr6Q=; b=SY4zlhD/Ae3NqKWMgCYMmnInKUuz8aaW8w1LrZj140mUYU5ssSsPDI2EaABgQV9yap Ernl5l+MQeuF813vs5dgtI3WN3/XEiNudVVFA0hkaEZ04MQ1bZCxFSWxvUdn6kImX9+V IgVBEGaTPpfiGrTgAqGxD32MVO3InaXImAWE2u9wbz7HoXqOsm+0equhQfc5EpKrAtEO stmHcBuSxYTR4GnFSv0T6INTHLSjpLcWbXQOs/KvYprUoPnIioiimgAKeyhBOhy+brFc tR0btKWih37xTmEtBAEVCjy5nGMy4zD622zLbnzNYpyK4K6T85rxfEQtxaaLr7X45K6F 9nGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684394890; x=1686986890; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XVXk2J0zDtxw+0Qou5QUMtzlXSrHNQ48trwuAxglr6Q=; b=fQGvGhX+wYEXrua+9Bux548J4iwcwFE1oyGdbRDP+oK4+5LdPPMySP0vz9stotl9Yn eoRfRljRyaId2q1KUstYjhugjyadPlokarjJL4V2h50x2x7NFjvId6I084sXwIB6WOKO +jWXlBWr/RD62Tyr+8cdxyWlkIII3h/ETBDL0h+QA7hfIIubBMjDextVRB2bpP4qH1YQ Rll7yq4xeFIBFTHB8Ks8xe9B1PyJuOCwIICey+AWnQsmIu9/C3BeJbxYZ33cF2Xcu0nv 7u6N0STpVZnaM5lu+VCN5hZIL989q6ovh6PNwghcgcIZveAExo68xwLZwqOMDw8xqQDI Smrg== X-Gm-Message-State: AC+VfDxnYf8V48hmml0xyQkkIUC5JqpVVhFWAoFUC6JIQWvJj+SmIFxL ayEdGZ9vPWdYhIYVru1iOfR0vQ== X-Google-Smtp-Source: ACHHUZ641f7zdyr1VGHoaOYeHSFCkkKsFuebd6A4/URfBSRepYIOCVjPIppyj2S59eXBj/0kOl+6sw== X-Received: by 2002:a17:907:80e:b0:94e:9a73:1637 with SMTP id wv14-20020a170907080e00b0094e9a731637mr36831708ejb.75.1684394889884; Thu, 18 May 2023 00:28:09 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:a2b:c408:5834:f48e]) by smtp.gmail.com with ESMTPSA id g17-20020a17090669d100b00965aee5be9asm594241ejs.170.2023.05.18.00.28.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 00:28:09 -0700 (PDT) From: Krzysztof Kozlowski To: Oder Chiou , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski , Pierre-Louis Bossart Subject: [RESEND PATCH 11/12] ASoC: codecs: rt715: do not store status in state container Date: Thu, 18 May 2023 09:27:52 +0200 Message-Id: <20230518072753.7361-12-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230518072753.7361-1-krzysztof.kozlowski@linaro.org> References: <20230518072753.7361-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Message-ID-Hash: UJBDATE7L4SBU5RCU6S7WPLRLFV6RAMU X-Message-ID-Hash: UJBDATE7L4SBU5RCU6S7WPLRLFV6RAMU X-MailFrom: krzysztof.kozlowski@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Driver in its update status callback stores Soundwire device status in state container but it never uses it later. Simplify the code a bit. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Pierre-Louis Bossart --- sound/soc/codecs/rt715-sdw.c | 4 +--- sound/soc/codecs/rt715.h | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/sound/soc/codecs/rt715-sdw.c b/sound/soc/codecs/rt715-sdw.c index 5ffe9a00dfd8..6db87442b783 100644 --- a/sound/soc/codecs/rt715-sdw.c +++ b/sound/soc/codecs/rt715-sdw.c @@ -417,13 +417,11 @@ static int rt715_update_status(struct sdw_slave *slave, { struct rt715_priv *rt715 = dev_get_drvdata(&slave->dev); - /* Update the status */ - rt715->status = status; /* * Perform initialization only if slave status is present and * hw_init flag is false */ - if (rt715->hw_init || rt715->status != SDW_SLAVE_ATTACHED) + if (rt715->hw_init || status != SDW_SLAVE_ATTACHED) return 0; /* perform I/O transfers required for Slave initialization */ diff --git a/sound/soc/codecs/rt715.h b/sound/soc/codecs/rt715.h index 17a8d041c1c3..12a0ae656d09 100644 --- a/sound/soc/codecs/rt715.h +++ b/sound/soc/codecs/rt715.h @@ -18,7 +18,6 @@ struct rt715_priv { int dbg_nid; int dbg_vid; int dbg_payload; - enum sdw_slave_status status; struct sdw_bus_params params; bool hw_init; bool first_hw_init; From patchwork Thu May 18 07:27:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 683413 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B8879C77B7D for ; Thu, 18 May 2023 07:31:59 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id A244B200; Thu, 18 May 2023 09:31:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A244B200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1684395117; bh=us34Eav5mASsFlGyhU7Uhg/+iRGmhNRG5z43OLR58E8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Sl5BcE5aRtMdBGEUjHVJEIr8g9K1vlu8HfR5qQt7JsFW4ThrH8xuX6ulWFEEkPrCR cN2lakAmi/wtrrU783o1bA2lReQbRqvhNa0pzw3Xz6ac9KH7x3i+cVvqqxJlH4oeDE W7TsTNOL9xaAT1ArUu4a2/a4jr11s/F27/kr2+QE= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 57E6DF805E9; Thu, 18 May 2023 09:28:45 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id C1F97F805F1; Thu, 18 May 2023 09:28:44 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 615A2F805A0; Thu, 18 May 2023 09:28:31 +0200 (CEST) Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 0A5D7F80549 for ; Thu, 18 May 2023 09:28:12 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0A5D7F80549 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=oM+RXRYe Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-510eb3dbaaeso286101a12.1 for ; Thu, 18 May 2023 00:28:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684394891; x=1686986891; 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=aIwJNTzxhNUSrbT0TXBGuXZECsHlorjZtBHAk3OzfKw=; b=oM+RXRYewHu4bLBr2ElIoV0dqPvtWyZM0qOHY/GFfmSdVrPTj24HiN13Hh7N8TAeni J5WYZxY71PrQQyURr3ZcPaKy25fwgtH9gFwJn5xRfVV+YN7j8Yg1IIVxxp/wI9aXf5Y8 n2GPRztj+HYrJ4tRS4qSrFvEZytlLMWMzvtkAIU4+gnpOMjkrAzXJUiw8D3OFvqdXkOp Y9C4Mjs64P8/DSnrbXzRNoMWa7x8uyymebiZANZSmRclRig3M6WKiWX9Mfv3q1gq3q16 ZpCP+MgXPKH2V0022YfM/aj/MxtPC8Jv9fMliQBdeYJP4QhbMx7ox+z3jhylUoAfhJZn fbOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684394891; x=1686986891; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aIwJNTzxhNUSrbT0TXBGuXZECsHlorjZtBHAk3OzfKw=; b=H5mPsPc3PqgCwAKPh+V/q6hQPKAt4F8Lx9tMWbV2oHISX/eQoiPz5/0ntPbn2tB2/N qa3bGyaxkAtTM6nDY3mVxE3xEDtsLdBMj/qR8vYADHLP5pqf5dLYdaLM5MBRTUlCrMlW vaDJjzPv3Q/7MPM/UHnKAAQtgu6bgrPTci1+0yS97uK6PGeP+COHDxJtHFXfGGL+lphY ArdFKpsi3N57UjJ9zGEr1Eo1t2hNHAkYU7PyZFtKrW6VmYjM+zyrmf90UcGc2m1HcdrS GdP0N1nvEDwsFlBFGo86YUHyrMIIv3hDlxWd8YOedoLVir6WnjUQcuv/X8uTCZZfXtLd L/5w== X-Gm-Message-State: AC+VfDzAPKr3J4y/4JPUYL1fyl7lcXYgzftkb6rTK8Y5cQ4hk6XxRG9Z 8a5rVdrK+6d4FxMVNA6aXwKZcgP0Is87IQvbBwKeJQ== X-Google-Smtp-Source: ACHHUZ5OyqRsRWc7zyUbnXlZEEMWIsRGekh6wkroEH6t7iYe7O1fvVzQsYjovW9n9PSXNsvSM3Ws0A== X-Received: by 2002:a17:906:58d5:b0:969:9fd0:7cee with SMTP id e21-20020a17090658d500b009699fd07ceemr33147092ejs.10.1684394890980; Thu, 18 May 2023 00:28:10 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:a2b:c408:5834:f48e]) by smtp.gmail.com with ESMTPSA id g17-20020a17090669d100b00965aee5be9asm594241ejs.170.2023.05.18.00.28.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 00:28:10 -0700 (PDT) From: Krzysztof Kozlowski To: Oder Chiou , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski , Pierre-Louis Bossart Subject: [RESEND PATCH 12/12] ASoC: codecs: rt722-sdca: do not store status in state container Date: Thu, 18 May 2023 09:27:53 +0200 Message-Id: <20230518072753.7361-13-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230518072753.7361-1-krzysztof.kozlowski@linaro.org> References: <20230518072753.7361-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Message-ID-Hash: 34FERF6AV23QZLMA7NOUMRKML2K2HRVK X-Message-ID-Hash: 34FERF6AV23QZLMA7NOUMRKML2K2HRVK X-MailFrom: krzysztof.kozlowski@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Driver in its update status callback stores Soundwire device status in state container but it never uses it later. Simplify the code a bit. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Pierre-Louis Bossart --- sound/soc/codecs/rt722-sdca-sdw.c | 5 +---- sound/soc/codecs/rt722-sdca.h | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/sound/soc/codecs/rt722-sdca-sdw.c b/sound/soc/codecs/rt722-sdca-sdw.c index 0a791a14215e..bfb2dac6bfee 100644 --- a/sound/soc/codecs/rt722-sdca-sdw.c +++ b/sound/soc/codecs/rt722-sdca-sdw.c @@ -163,9 +163,6 @@ static int rt722_sdca_update_status(struct sdw_slave *slave, { struct rt722_sdca_priv *rt722 = dev_get_drvdata(&slave->dev); - /* Update the status */ - rt722->status = status; - if (status == SDW_SLAVE_UNATTACHED) rt722->hw_init = false; @@ -188,7 +185,7 @@ static int rt722_sdca_update_status(struct sdw_slave *slave, * Perform initialization only if slave status is present and * hw_init flag is false */ - if (rt722->hw_init || rt722->status != SDW_SLAVE_ATTACHED) + if (rt722->hw_init || status != SDW_SLAVE_ATTACHED) return 0; /* perform I/O transfers required for Slave initialization */ diff --git a/sound/soc/codecs/rt722-sdca.h b/sound/soc/codecs/rt722-sdca.h index 5bc6184d09aa..44af8901352e 100644 --- a/sound/soc/codecs/rt722-sdca.h +++ b/sound/soc/codecs/rt722-sdca.h @@ -20,7 +20,6 @@ struct rt722_sdca_priv { struct regmap *mbq_regmap; struct snd_soc_component *component; struct sdw_slave *slave; - enum sdw_slave_status status; struct sdw_bus_params params; bool hw_init; bool first_hw_init;