Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp1396417iof; Tue, 7 Jun 2022 04:58:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWrPcuLQeBzh/gPPlggC0p/Mspx7rpvob9fQFXbZAQrV/Ks2GdY/XCg6C3Y2DsuWl/4JZO X-Received: by 2002:a63:1b53:0:b0:3fd:168e:d9a with SMTP id b19-20020a631b53000000b003fd168e0d9amr20641650pgm.617.1654603134352; Tue, 07 Jun 2022 04:58:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654603134; cv=none; d=google.com; s=arc-20160816; b=WBmRjFX/Igs6R81ePU+zM+h8XMHcGyR32+H5ejrGdsaMASmN2/Zy/15cU+NaX0W+79 2VGspuKx4UCpeD2ajIXr/TuxFhj5VwVl7BiS4NzlC8jTKK2XFe3nfQzSGudVMSA+BGp+ tf/Jt1WlOUpJIYAlq0fuychufccMj3RSAaAkSYaSIiFId0ieLaKi6h8ljdti3Me2R+9N f+s+kCFdIxHXkaYrlXl938iYCB6cQC0v3i3FDQl0etxPZo9HuCbjT3XloOvSA1URAl3t Unf2vNH7puko6NxXtzJbzdyVU4y3oxdlUaVVizcg8in7v5NXT0REBAZZQDCaWvTtQSJN iIGg== 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=ROcvkEMpnw8EiX5NlM13DPOjI9GSm01mF3dpdGo84luTIrkdWXZm7flfCNv85NXjK4 iKWUcQHqYh2BbJimDnB1tRQIEPzoHEk2UoVxLYX0UG015mgbIspbwrpm2Tno02Wgc7yZ PI0CJr7UE18x5W/iKe3SWPgQZM7l26Ql+CzEFq/DXbMP8cNUF5unS0+ENzgP/bwQVNyK 3cCeUlv+9jaBxZj8S6agZHAW+ExXu5qF3H9Qcm1FiAkQ9KiogpGjQoj9TyyFLs9u+DrT ZSFSnfaq3NpnUnO2ane+I0ooS7dHxAfYM2R0M3ks3BsAUDr1m+gitxemSTIVbBZ8H7yR svNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b="X1/fjuqL"; 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 t28-20020a62d15c000000b0051964d16f32si22897529pfl.180.2022.06.07.04.58.40; Tue, 07 Jun 2022 04:58:54 -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="X1/fjuqL"; 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 S233689AbiFFUW6 (ORCPT + 99 others); Mon, 6 Jun 2022 16:22:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233572AbiFFUWd (ORCPT ); Mon, 6 Jun 2022 16:22:33 -0400 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2DF19FE5 for ; Mon, 6 Jun 2022 13:22:31 -0700 (PDT) Received: by mail-ej1-x629.google.com with SMTP id y19so31131765ejq.6 for ; Mon, 06 Jun 2022 13:22:31 -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=X1/fjuqL6gfslDXWoRX9h2iUMDP2o8h40GZNbgq4k2cPA/WIpPN/LIgiyPkBen6+T+ ik/ftNMZIdrs+WRaYig6cWAECSG9pNA0q6S54xIM+PMpKpS+7Oe7HLk4Y9JHTB8KpdT6 TS/RlSX6kawniKhAbMEivgVRmpyGX+Npd9HUc= 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=yojfqL5GmmVO0itmnXBjcvsmJN+Bz8nAH/sh40d5HHPkwPnADNx52BDfhjxJ4rvl+P n9NdxdouzPo5LQvHsseu4gq8wEogkcEt80yE1xR8jpJELLRasnmDwqPecfqGf0CzCN7j 6qhpt/2UVFLHfPW0QAyG702CSnWjWh915y6xsjH+4lWr4WRL7HnfN38abg0T1sKdDH1a leUCSLh108jNyl5H+/3YtM1JRmZiNjXczOivzex8YRsoQCGLkQnEM/G81wXnW9IfftiV hcI8rKaU7ZjEz/LT7Vjt9mCzvbpuayNMCP2/cNN9dPeWVBj0igBtyVFwvIP35oQ6cv2c tcYw== X-Gm-Message-State: AOAM533vRyDn5EhJthEIqHUDpEUX2lcLio05Xtz4XoaEcaOO6bGeSwTl iDa8uPCIng5y4N79CImwhbI7HmvgVjMOPw== X-Received: by 2002:a17:906:37c6:b0:70c:f9f:f0c5 with SMTP id o6-20020a17090637c600b0070c0f9ff0c5mr19313158ejc.743.1654546950375; Mon, 06 Jun 2022 13:22:30 -0700 (PDT) Received: from prevas-ravi.tritech.se ([80.208.64.233]) by smtp.gmail.com with ESMTPSA id d20-20020aa7ce14000000b0042dd4ccccf5sm9043789edv.82.2022.06.06.13.22.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 13:22:30 -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" , Dan Murphy , Rasmus Villemoes , linux-kernel@vger.kernel.org Subject: [PATCH net-next 2/3] linux/phy.h: add phydev_err_probe() wrapper for dev_err_probe() Date: Mon, 6 Jun 2022 22:22:19 +0200 Message-Id: <20220606202220.1670714-3-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220606202220.1670714-1-linux@rasmusvillemoes.dk> References: <20220606202220.1670714-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