Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1255165iog; Tue, 14 Jun 2022 02:25:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/o1C3M4t3SqRYCwR+D6uOBy5OUiOj5J/3zYv9vei7/XRjMARWLi16AOwuF+3h3e/Xc56B X-Received: by 2002:a63:f312:0:b0:3fd:12b7:193b with SMTP id l18-20020a63f312000000b003fd12b7193bmr3594995pgh.9.1655198700743; Tue, 14 Jun 2022 02:25:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655198700; cv=none; d=google.com; s=arc-20160816; b=fSgW2AEjKJ65I/ya2X/pch5aern950sArKFB8fkwgE6ewlmfhZO4wlFLBAulInebdT Q+36u3kWDWuR43Er4dYJ2NQPdjI4J2l3SjSlsCJpSAYOP74NAftlvztbY1nbRcEdLbqw xmznmz5+tZksjy0Vclx5ZyjLI/dfjjiNaD1X3WECi3rhHsZ603ZE0O+MyO5K+q4Yx1iU Jt7EvZ87Q8wAd3SSooyMg77ZUqvJSt8nSdWGQnYlwAdpbKmWB/3Js2XKFnG0IB3xWfBM Qt+bphTrkDVQV7D5cVF5sLiY3XhX63wc5o9PulRuyQYE/4jP38azU5yxZlx2VKkOZtds EK1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=cmCUkZyYqf+fSr+qmDna92LF/wD5Dj/Ah1fbqp/t9Fc=; b=rh2baOC2ketYYUYg++uml9CemtztVZjK0rUzIPTeQqaZnl0j5mOVqU4h0Bt6gzXBIi gtNMkFHe1iIH/kq2H/a/NyjLjoXv4MbrZ6C700ZR+bo5yKSN3e8PY1mGjH5dxdbT+c0i BVbJCkXUGQaBa3X0SoZgqTmLqQjIYCmJMNcZuZqdKO1X464WzHHfHGlLlbugB8RDYwe5 kf2FzJDDqIhpWGmFJxgO9uQawwYMg1iK4f6qPvw9l1UaETOSQ1vsYrnz9s2c7pUBPE5H 6KZuLHsNBAconxLtwXnfGpiYULT9zNYRbjJR3JVP/Q1wMG+GRMblMD9hlpzPw2xFtVio Pp6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=Lhk2HAru; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n13-20020a17090ac68d00b001c73b8066e0si10113313pjt.74.2022.06.14.02.24.46; Tue, 14 Jun 2022 02:25:00 -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=@rasmusvillemoes.dk header.s=google header.b=Lhk2HAru; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241371AbiFNIqp (ORCPT + 99 others); Tue, 14 Jun 2022 04:46:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355842AbiFNIqZ (ORCPT ); Tue, 14 Jun 2022 04:46:25 -0400 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF1CD434AB for ; Tue, 14 Jun 2022 01:46:20 -0700 (PDT) Received: by mail-lf1-x12d.google.com with SMTP id w20so12760970lfa.11 for ; Tue, 14 Jun 2022 01:46:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cmCUkZyYqf+fSr+qmDna92LF/wD5Dj/Ah1fbqp/t9Fc=; b=Lhk2HAruK6blf2W2bSttgu1d3q5FpOqeHtDxEokN5BstejeSqf7oKTZJqKzbbEhyce YMleKqWyPKI0c2R9KA2xZc6Br0LmeyolK1HHT2x2roKGKKLBx1R0Idq/Eq+60YZ6uPSM v+/ciSTtW7Tyb18KJq3p0Mx3YpseXHWSDPyxo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cmCUkZyYqf+fSr+qmDna92LF/wD5Dj/Ah1fbqp/t9Fc=; b=5ZMcn6SIAjDEQF1xN6MF3ozlyGP3eqSwujhDhDYd628hesAH3mhHibTlc2mVK+pPeV l92gFlUMQae1BYO07lyxilucrqLzyghKs1OSX1opXqvzBCZULeHGhh164GKHMGbPL1Mu 1ZGny2i23hc4/eRcdBdKSOf3i2oikfVGQzoKpI2jRB8J9eiNcmrk4s8d7emz4DiLHFXK KyxF92EI5bhCdrmr+uD0Z3spO6+Up1Bpti5dXyzhNYYL2KKu7NeHv0XECvLIyLhFMWsN OeOiCG1HvmJCLsiQHTPg0n1oDNB3qLkzvy/gLAx9Mo/FzWSQQeDapy1b5JUTk7AR4gLQ 0IyQ== X-Gm-Message-State: AOAM5323McCdDa2GhoTynRu+QL7oeTHpJBMZAwnXrUB7zNCt/0prEGcm xaoEPPA6mZBxYVa58fSRHfXReQ== X-Received: by 2002:a05:6512:31c5:b0:479:47a1:2024 with SMTP id j5-20020a05651231c500b0047947a12024mr2407749lfe.420.1655196378944; Tue, 14 Jun 2022 01:46:18 -0700 (PDT) Received: from prevas-ravi.prevas.se ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id g1-20020ac24d81000000b0047255d2118fsm1306116lfe.190.2022.06.14.01.46.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jun 2022 01:46:18 -0700 (PDT) From: Rasmus Villemoes To: netdev@vger.kernel.org, Andrew Lunn , Heiner Kallweit , Russell King Cc: devicetree@vger.kernel.org, Rob Herring , Jakub Kicinski , "David S. Miller" , Grygorii Strashko , Praneeth Bajjuri , linux-kernel@vger.kernel.org, Rasmus Villemoes Subject: [PATCH net-next v2 2/3] linux/phy.h: add phydev_err_probe() wrapper for dev_err_probe() Date: Tue, 14 Jun 2022 10:46:11 +0200 Message-Id: <20220614084612.325229-3-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220614084612.325229-1-linux@rasmusvillemoes.dk> References: <20220606202220.1670714-1-linux@rasmusvillemoes.dk> <20220614084612.325229-1-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,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 The dev_err_probe() function is quite useful to avoid boilerplate related to -EPROBE_DEFER handling. Add a phydev_err_probe() helper to simplify making use of that from phy drivers which otherwise use the phydev_* helpers. Signed-off-by: Rasmus Villemoes --- include/linux/phy.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/phy.h b/include/linux/phy.h index 508f1149665b..bed9a347481b 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -1539,6 +1539,9 @@ static inline void phy_device_reset(struct phy_device *phydev, int value) #define phydev_err(_phydev, format, args...) \ dev_err(&_phydev->mdio.dev, format, ##args) +#define phydev_err_probe(_phydev, err, format, args...) \ + dev_err_probe(&_phydev->mdio.dev, err, format, ##args) + #define phydev_info(_phydev, format, args...) \ dev_info(&_phydev->mdio.dev, format, ##args) -- 2.31.1