From patchwork Fri Jul 12 14:07:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 13731847 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 E3C85C2BD09 for ; Fri, 12 Jul 2024 14:19: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 9191D86E; Fri, 12 Jul 2024 16:19:18 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9191D86E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1720793968; bh=1tdVOay90qKoOBtZsqzjMTRYxUTqdTqLiJ2eTqVl8pQ=; 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=K9d7FHTPM0l2mxvguVgGGt0IltI7vAJls/ahkhYHtWjoeSdBSGFQ5B02Z3PWKozHY 76/JbKMsfUjHW8R6j2bgUh8kkSfMtde6MitjR2T/RK1x7gmXdhQL4vutn9wPdNlirv lZKzb/4L+fBRfDdVwR1fnMrbIc5CPzHyLdZF7k/I= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 139B9F805E5; Fri, 12 Jul 2024 16:18: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 A0B52F805E0; Fri, 12 Jul 2024 16:18:38 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 77DC3F8020D; Fri, 12 Jul 2024 16:13:03 +0200 (CEST) Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 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 D45EFF80074 for ; Fri, 12 Jul 2024 16:08:46 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D45EFF80074 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=GK3m/Myd Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id E0A5FCE1A5F; Fri, 12 Jul 2024 14:08:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D1950C32786; Fri, 12 Jul 2024 14:08:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1720793318; bh=1tdVOay90qKoOBtZsqzjMTRYxUTqdTqLiJ2eTqVl8pQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GK3m/MydnKsOO1mz/qpTsUU9Nr0bk06clrR4al/JiC6cqzmPsBG5Hg/HbrJB6V5p/ VfO1OeNQUzdM+OAukBXhVBcVRSp5SB+3n5uLIFzmDi3kBmFiZEqg9NVVvYSbC5VVoc eoyXCcg3bLYTzGi26SRde1JghliDd10PABRONJVZC2NJ9XUN2ijKT90rpaFnI7/sK5 jtgGc+IwwfRZqgutxUkGBICwFtSEUcLruWvBq6auro1SmcJ7J3HlBcVUK+8MKfgMhb /dMLabtmPad37/NGQduHsN/yIc9xDE/Cr8JDp731IT3AI/lwsZXg+aPNrmSpKGjpV1 36B76Ub7UWTQg== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1sSGww-000000006KD-1grC; Fri, 12 Jul 2024 16:08:38 +0200 From: Johan Hovold To: Vinod Koul , Bard Liao Cc: Pierre-Louis Bossart , Sanyog Kale , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH v3 1/3] soundwire: bus: suppress probe deferral errors Date: Fri, 12 Jul 2024 16:07:59 +0200 Message-ID: <20240712140801.24267-2-johan+linaro@kernel.org> X-Mailer: git-send-email 2.44.2 In-Reply-To: <20240712140801.24267-1-johan+linaro@kernel.org> References: <20240712140801.24267-1-johan+linaro@kernel.org> MIME-Version: 1.0 Message-ID-Hash: 7UNN2T65OJHXFCDBJNKDX4MIAOHLAUQE X-Message-ID-Hash: 7UNN2T65OJHXFCDBJNKDX4MIAOHLAUQE X-MailFrom: johan+linaro@kernel.org X-Mailman-Rule-Hits: nonmember-moderation 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 X-Mailman-Version: 3.3.9 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: Soundwire driver probe errors are currently being logged both by the bus code and driver core: wsa884x-codec sdw:4:0:0217:0204:00:0: Probe of wsa884x-codec failed: -12 wsa884x-codec sdw:4:0:0217:0204:00:0: probe with driver wsa884x-codec failed with error -12 Drop the redundant bus error message, which is also incorrectly being logged on probe deferral: wsa884x-codec sdw:4:0:0217:0204:00:0: Probe of wsa884x-codec failed: -517 Note that no soundwire driver uses the driver struct name field, which will be removed by a follow-on change. Signed-off-by: Johan Hovold Reviewed-by: Pierre-Louis Bossart --- drivers/soundwire/bus_type.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/soundwire/bus_type.c b/drivers/soundwire/bus_type.c index c32faace618f..85fa5970d98a 100644 --- a/drivers/soundwire/bus_type.c +++ b/drivers/soundwire/bus_type.c @@ -83,7 +83,6 @@ static int sdw_drv_probe(struct device *dev) struct sdw_slave *slave = dev_to_sdw_dev(dev); struct sdw_driver *drv = drv_to_sdw_driver(dev->driver); const struct sdw_device_id *id; - const char *name; int ret; /* @@ -108,11 +107,6 @@ static int sdw_drv_probe(struct device *dev) ret = drv->probe(slave, id); if (ret) { - name = drv->name; - if (!name) - name = drv->driver.name; - - dev_err(dev, "Probe of %s failed: %d\n", name, ret); dev_pm_domain_detach(dev, false); return ret; } From patchwork Fri Jul 12 14:08:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 13731863 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 ADA8FC2BD09 for ; Fri, 12 Jul 2024 14:25:58 +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 671871F7; Fri, 12 Jul 2024 16:25:46 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 671871F7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1720794356; bh=b+g0wkurwgHAuPLw7DhPBo/ti/dMGUAaoXVnZGKEE8I=; 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=HIh1hFnE6Ngmac9PTrk3BZX1rgho/C+oFZtdd73nglqOWZRb24BagQbNk8MQl//ER uiF7zTLQ6MMtd6EleUFNgWPmiU+wqV5RPYJOr08WrBOzKMHFQqpOmbq+G5bRd4vrFe HfVHBv3woX/Jl5EdoZIPwrNNP6A10SlzuPMGRcSk= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 30629F805B3; Fri, 12 Jul 2024 16:25:40 +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 DD60CF805C7; Fri, 12 Jul 2024 16:25:21 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 55BA7F80494; Fri, 12 Jul 2024 16:16:38 +0200 (CEST) Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 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 CDD0DF8019B for ; Fri, 12 Jul 2024 16:08:48 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CDD0DF8019B Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=BDHcw8kb Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id E3A02CE1A7E; Fri, 12 Jul 2024 14:08:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D1904C32782; Fri, 12 Jul 2024 14:08:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1720793318; bh=b+g0wkurwgHAuPLw7DhPBo/ti/dMGUAaoXVnZGKEE8I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BDHcw8kbCQHMIjLRnqnjXcU7HVZ0TKlGr5Bi7s5XAO8/IOO+lLNTfrv6X3MjU9pHg q3Zgj0sP590L1hPn6uo9KzHt9vE2ToiAiM/s4a+KlCF78+kx2kCw0+iM52A48JdEdI VcnJkmcCg20taxvNyzfdSwoXe0J37rN9My2cR5ENAIB3LFNL12zwQslIvEulpTf7I5 0BuC0NupQoW9Lt9SCqqlPiGPEOyqYn4qer7U1sZmcHKs/N9+gLENLfJTkY82mw0hz2 ATeNoA7WtgmOPnmhj75ijOEERE9e8X34vjy1/yaCpBJxa5bt9og8EPV6jdq7/1tCS0 bbCOaS55eu75Q== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1sSGww-000000006KF-244e; Fri, 12 Jul 2024 16:08:38 +0200 From: Johan Hovold To: Vinod Koul , Bard Liao Cc: Pierre-Louis Bossart , Sanyog Kale , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH v3 2/3] soundwire: bus: drop unused driver name field Date: Fri, 12 Jul 2024 16:08:00 +0200 Message-ID: <20240712140801.24267-3-johan+linaro@kernel.org> X-Mailer: git-send-email 2.44.2 In-Reply-To: <20240712140801.24267-1-johan+linaro@kernel.org> References: <20240712140801.24267-1-johan+linaro@kernel.org> MIME-Version: 1.0 Message-ID-Hash: GTUB6UDLYDHD3AT67WLYVG7CRAY2T2Q3 X-Message-ID-Hash: GTUB6UDLYDHD3AT67WLYVG7CRAY2T2Q3 X-MailFrom: johan+linaro@kernel.org X-Mailman-Rule-Hits: nonmember-moderation 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 X-Mailman-Version: 3.3.9 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: The soundwire driver name field is not currently used by any driver (and even appears to never have been used) so drop it. Signed-off-by: Johan Hovold Reviewed-by: Pierre-Louis Bossart --- drivers/soundwire/bus_type.c | 9 ++------- include/linux/soundwire/sdw.h | 2 -- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/soundwire/bus_type.c b/drivers/soundwire/bus_type.c index 85fa5970d98a..3979be0f8b65 100644 --- a/drivers/soundwire/bus_type.c +++ b/drivers/soundwire/bus_type.c @@ -198,16 +198,11 @@ static void sdw_drv_shutdown(struct device *dev) */ int __sdw_register_driver(struct sdw_driver *drv, struct module *owner) { - const char *name; - drv->driver.bus = &sdw_bus_type; if (!drv->probe) { - name = drv->name; - if (!name) - name = drv->driver.name; - - pr_err("driver %s didn't provide SDW probe routine\n", name); + pr_err("driver %s didn't provide SDW probe routine\n", + drv->driver.name); return -EINVAL; } diff --git a/include/linux/soundwire/sdw.h b/include/linux/soundwire/sdw.h index 13e96d8b7423..5e133dfec8f2 100644 --- a/include/linux/soundwire/sdw.h +++ b/include/linux/soundwire/sdw.h @@ -704,8 +704,6 @@ struct sdw_master_device { container_of(d, struct sdw_master_device, dev) struct sdw_driver { - const char *name; - int (*probe)(struct sdw_slave *sdw, const struct sdw_device_id *id); int (*remove)(struct sdw_slave *sdw); From patchwork Fri Jul 12 14:08:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 13731862 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 02CCCC3DA4B for ; Fri, 12 Jul 2024 14:25:24 +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 3B3CADF6; Fri, 12 Jul 2024 16:25:13 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3B3CADF6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1720794323; bh=d6yyoRJi3R7yLXIYWh6FukyOXX8Ng8iIFRGZyBMCrXo=; 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=bA5X/s82F47G46VrvkZLGget0nIasXqwjJdNCzoPph5XU254b2lEaUqb0W+JEJpn2 yJGJwEdYjueoVOeCSHChyMX/wxK4tvidplKiiRH7z2MJh8A13gVt1Bt2J04GP+SEiJ 8pqV9Y3c0C6zCbsZyoh2uQL4g8fOueuXX6153AEw= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8F911F8058C; Fri, 12 Jul 2024 16:24:51 +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 CA1B3F805B3; Fri, 12 Jul 2024 16:24:50 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 68844F80074; Fri, 12 Jul 2024 16:16:38 +0200 (CEST) Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 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 E112EF801F5 for ; Fri, 12 Jul 2024 16:08:46 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E112EF801F5 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=HnDTtrTV Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 408B7CE1AF0; Fri, 12 Jul 2024 14:08:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D7F70C4AF0C; Fri, 12 Jul 2024 14:08:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1720793318; bh=d6yyoRJi3R7yLXIYWh6FukyOXX8Ng8iIFRGZyBMCrXo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HnDTtrTVCPk95Zr6JsIUWD3Cm2jUSrQTDVV7VSJSR+G6Y0J8PExnHlOhBGExpz+TP acrxF8PmDPQ52yA50xcbEEKzYOtvaTtPuxPQM7d2f/4F19BoFpyUD4L8LWdNNJIYIH 0lIzNGb3PWHO8cVAm3isOou6Wo+1lvYkXgruQD/KWyM1u3Ei+aRLpix5yFv67564Ox 4913kyPvgObMRIriJfAML5rGzl+Vsjw5FJK7dLWi4olahVkKd6/rh8ZVRydVO3XbWz BOfg1yvGjaXlmfxlx7SOzSkhoZflX0kKXyIhkQ1tLBDfF9eGps/QPB0hTtK34JjXa+ BnnkmwjwvBJeA== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1sSGww-000000006KH-2R4B; Fri, 12 Jul 2024 16:08:38 +0200 From: Johan Hovold To: Vinod Koul , Bard Liao Cc: Pierre-Louis Bossart , Sanyog Kale , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH v3 3/3] soundwire: bus: clean up probe warnings Date: Fri, 12 Jul 2024 16:08:01 +0200 Message-ID: <20240712140801.24267-4-johan+linaro@kernel.org> X-Mailer: git-send-email 2.44.2 In-Reply-To: <20240712140801.24267-1-johan+linaro@kernel.org> References: <20240712140801.24267-1-johan+linaro@kernel.org> MIME-Version: 1.0 Message-ID-Hash: HEWTDHZT4OSZQJXLVUYEMSBITRA74A6P X-Message-ID-Hash: HEWTDHZT4OSZQJXLVUYEMSBITRA74A6P X-MailFrom: johan+linaro@kernel.org X-Mailman-Rule-Hits: nonmember-moderation 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 X-Mailman-Version: 3.3.9 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: Clean up the probe warning messages by using a common succinct and greppable format (e.g. without __func__ and with a space after ':'). Signed-off-by: Johan Hovold --- drivers/soundwire/bus_type.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soundwire/bus_type.c b/drivers/soundwire/bus_type.c index 3979be0f8b65..3930b245008d 100644 --- a/drivers/soundwire/bus_type.c +++ b/drivers/soundwire/bus_type.c @@ -123,7 +123,7 @@ static int sdw_drv_probe(struct device *dev) /* init the dynamic sysfs attributes we need */ ret = sdw_slave_sysfs_dpn_init(slave); if (ret < 0) - dev_warn(dev, "Slave sysfs init failed:%d\n", ret); + dev_warn(dev, "failed to initialise sysfs: %d\n", ret); /* * Check for valid clk_stop_timeout, use DisCo worst case value of @@ -147,7 +147,7 @@ static int sdw_drv_probe(struct device *dev) if (drv->ops && drv->ops->update_status) { ret = drv->ops->update_status(slave, slave->status); if (ret < 0) - dev_warn(dev, "%s: update_status failed with status %d\n", __func__, ret); + dev_warn(dev, "failed to update status at probe: %d\n", ret); } mutex_unlock(&slave->sdw_dev_lock);