From patchwork Thu Aug 29 03:07:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuesong Li X-Patchwork-Id: 13782410 X-Patchwork-Delegate: kuba@kernel.org Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2052.outbound.protection.outlook.com [40.107.215.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3831F18030; Thu, 29 Aug 2024 03:08:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.215.52 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724900939; cv=fail; b=ZkCuWhAsF9Q83bqybyUYBbZHtqQcqDwfvo8TZcDG+Fpze+3glEMVFQh7gTvWE08sM14WF2Lcw+D3FaPBmb4nvoQ0OBfn6D6mkSlQoDrnIAd18ruU6zt7t6FcnjblKct7uCHGL1TQe4od2w3BUmuK4rpvUboHrY7AHWi3d4cGAsU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724900939; c=relaxed/simple; bh=JF49wZ8dBUxQkoXszbw3+zT/9szycx3wHjh8pOb08pE=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type:MIME-Version; b=KUTKDDE5SmaHnytImX3F1yOkm5koddDwJyyxOayY+tjxrQrnK0yejAEA3LEPLGNrZ4RidMN4mGw+4URGbxSVO9Sj1MJsLfCg2WPEbdQfWwRPv+jaJ08/YyIfV7N7HpnTH8MUrIaapoFJ7jQxvPdOZHOnJOU00HkXSv9BTnKmn6g= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=vivo.com; spf=pass smtp.mailfrom=vivo.com; dkim=pass (2048-bit key) header.d=vivo.com header.i=@vivo.com header.b=d4oC/oMh; arc=fail smtp.client-ip=40.107.215.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=vivo.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=vivo.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=vivo.com header.i=@vivo.com header.b="d4oC/oMh" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=legrlMgXe9dNCUtfvhNJLam8tj+955MtkYJSAOnjPlxPMRHVcY6gbn0SbOI1N1hIGkXhy+NzFmrO0RAbhlUCHPa0yA5vbK03OM0dQozDTR2FkNzqFh2P/eX06IWrptO5WLDN0hUgAv1Z8rrX9DojGdQl8gCtF/XNgMmFAtaVBGI7ikVdc9mOIBH8BllVJ6M/5U7B1XYcmFpztCBAzC4bjm0dUMeGjnZcWd+k/q8JYPvaiMrD2TWMF8SyGQYUUOmH1e8Hh1ZezunO/fbXSbuywOVif88YF/mJEobRpNXHHTBpdcTw2lSrdsJk+Gp9rALeg3es2/03Y6U6yIvOj5K4CA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=IGg4Cm0Nx005NjxkppQTOlx3gN1PN+UZabH6kOweOps=; b=dRr/nffymX5m9fAfH8gsQGl8r1Xe4JNkFEM3cQoc/e2FUl2LaEp+Dc9JzrXP96wfRgxT2Tx4F/UPSEjx30BQ6VNqyM18hrP79ktcLa2G/4C74Z0ax435vvzIAyqckblp6c9mgCJ7CYTHo8Sc7kALcsLcI+QEW29lehj83MOPLE3yAOWDfEYrGYdm2vVCRwjLPDfsZemIkkDOTsbOdha6rMZppcPFPbzEZKLvntfYEPit33d4KOQhWB+K+Yi7c63Ym3HPRBt7oXli+yuuIJvb4Zq7QkkIs0ntk48V/XtQqcCxb34QstSYfSBAB8jKQCSh5karT4/VK3KFkPrTyX0DDA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IGg4Cm0Nx005NjxkppQTOlx3gN1PN+UZabH6kOweOps=; b=d4oC/oMhp6Ra7NrjjXb+ZCEBT2j3PxW5sPyWv9nVlVjoOMA465+MwhTjRoNOOFVIlURJ35SzOjdxnUgVVtyFICkt33xzAY1c53Gbmvz6MLcIQt7YSqAHOgeUTWOJqo0PEOBVZkFoBE+Vce2U9jnQAACd2m+u1oAxRXf2fktz/W2SbOHHD5kzB8g8XlrTLMlpAgpCOKQqswjaU9t4nbjYH6WJvjjpYBfpcX3hU7Fp0Xa5B06h/iFg2+S91llW2HmabcHqTllA4f5q/TmQTejY9s9OG+gzFb+uPQAOlGjsJyenclgW15bebHyZYChZlEOKioorTt/ULPFFLcL7BmG36A== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from TYZPR06MB5709.apcprd06.prod.outlook.com (2603:1096:400:283::14) by TY0PR06MB5836.apcprd06.prod.outlook.com (2603:1096:400:31f::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.26; Thu, 29 Aug 2024 03:08:54 +0000 Received: from TYZPR06MB5709.apcprd06.prod.outlook.com ([fe80::bc46:cc92:c2b6:cd1a]) by TYZPR06MB5709.apcprd06.prod.outlook.com ([fe80::bc46:cc92:c2b6:cd1a%4]) with mapi id 15.20.7897.027; Thu, 29 Aug 2024 03:08:54 +0000 From: Yuesong Li To: elder@kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, lihongbo22@huawei.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, opensource.kernel@vivo.com, Yuesong Li Subject: [PATCH net-next v2] net: ipa: make use of dev_err_cast_probe() Date: Thu, 29 Aug 2024 11:07:39 +0800 Message-Id: <20240829030739.1899011-1-liyuesong@vivo.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: TY2PR01CA0013.jpnprd01.prod.outlook.com (2603:1096:404:a::25) To TYZPR06MB5709.apcprd06.prod.outlook.com (2603:1096:400:283::14) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR06MB5709:EE_|TY0PR06MB5836:EE_ X-MS-Office365-Filtering-Correlation-Id: 2708e744-f6d9-4688-dcfd-08dcc7d7ea3f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: bAnrYBwMIq1KWIHKgKuitROpOQZagwT/e0Pm9+8dX+wRBMW9hIfoSmfzHkZweUKx6shkklKTD1h+fZkqaRXHSEcvPe+XSEu6JrBgxXse1/x0jBuS79TTJiQs90VPBgw4HUXORud9jWkar39zBVGG6Xvjp/wVn3DceXxjVjox+85T6+ysxq7uNj36ZsSZNgJXVOpUX0L8ISxoLnCLdTM9u15kLNJSgbFA0ms214sK5CuD4PHHNShvn1J3bz8fP5HNHEXTu6ImhY67U6FHPDRUeYYPEIBehnz9MUIA7mpKr+wK72DMELkzbgEYKK+qBurTcpA5EYxnCApYGl91h5kxXDqkW7coBuvD9Yq9ntZ4eHdknYR0ItnjFB4dUZMKfFswTNVXwq6KmEpGSl/peBQHzw99VUk6+fubvatYM1uSc02ADMLiKw9GnlMcGcFg1AcEQB4e8txJR4HvbWmfKZT2RpHpGPX6gYBgIXkJtf8inaq7cEe4AoHX/1iw/Nk8QrWcVzubx37DOfZdOfAQMSXZoFWwSYp3izj4AhnLdLPp7o3P/zYWA/Qe3tq3SZCl3osYcKsftWRfNwTSU34383kXc5mmJ4EBFo8DLY32vZU9Q7/jX1dK+98gh6QBJ8Vij25YpOLKZH4jx5Xg2hccSHVgntERdneRqOUboPkx6Q19Pe437MAHZDXWEp/devk1E7mYMI0jumMz0XmuTpLXuFDS3rZoqQRWehcguXkOZaQx+iu8XivsFO4M7KYdq6KxpIbLuUUZCPmHjP7wGtsw6AUKPvaNJaeE72i/2Vl14KuDVVt+gnXcVxQweyUgeb5o7s9iIDb9d1LEHXjZeT53IvKG1g3Pj+o5aD5o+3oPogJHT3kvg1P5AvblKKPp78W3o1a1V8imKRRUxhuvWO7kDPi08DBHja7/JPdl8p0PWRwWxhdK+lSkobRBj+lyZ4yc0YhOOZ0WWLdvylRc9Jxy1LmwZ1sI3y/Y6p/yhMzv5YG1s/JB+HS5oXOEqKRJQJRhrQtA7wdQCupD/MMP3H6M0Bp6FoAZslxDWF0YBf9QC8uaZ0sMd3JnPHc047r9czcdqfo4hfHEEzCmrBzVaNEFHOjYM8DNpxH5WePrmg3GDIIQxGTWctdAVu7jiYefsOrlvlbwSadJzzlKG7Bke4XJAS99/VKTqQg3Qkn06ko/kr2HfHyijUtDhi0L++TEefELLZGBVsVtnhZXYGmaos2QNKiZX1x6KuyP+SIxO4Lyk6Iy1Yf2SlWglXm3wmPcWHrCGg/I9F+ENU/smj4i5T4evsWw2KuODXP+tKexdo0IBTu9LtQ1XjCpOCYUwOHKFyHxEarQnPhTqzulDq9VUuPF5pbR6SOV6Xf/1WjQptKxyuX2khs= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYZPR06MB5709.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(376014)(52116014)(38350700014);DIR:OU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0zNhdQgHinxk7DBYBwWAzKDA57gaxti2w0RudV28ZAO6C2xkLJe2aPEgv2Yz172UTXclQKG9jKT5A1W5D0Ns+cBR+PaaehotTSYj2VMUYDdO8BUjnDOnORlchhAyyA04/iNuwYVNRbP36TBO2SdVmtVMbVKO4GV8OoFwYLVJ09tKS+qq28TAqMDg8NcBApsJGG9mHUV+dIO/PdUViF5sbTr7nBGBhKoMS1Y6NdqHDtCZjx3s7GTGWD8itOh16MX9haFnsKz0WmGzskZFF94BsAAgWIE/+6swLStbHGKYhGBQyJ38GVhV+nfCWEemIRBorJFjqByrJGGcWfL4ovvONkrOoEZrswiB20pjb9Iwe7+RL52u1yQHIxqAdZBZNbrE+v+QCjcjpbP3yMwx/z8KHW/w1bW9QcLJ+rKf5WN9CQ/mb+yscKlj3EJ44SqvrAjSMQARB4jGLWTIBvoVVomqI5pupBtwpr2rG9T5F2h6mENRHpHPuZP63HHwLUrGEoUa7iN7tFZRL6IgbzGe0f0mptLr4m/iemmN41rGqPBGbjLKttyPm2VuDatTZKccEUdAar14F2Oyqg6zAcDmmJGYmqu X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2708e744-f6d9-4688-dcfd-08dcc7d7ea3f X-MS-Exchange-CrossTenant-AuthSource: TYZPR06MB5709.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2024 03:08:54.3522 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: CaoJffzNIwRGuiKVUX9OZbPNVBA9wHcAKWeYY0CIUpJSKWw2ChdaC4PvI7CEr9e/sbZdQ5lfAU+eMZB7BgLPrw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR06MB5836 X-Patchwork-Delegate: kuba@kernel.org Using dev_err_cast_probe() to simplify the code. Signed-off-by: Yuesong Li Signed-off-by: Hongbo Li Reviewed-by: Simon Horman --- v2: https://lore.kernel.org/all/20240828160728.GR1368797@kernel.org/ - fix patch name - drop the {} and fix the alignment --- drivers/net/ipa/ipa_power.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/net/ipa/ipa_power.c b/drivers/net/ipa/ipa_power.c index 65fd14da0f86..3c239c3545e5 100644 --- a/drivers/net/ipa/ipa_power.c +++ b/drivers/net/ipa/ipa_power.c @@ -242,11 +242,9 @@ ipa_power_init(struct device *dev, const struct ipa_power_data *data) int ret; clk = clk_get(dev, "core"); - if (IS_ERR(clk)) { - dev_err_probe(dev, PTR_ERR(clk), "error getting core clock\n"); - - return ERR_CAST(clk); - } + if (IS_ERR(clk)) + return dev_err_cast_probe(dev, clk, + "error getting core clock\n"); ret = clk_set_rate(clk, data->core_clock_rate); if (ret) {