Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp3575377rwr; Sun, 7 May 2023 15:16:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5yXlRmqDwplA+uT5CHi9W848VIv6FMtjXVE0ggG+TdPT5ieQ0VNOBRY06jmy34zfemhtKg X-Received: by 2002:a05:6a00:1311:b0:645:7c61:b99a with SMTP id j17-20020a056a00131100b006457c61b99amr3471151pfu.21.1683497777718; Sun, 07 May 2023 15:16:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683497777; cv=none; d=google.com; s=arc-20160816; b=fdu3HugHPuX8THvV6ic2vGGxPPVDHRJb/jwsjyd7IjfH9YEgqKtAcTYbwrp4JBwozg UDLQiRAazvSH8n7mRDduSDJlHhlnYtuS3bcMGz6DUmviXpEs0vTpUUDNz4dwdBV+ZiZL Q/S58/e0tT85oqjkbSNsiN8jMdDVstu5+v1cTnZ/bziw3+QDp29/A8CPvIDYXgBFlnwv tdqFd9wv88BVLZztSz6N4Cc7Jf72yF78MqbecObN4IrzlofLZtTnQ4bEwJxUn6DDnNuT oY3Q81dy5umKyUV7M5yGMGOTRdEjX8c0nXmMKUHyyeB0R1LszU9kn8o33NmJS2MVgqHm fR3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=xuCzk6DqyZ2fCjPccft51jSbkGYvG1zx5q2m3ZeEIiA=; b=h1Sf0TujcA3fuGZL0WjJCBFkAURfqYk6CinfAtQyzcFg55/HsQ//jEZ7LTg5fpCEP/ /1GyPSu0qp5G2aW6YShotP03il39GDfWpoEoWn8awjyjjRlFWvR4H4CI7//wWqOZSTJI evrtaKrc3JyPcv8qhsyvUWH7hLc0CCKM5HYMCqQlVAtaapGN+8RERG3q+V0ECY82niOJ cJTLBHpYim2pEBa7hXhKchTLetztNUvh3o7ZORFPXAZE1J+NEcze3zFXwsvKB6nK2F1y ots//TkKD9Ghs7iTX4fzaqI+FJpua5VOnHx4arat24Gsb68zxTus8nq5GTCkKe9c5Vlg +/EA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brun.one header.s=s1 header.b=EMpeMXao; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=brun.one Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k25-20020aa79739000000b0063d27d6eee5si7345697pfg.27.2023.05.07.15.16.03; Sun, 07 May 2023 15:16:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@brun.one header.s=s1 header.b=EMpeMXao; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=brun.one Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231833AbjEGVlC (ORCPT + 99 others); Sun, 7 May 2023 17:41:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229814AbjEGVlB (ORCPT ); Sun, 7 May 2023 17:41:01 -0400 Received: from mx.dolansoft.org (s2.dolansoft.org [212.51.146.245]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01C3E7EC8; Sun, 7 May 2023 14:40:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=brun.one; s=s1; h=MIME-Version:Message-Id:Date:Subject:Cc:To:From:In-Reply-To: References:From:To:Subject:Date:Message-ID:Reply-To; bh=xuCzk6DqyZ2fCjPccft51jSbkGYvG1zx5q2m3ZeEIiA=; b=EMpeMXaoM3PTi/AWcqlqN4Vo+1 GtwN/vl+G7Xo45snqlEQUsMovgZKPeNAJtrXwgKZqnya3SNbtvq61PkWDCJEthVoC6h0xJWXpvh/Z UyCWAS/GxSDxaBNLoKZ2ZU/xh5jvwbJJQqMzPNznAqucDdLNvlQglAFK1rekGp93vKS+8808PUoxw POvUq0936evFcMk+JzCQJurx7o8XHEt9PqKjQo6p0ks7S8bg1XKw5Nashdxq1Kn4+zPcxtp4eJgoH gj9kllXFbxcEiRqmD30K6kXtYYlrSx+inhW42RWx0wo4raAyvR8WkWXVliN5fgmnD7YXUF/B27b9o mZldzv0Q==; Received: from [212.51.153.89] (helo=blacklava.cluster.local) by mx.dolansoft.org with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1pvm7U-000fES-32; Sun, 07 May 2023 21:40:40 +0000 From: Lorenz Brun To: Felix Fietkau , John Crispin , Sean Wang , Mark Lee , Lorenzo Bianconi , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH] net: ethernet: mtk_eth_soc: log clock enable errors Date: Sun, 7 May 2023 23:40:35 +0200 Message-Id: <20230507214035.3266438-1-lorenz@brun.one> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: lorenz@dolansoft.org X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently errors in clk_prepare_enable are silently swallowed. Add a log stating which clock failed to be enabled and what the error code was. Signed-off-by: Lorenz Brun --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c index e14050e17862..ca66a573cfcb 100644 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c @@ -3445,8 +3445,10 @@ static int mtk_clk_enable(struct mtk_eth *eth) for (clk = 0; clk < MTK_CLK_MAX ; clk++) { ret = clk_prepare_enable(eth->clks[clk]); - if (ret) + if (ret) { + dev_err(eth->dev, "enabling clock %s failed with error %d\n", mtk_clks_source_name[clk], ret); goto err_disable_clks; + } } return 0; -- 2.39.2