Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp5528882rwr; Tue, 9 May 2023 02:49:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5sOi7FpvUgJ13dfXkfHkRrxwla/uIejZWxswL8U4Hp+mtqEFjrcbmQheWLnWThrMNNl35O X-Received: by 2002:a05:6a20:7d84:b0:100:d88c:4a23 with SMTP id v4-20020a056a207d8400b00100d88c4a23mr5767547pzj.52.1683625791068; Tue, 09 May 2023 02:49:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683625791; cv=none; d=google.com; s=arc-20160816; b=w6HK0YWgWMr1vm3YtBSySqTfsFkbUxD0X3GDjzk82vDQqUZgXZ41UJ1o7aI92xq9pe l8gm0IbxJ+At5XBlEUlQ4bE24QyvUsn/4dR4mW0kUE116Q0lNkifUVNzjNZDTEHTMAO4 HxpkjUJLtZDOUKMOF53jDM89zwlxafbWwPkJ+l+g8aYKiabBMsAIjx8JXF472M3T2l88 tu79m6koIChL3U1enVZSKQdvCjVGl3/oZ2Vs+8rrqpFqsPvN2NivYoU8uQx94IxMy+Un zI+y3QuF5wCGklaVon1c7+q7msXuAJMS9FKUltUO31yDklMLJzEVY0PyGfTDwZpTZPEN IKuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=WWUbYFjjx+ICPyEkXBm8kY/O+ZEJSV1Cd7/THSNoG6A=; b=uF5s1/SFmuUtFyuLpMKSpnWgu9hrYl3xyb4NDplQwjgMaRV1igfV/IGUISVCNLxzak gABOBPj/cq6nEAsWXEzSg4+Q6u0KGBS/fLdY7mBLK7MAinAIMKTcsuYwgclEzVGCXPHW a/+VJ4E9MZ+7cBU3rDE/V/uu4jIxIxtBi4vRTgULP8SmsPEfOnozLRWjdRIkN6TROEKu Eqo2REQpPZGp89XewgHtiubpqElq41WTMZ0PvkNdyIY9scESQX+xpfnFQ7ECssbQJPCs QewIanm1ALv/ZtOpdqGSgn4Y8AT5d4q7+cuUL+9jFEtgwA7qRsXN9+ceBNlavnKE8qm+ 7pNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OzzOzD9R; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l69-20020a633e48000000b0053045acfebbsi341688pga.48.2023.05.09.02.49.36; Tue, 09 May 2023 02:49:51 -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=@redhat.com header.s=mimecast20190719 header.b=OzzOzD9R; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234503AbjEIJbI (ORCPT + 99 others); Tue, 9 May 2023 05:31:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234427AbjEIJbG (ORCPT ); Tue, 9 May 2023 05:31:06 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D7AFDDB7 for ; Tue, 9 May 2023 02:30:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1683624621; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WWUbYFjjx+ICPyEkXBm8kY/O+ZEJSV1Cd7/THSNoG6A=; b=OzzOzD9R/nsWp7BgfqcXoRKZjk2cWbldBVlEeoiYjhfQRKsEMfqoIBKc4XX/fVFzBvlZ1i Jd/3uTc3ncNtt/Kj8HD2jWmeudXg5tJnAYJ0zqrRMDfuN/AD2wI6py84eEHBlp9V+dvuj7 K++FLOq8jcxrYN9L+cneZFPSY295Fd8= Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-595-YpeMDPkCPcKJXewb5db98w-1; Tue, 09 May 2023 05:30:20 -0400 X-MC-Unique: YpeMDPkCPcKJXewb5db98w-1 Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-7579edafe0eso264685a.1 for ; Tue, 09 May 2023 02:30:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683624620; x=1686216620; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=WWUbYFjjx+ICPyEkXBm8kY/O+ZEJSV1Cd7/THSNoG6A=; b=Lv08FIzhZVrY7gp6MdAVJe+K4ZaTvqYKxWBNYMzzY7DE/6uB4Z/YcZNHS77++nyAzu fQlx8Q7grslFsOXfjq/1pPa5bMhcEhLwVwigX/jx/MgKAIM8T5I4+A1GvSlDcAnnyM0a cZS+EAfb02hxx8bzDjyJRYnj3VlFefaGslJbqichlrk5UK/o2GuTLibIxhhiDp+f78Fg V1D5H3AmMV6/H+rJ8nqDy5A8BcGfs4tBDMBDxh6ZxKMUFJVeTAUrpHz7mBU53jakWmDK zMrrafZWE6hwOhsy/nGNi8vKEoVxdZv/+Hx2QUpY+TIURN5vVIUC3bWMlyfvZ7hzQ5Kj X8PQ== X-Gm-Message-State: AC+VfDzSBs6Fpp4Kqper0BBO4FEymVqVLGcFJm9l8wnDbx5yoEHdVCq4 tDPLAB9CA8nOLP21NUkYTYqHEnfVZuTLxWitl2qDGTCh0xUB2Y3CsGHllwjSEu9D+zOKnK/2MST QVEiCzfpC03KE5NigdaftxcG0 X-Received: by 2002:a05:622a:1896:b0:3ef:4839:2632 with SMTP id v22-20020a05622a189600b003ef48392632mr19423889qtc.0.1683624619829; Tue, 09 May 2023 02:30:19 -0700 (PDT) X-Received: by 2002:a05:622a:1896:b0:3ef:4839:2632 with SMTP id v22-20020a05622a189600b003ef48392632mr19423868qtc.0.1683624619516; Tue, 09 May 2023 02:30:19 -0700 (PDT) Received: from gerbillo.redhat.com (146-241-255-65.dyn.eolo.it. [146.241.255.65]) by smtp.gmail.com with ESMTPSA id c18-20020a05620a11b200b0074fafbea974sm3159641qkk.2.2023.05.09.02.30.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 May 2023 02:30:19 -0700 (PDT) Message-ID: Subject: Re: [PATCH] net: ethernet: mtk_eth_soc: log clock enable errors From: Paolo Abeni To: Lorenz Brun , Felix Fietkau , John Crispin , Sean Wang , Mark Lee , Lorenzo Bianconi , "David S. Miller" , Eric Dumazet , Jakub Kicinski , 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 Date: Tue, 09 May 2023 11:30:15 +0200 In-Reply-To: <20230507214035.3266438-1-lorenz@brun.one> References: <20230507214035.3266438-1-lorenz@brun.one> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 (3.46.4-1.fc37) MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 On Sun, 2023-05-07 at 23:40 +0200, Lorenz Brun wrote: > 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. >=20 > Signed-off-by: Lorenz Brun > --- > drivers/net/ethernet/mediatek/mtk_eth_soc.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/et= hernet/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) > =20 > for (clk =3D 0; clk < MTK_CLK_MAX ; clk++) { > ret =3D clk_prepare_enable(eth->clks[clk]); > - if (ret) > + if (ret) { > + dev_err(eth->dev, "enabling clock %s failed with error %d\n", mtk_clk= s_source_name[clk], ret); I'm sorry for nit-picking, but this lines really exceed any reasonable max len. Please reformat the above as: dev_err(eth->dev, "enabling clock %s failed with error %d\n", mtk_clks_source_name[clk], ret); Thanks! Paolo