From patchwork Wed Aug 28 08:41:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuesong Li X-Patchwork-Id: 13780898 X-Patchwork-Delegate: kuba@kernel.org Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2075.outbound.protection.outlook.com [40.107.117.75]) (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 2753A1C69C; Wed, 28 Aug 2024 08:41:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.117.75 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724834491; cv=fail; b=cuEEKzKvgM1V2XzdirLDvSywrZGj1Srs4CPp13kOKdyqj5GXmsFykloT5EmdaOCPArwIiBlid4JGdUk7fd+ffII/lfJgys3McJlHuwO27wwutdIkS041lPAvnL0ZChKTJsZ6w+BnFIGQWqvDVacifmFBpi6C5ahrRT51QkWzbmI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724834491; c=relaxed/simple; bh=giVGE6It9i3CEdoQ1yU76PFnEJzdYOtqSquWZAwp/Lw=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type:MIME-Version; b=kFH86Fe400epEoNWCsHad2nIHxcCZBz7nht5ZHgk7Gl30l9GdVUoUQgQf6/AHo2b+T+DbQl/qXaSgdkjDkjP+/16bAxgSlNaShlmcjid2b9zxSMC+zLVJgyvXZCaXipXpNHF2iSMq5CCfIt1BMIzYDjTNltbeDSPJd/PZvvTVEM= 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=SDEJBGjt; arc=fail smtp.client-ip=40.107.117.75 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="SDEJBGjt" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=EBGN1/Y4aeLCwNJ91+06Tao9dPcqwgBx4v0XamllvAJK3pvM6X/0n2mId0RWBP4exmz3kk1h0tf+UL4EfLYDzhNArEjbV47rrTfilC6QL6PAukbECt88KPQ7cK72KEtlc2Jiwn9ubyQtfQWoRX/sFCgegmWL4KCvHB0gtUy6BlmMaswgOlGgb/WRmCldxL91XcQCy/05/52TZEYlY9uEkCl30hiqQ6wsSJpbcmdNjBXPo5371FR+0xk8I0qlBteeT7jZ6MEf7yf8Beg1Hjyku8mhP65ZwgOjQBEAz+UjCe5NHwS2NZ4U8Vgo826znGdGqMmTjp27c+wly37X0eiMqg== 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=wby1px28gDpbyo5RkcU3q4Ibefk+NVUMgPF6ezZw5Sg=; b=G33VrEd3H8BeYQ2j040U7EiF/S4P/LRCV38ayWHL4PlNPyUSB8tzd74I6qS326g33PiXjKycPMG/7gXUI86iTHGdsuIqaJ8gZzE+qgu52JzQtvrFW82JTuulMpP88ISyoRuv8j9otsqXWOTTU8lggSIdFiQSGnOC16clfbp1uTBLrrPMOM942OitTJ7FngbDx30yWyNMlhIQBlEYqes6AIvAgcYB7HPMCfe107DmMclfaYMTohNOGGTh4LX3DQSOZe8pn8irNrxfQPTQkKISniYnw4CK2fvXF1XB+tURytjnExjy5ryu64hMAK/s0JnzqZtCc1/E1Oo8wt3W0Bxsew== 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=wby1px28gDpbyo5RkcU3q4Ibefk+NVUMgPF6ezZw5Sg=; b=SDEJBGjtcuMcNl36o0Jnj3e2m/hen4R7U6sQVhuKQjpdTHm8DCRuGY4UoKsf7mNqhL2w5AJaF3EsYBB6Qy1b+t1sXfxOD+sdP+Ve4IMYdlqla/J6utBMsAoBYQKg0kx/kLXcbZE+R1BSi5tkTIb9iQH/bU3msVcW2wyiOVtsKcg0g+CGPysicT82seNpVbbwlzhWapr5BMn3sP1c8AW65uffM+z2UYKgbuaV10E9FXH1Q3bfL0vUn011y4kVuh9XxIDyU/jlIPNlM0AU1d8tDdvdPELhXZ3TXMmspUNJmVVb4bX/Y8e+W9HzsPeuZu60Jr30kIkpa1nQFM144p0J2A== 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 SEZPR06MB5763.apcprd06.prod.outlook.com (2603:1096:101:ab::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.24; Wed, 28 Aug 2024 08:41:24 +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; Wed, 28 Aug 2024 08:41:24 +0000 From: Yuesong Li To: elder@kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, opensource.kernel@vivo.com, Yuesong Li Subject: [PATCH v1] net: ipa: make use of dev_err_cast_probe() Date: Wed, 28 Aug 2024 16:41:15 +0800 Message-Id: <20240828084115.967960-1-liyuesong@vivo.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: TYCPR01CA0023.jpnprd01.prod.outlook.com (2603:1096:405::35) 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_|SEZPR06MB5763:EE_ X-MS-Office365-Filtering-Correlation-Id: 511d2a35-ab0c-4a86-9b7a-08dcc73d32c0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|52116014|366016|38350700014; X-Microsoft-Antispam-Message-Info: H9t9RxJfRzHk1cBAxTJpbfAUBDLwTlDniiLUPndqxK0da36GN9TEI39Ms4Y2ctMFCkbKh5NorfpoxSiTtrqLnnABA5qSmUYlQs7Z3GO8rfb/6nIs2ZxzuGZ1LPdV9ulynceZuouaT9K8XY+xxeLyRQ1as1gb4mtT96r4Df/zpMs7bH0gqKnT5bkZkaHeyOLG8jH88LdlCiopFdkMmlApgC0TRMOvIGB7E20+46Sw/RR7bi91ZDlw0b5nSbx717xEbrGX3DRdHBgCgP8s4eZEUE8Pw6+NRPkNNk2AOC7qPyBNzx9GW5ALw0/2D1ukpDovF9IA56XHtoNZZFu3NqRZXpACOjWYbko20n/a78kDqmCLbEsYnb4zBEdpdPV7U9SgXZL9KT8b7kJbEqs+ZfM1hwRG90YwpC+S3QvC2+HnArCA0FE8C4osJz5OpSLcnIkoVj9ceckO1JkoCME4KtVeIxsQEotzAXIbTkpvKGnaY3FiXc8js+2RzxeX9YQB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bOd3TPZyIhrRCUnDfqVdXuRXArHKVEknfslLmA8XYBjYQhWqwDLkCLT1oORgxra38iPdSXapGy8X4m1J0T/1yJYU/9SYW5mXo7p3tU6lMC7p4qwSb17j4tGNk0wESga1bDCD0PTERsD6W/rQi5ysVcNe3lcX0dOkvCM6pdmGhoeNg2U+IV3dIJdn00REj2G7LuL30sN+Oaj4GZgjQFohRmiU/jd5biysqTNnJ0BJRBDPvGLoU9OwchHc1aMZ3jta1zthun4NmSIZqx7oesYmo9+msFOyZy+/yKTOT4ENpwHKH6Vq7QhQqfhgJTzMupyXLtWWtqmtOsMWE6DOoqJppRSUatHmqJgAacrpLYoWZoiCUdHMKjbdTOQMcjTiLTAYRz4VMYRFE1KnRFbmaKMRix1QcOmYJfMUPSGzLx4dPgLoEyzT06BMOCArMhTrmcsda0TRIbPNJWHKEf+2xASkp76xPa/ENYOezoT4lMFx1AelMiN5jmDUMGwiqtb056kq06b0DoKDuXi8Nx7usqoyapX2qZoqYcs5NKEfxivjZmFRxrgWdwVZaQnEkNCZdT9mTyK9A0PAG2rzBVsRauSiHCycnF X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 511d2a35-ab0c-4a86-9b7a-08dcc73d32c0 X-MS-Exchange-CrossTenant-AuthSource: TYZPR06MB5709.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Aug 2024 08:41:24.0195 (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: BjWoNkZxRDDHSHzLfc9X5aTBzcqvGVMRu4f1GADbHBO+/e47QQI1Rd7nkZesum8hsXY2xp7rx8A5oLsiVar03A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB5763 X-Patchwork-Delegate: kuba@kernel.org Using dev_err_cast_probe() to simplify the code. Signed-off-by: Yuesong Li Reviewed-by: Alex Elder --- drivers/net/ipa/ipa_power.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/ipa/ipa_power.c b/drivers/net/ipa/ipa_power.c index 65fd14da0f86..248bcc0b661e 100644 --- a/drivers/net/ipa/ipa_power.c +++ b/drivers/net/ipa/ipa_power.c @@ -243,9 +243,8 @@ ipa_power_init(struct device *dev, const struct ipa_power_data *data) 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); + return dev_err_cast_probe(dev, clk, + "error getting core clock\n"); } ret = clk_set_rate(clk, data->core_clock_rate);