From patchwork Tue Sep 13 21:22:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikhail Rudenko X-Patchwork-Id: 12975395 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 77CF6ECAAD8 for ; Tue, 13 Sep 2022 21:24:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6zSVEBtqOYEdfSBQrFmnSMAv7rTFPeiCJTiwQ3unDkI=; b=UC/RKpbT6tvEoV PF0YNrDB+0x8GNx6aVY4rAgMZBOPjVF7jKPo9sJH9SPI6x4cDX4hSQ4H3YdIVvSvIhHpL3yd5DihO niQOThzXaNmnsoCW9N7muY2R5q96OWl5Pu5Fl72f+iEhHZeZ24pnwu5lAPoHCCDLJNbV8dkGVYK5p 0PriPAPBRnU9XVojw9NmS6KByzF3YECwSkIYHptPxTUwVF5jQ3AgnGYvW8sZt6W6LXnTURabKpvJy S6r3MGzpaVHVi0uvhnyhayztkVGdakSJRH1BCrLrmPhlkECaRbtoMUfzDWGAo8lNr6EsfWGeadjam 7GZL2Kjkjw0bYG0pxJoQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oYDNF-00H4ub-Ci; Tue, 13 Sep 2022 21:23:18 +0000 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oYDN4-00H4jJ-RE for linux-arm-kernel@lists.infradead.org; Tue, 13 Sep 2022 21:23:08 +0000 Received: by mail-lf1-x130.google.com with SMTP id f9so21393190lfr.3 for ; Tue, 13 Sep 2022 14:23:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=IcnIgmMTd0DbyquQgMbmNfx9FsBF4BI9rV5mzK+kC9s=; b=Qik0HCAE4mWGdPhhl3Z4XxHZp2Fsh0qBqor3gfQ7RHj1oA6dc1TrGetu03nykh1gIs w+ofH7Fq69SEMBdJ6Ch4oIylIIktjNbYHlz/yjxBxzoJ4pRA+e6nMmQ4GUXJUYgi7fdO ZUY3CacnUYhm1obecq1Z183lWv5T5Jw0YJnsIXaiSMe7zocNkqyvQzKrIM4M7d88m2HQ IfJM1vEV597EU42uX81zY0iOXdGc5+/VGJG/4bp5uVAFNB1s5HEJw0Q0DB/s4FOosgez t5RMwiGNUr3quyrVSVMEYmfX6VB1rt+KlxCbBwURFi/6i0gclZ8xRNSu6UiGPjteEK2U 6pPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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; bh=IcnIgmMTd0DbyquQgMbmNfx9FsBF4BI9rV5mzK+kC9s=; b=MDqXAjCBUd7B096agbePRXxp64Bqj+gMZ7tFa8UqikLJqkow6PeNX0KS+hB9zJhVXp tChr70pZLT6YLihJnWsOndRNeIZI0biojbv4F0E4L1AUJ4a7UCG9u06aAIUZ9tVSdyIk O9rxvi4x55nTTQ87gRME69jZ52dX07daI3gnYZY5XtWGg0NGnIyhwBbEcbc2JFQ7kUgL ryFq2FeM/RqceC/G5Ea+eXOAOsEGSXxGrnSupJ8/Q6zpRmIqf6f5C/RM58OI9Fhttlxo 96Rlb9PC90as25ezAnLlRyo65HfFe4BgfzEexS/y7Z/2MmJBxz5dGij7VfHq2DTjEZoF kykA== X-Gm-Message-State: ACgBeo1ReYBKhU41UZDhF6OHAnoagJDcPxHLLAPoEaITzIWyz49Zip1K fJpBSevot5T9QTroJY7SnTM= X-Google-Smtp-Source: AA6agR7lqpwxdnlrp1g555khCJ+9y1Mn78ZuFzcawcY9GJzf7Jw2t+odgShu0RDTZclAju9cgeR/kw== X-Received: by 2002:a19:e00d:0:b0:492:e5a5:588b with SMTP id x13-20020a19e00d000000b00492e5a5588bmr10452415lfg.243.1663104182075; Tue, 13 Sep 2022 14:23:02 -0700 (PDT) Received: from localhost (95-31-185-216.broadband.corbina.ru. [95.31.185.216]) by smtp.gmail.com with ESMTPSA id s28-20020a195e1c000000b004979da67114sm1964736lfb.255.2022.09.13.14.22.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Sep 2022 14:23:01 -0700 (PDT) From: Mikhail Rudenko To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Charles Keepax , Li Chen , Kuninori Morimoto Cc: Mikhail Rudenko , alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] ASoC: sunxi: sun4i-codec: silence misleading error in probe Date: Wed, 14 Sep 2022 00:22:54 +0300 Message-Id: <20220913212256.151799-1-mike.rudenko@gmail.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220913_142306_933948_D7C30AFC X-CRM114-Status: GOOD ( 15.45 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org In the case when a codec device is probed before codec analog controls, snd_soc_register_card() returns -EPROBE_DEFER, resulting in a misleading error message sun4i-codec 1c22c00.codec: Failed to register our card even if the device is probed successfully later. Use dev_err_probe() to demote the above error to a debug message. Acked-by: Jernej Skrabec Signed-off-by: Mikhail Rudenko --- changes in v2: - rebase against current tree - add Jernej's Acked-by sound/soc/sunxi/sun4i-codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.37.3 diff --git a/sound/soc/sunxi/sun4i-codec.c b/sound/soc/sunxi/sun4i-codec.c index 830beb38bf15..3a7075d03c23 100644 --- a/sound/soc/sunxi/sun4i-codec.c +++ b/sound/soc/sunxi/sun4i-codec.c @@ -1804,7 +1804,7 @@ static int sun4i_codec_probe(struct platform_device *pdev) ret = snd_soc_register_card(card); if (ret) { - dev_err(&pdev->dev, "Failed to register our card\n"); + dev_err_probe(&pdev->dev, ret, "Failed to register our card\n"); goto err_assert_reset; }