From patchwork Fri Feb 2 16:36:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 13543160 X-Patchwork-Delegate: kuba@kernel.org Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2079.outbound.protection.outlook.com [40.107.22.79]) (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 DAC4A1487D2 for ; Fri, 2 Feb 2024 16:38:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.79 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706891939; cv=fail; b=GPy0K+23+O8vqWi/nuctUz+4lyar7gHVA0WEtLKp5xgwLsmBZ6P3zuJt8WhTl91z+/0ItKip0U6rEGAsNb2cSOXUjIk/JJc5iSyLwBQS1wkl1NQRm2Tt7pg5IKY/CJUpTkYATJESWpJvCi5RE0ZCtXR+a8g2QAA22wEsdjixilQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706891939; c=relaxed/simple; bh=+LmrV9F43P33v2xP3Hj8OTB8AkLAXVj5XYA05ONuFNo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=Wq4UeLL9sTJZXBnFDmoX+TkD23VuUdIwGfJQ0pzRVWVMA8vIR8l0n6KVHI3wuyQIl9zbIhaB78JzRroP3yIOvAyQy6vkHwW51ZUGAfKfOf7VXwwYewDyooRJu7moKcPHp2PRZt4k70Wlco/a4Xr/42fAYbLII4LasQPOq0nZJGI= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=JmqtD+jD; arc=fail smtp.client-ip=40.107.22.79 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="JmqtD+jD" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c0WKdtmVKF3Hh1X/lethxPLpK9fok5mFsxQjiiFpj+5Px4dkN8qhzdRP2Kp4go7HPBlDdnA94AUmWQ+AOmgQmf0mrNTuqYkKrs9nk/y9rts+7PJPJto2JcNVrsWCr2zPWjESndXC2asBvMNFQjTzGgkeburS9T5Wc2XrfLjTTZw3FLqD4VBk9HNQHkiKCh4ieF4cD/ik7lSPGU8OzJBfBIU5+QK/pRfzSSDqFN47CGrr0DowT5ymqsvwQ90RHGPUM0yznpUcXOPNfjZ86Za+8HIs+Ez+ng/1ep9AqNWgIcycQQyNIM+Uw6IEdXHbAYKZrXGgKtmGVlpYyOac4sNMiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=QaQwmwJYiwpIEf3JkN3YWg2Hazw1wKYZJjttZpyqsAw=; b=ftjmtN6Zngh0nIyKnzFSqrX7iMUSSP44LfSiYOwwrGukiOwe7+zMCeuKvnpSCGUc0x3oFmyGURHvqMG8KjrJ5j11h/fdxV0+w3+PQDvn6aY0Qb1QLQW3qI1DQX24ukrhoYbVVfFt5KLJlzopJMsEfEgZQqjIIfOjoLwJNd37P2DeijWy1y/XWEgoOiwit1aYAMGdrkw+2zfeX6gO4dClcoihEj8uFqupsS9aEcdX3u0IfTs/6hfiMVmRvgEOa1VqpmTevSBPGt7GXV86OTSJG34DwaTkI0173yZyIhenTHjLrDysdS5Fg6LfXapZOw0t5e2zuZ/8qKCb53CochRETQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QaQwmwJYiwpIEf3JkN3YWg2Hazw1wKYZJjttZpyqsAw=; b=JmqtD+jDqE6vs7mr2MWR5TCqF2N7o9JMY7cZxjK7Sp8isqeqcBvtok7ptxp/haMxqO83I7ck64XfXQPBcJO/9YMYjjQIAPWDbGSgA6X8IVQiHnBi2ruRTn4rwjCcYBcHptm2im2rjA5ExERE2WDejqzl3euwXhmqK3XlL6AekLA= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB7374.eurprd04.prod.outlook.com (2603:10a6:800:1ac::11) by GVXPR04MB9974.eurprd04.prod.outlook.com (2603:10a6:150:11a::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.23; Fri, 2 Feb 2024 16:38:46 +0000 Received: from VE1PR04MB7374.eurprd04.prod.outlook.com ([fe80::62cb:e6bf:a1ad:ba34]) by VE1PR04MB7374.eurprd04.prod.outlook.com ([fe80::62cb:e6bf:a1ad:ba34%7]) with mapi id 15.20.7249.027; Fri, 2 Feb 2024 16:38:46 +0000 From: Vladimir Oltean To: netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrew Lunn , Florian Fainelli , =?utf-8?q?Alvin_=C5=A0ipraga?= , Christian Marangi Subject: [PATCH net-next 2/2] net: dsa: qca8k: consistently use "ret" rather than "err" for error codes Date: Fri, 2 Feb 2024 18:36:26 +0200 Message-Id: <20240202163626.2375079-3-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240202163626.2375079-1-vladimir.oltean@nxp.com> References: <20240202163626.2375079-1-vladimir.oltean@nxp.com> X-ClientProxiedBy: VI1PR0102CA0094.eurprd01.prod.exchangelabs.com (2603:10a6:803:15::35) To VE1PR04MB7374.eurprd04.prod.outlook.com (2603:10a6:800:1ac::11) 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: VE1PR04MB7374:EE_|GVXPR04MB9974:EE_ X-MS-Office365-Filtering-Correlation-Id: a433538e-cf57-478e-73ba-08dc240d6cd1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bEn7T3GjxHPDQiqlOnGNDbFIzq0+q+fspo1FeDwu/gvnHIG4RXWKZAbhrh2WMgd09ex/GW1PlDKmMO6g5Abx1UWxOCHTLMER8H+P8jS3877BkOBHKo2xFOtR5ekCMWGtFpvv6kZkGT33Xwk3JVggpTWz0s3gCgWMzXf9C8BRSZj9xlkDihtPKC7CoYnFbW8p8U5aqJmCuA0iXElVwK73KE01aHNm/lvZNNQrCKIYVURfzvN60LEofRNFeIh8kjz9JYiAeADgRwriRuAJSB6wxWkiAaP2TmOllTU928RTyAeMNl3unZKtvvQiLfvqVU1iXLPrjHwNx8AlWyKjFtNki5SUzwSV2u7XJaY8QOiWfx7M69Vs0hV6rWq7MlNFXUdxB9E4duKz25q3X4jYq2amCe2o83Degw08l0WlLGX6mild6IYBpdvtkSq065SsVlnEj3bFbhU3e9eOhDrUbRnmKBoOMJpXZvqH6VJqocHs0gNYO2m/GTKAaNyosOVjBkRW1Y43n3RhN0AwKTattGwuYgCk+nq+27j4iLZYvyaTD54sGwtXCiQ4kZWow/pQa+x8js1ld88pHmVnpQKDbvRzR3YkcoYTZ9lAN46Cu9xlGFHFY68Q+fnCw73nzGNgyzTrqs+L3fAyQOMTUuTXM2cQTTDJQyRz0CjIw5aZ87RujLg= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR04MB7374.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(39860400002)(376002)(396003)(366004)(136003)(230922051799003)(230173577357003)(230273577357003)(1800799012)(451199024)(186009)(64100799003)(83380400001)(41300700001)(2616005)(6512007)(38100700002)(4326008)(26005)(66574015)(8936002)(2906002)(1076003)(5660300002)(6916009)(966005)(66556008)(6506007)(66476007)(66946007)(44832011)(54906003)(478600001)(6666004)(52116002)(6486002)(8676002)(316002)(38350700005)(36756003)(86362001)(32563001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?8ZFHr8WdrdBPBDbp85b+LsYzjvrb?= =?utf-8?q?p1uCdpN/rtynqlHfULaYmgsQ/7cUz3Ind7iQcs+VBeuxWkkOExlmYRPrUB/5vd3uU?= =?utf-8?q?3CZYHygwLQrozVYgdZ77RsUMD55qy9D65JoOFeVcBEcZudha6+6C/bGjDfJJmyPUg?= =?utf-8?q?LDqyp46RMvUw2KQVOKZtfV0ruEandnueoVQbITYnT5GKr/ydiV74RmCDXf5QEXRm3?= =?utf-8?q?+URNZqCpA7J0N9+zhmGLLFHRDlniaPUpIijO9OwzkPkrBr4wnUyZy3BQ7WCSeLUK2?= =?utf-8?q?QXO17pDQ0DI6CO5MSK9FtHU1T5YsvCHLVtnI4S8S04i7kDbRgp1FlGC4klsQLkl1Y?= =?utf-8?q?uWJfP/gQIpHHk3zUW6jZvfRB690hGei0kBBZaVgA+nuok3nmx0Yuq//uDllKr/diI?= =?utf-8?q?LmfMsoB+W9a2s5b501knYQPnBVhHqm9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o79N8MJEGFSh3TJh8126rn367VKAh0CBB?= =?utf-8?q?RRsZpNDt9oKBsUOZO630WyMfW5MbKDpUQmKoCyTYipdDexF6e9m7gC5R0CYfsBsvW?= =?utf-8?q?RgsG1waCatDBSeJwRigNQVhDvQL/0Lus7npphTHkfpYuzckYThmM25XDmrWxZ969H?= =?utf-8?q?tu45AHw+uHuNGi44hn2vgnZ5/S07PdFhRNKCCFuDSBImE3CEJt8PHLmpbqG2KuCHk?= =?utf-8?q?rE9FE1dBt2nkXvlRjw4syEUHCQYfuhr2lQ=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a433538e-cf57-478e-73ba-08dc240d6cd1 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB7374.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Feb 2024 16:38:45.9733 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Mm7uUZBxAaqJboT/dbKOpoqJ9db3SYDSE9GYWTvhdwE+8SmUTYzx+QTmu2Z8Ll4NqNj5bekpye6fmnTMQ9M2Iw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR04MB9974 X-Patchwork-Delegate: kuba@kernel.org It was pointed out during the review [1] of commit 68e1010cda79 ("net: dsa: qca8k: put MDIO bus OF node on qca8k_mdio_register() failure") that the rest of the qca8k driver uses "int ret" rather than "int err". Make everything consistent in that regard, not only qca8k_mdio_register(), but also qca8k_setup_mdio_bus(). [1] https://lore.kernel.org/netdev/qyl2w3ownx5q7363kqxib52j5htar4y6pkn7gen27rj45xr4on@pvy5agi6o2te/ Suggested-by: Alvin Šipraga Signed-off-by: Vladimir Oltean Reviewed-by: Andrew Lunn Reviewed-by: Christian Marangi --- drivers/net/dsa/qca/qca8k-8xxx.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/dsa/qca/qca8k-8xxx.c b/drivers/net/dsa/qca/qca8k-8xxx.c index 95d78b3181d1..dab66c0c6f64 100644 --- a/drivers/net/dsa/qca/qca8k-8xxx.c +++ b/drivers/net/dsa/qca/qca8k-8xxx.c @@ -950,7 +950,7 @@ qca8k_mdio_register(struct qca8k_priv *priv) struct device *dev = ds->dev; struct device_node *mdio; struct mii_bus *bus; - int err = 0; + int ret = 0; mdio = of_get_child_by_name(dev->of_node, "mdio"); if (mdio && !of_device_is_available(mdio)) @@ -958,7 +958,7 @@ qca8k_mdio_register(struct qca8k_priv *priv) bus = devm_mdiobus_alloc(dev); if (!bus) { - err = -ENOMEM; + ret = -ENOMEM; goto out_put_node; } @@ -984,11 +984,11 @@ qca8k_mdio_register(struct qca8k_priv *priv) bus->write = qca8k_legacy_mdio_write; } - err = devm_of_mdiobus_register(dev, bus, mdio); + ret = devm_of_mdiobus_register(dev, bus, mdio); out_put_node: of_node_put(mdio); - return err; + return ret; } static int @@ -997,7 +997,7 @@ qca8k_setup_mdio_bus(struct qca8k_priv *priv) u32 internal_mdio_mask = 0, external_mdio_mask = 0, reg; struct device_node *ports, *port; phy_interface_t mode; - int err; + int ret; ports = of_get_child_by_name(priv->dev->of_node, "ports"); if (!ports) @@ -1007,11 +1007,11 @@ qca8k_setup_mdio_bus(struct qca8k_priv *priv) return -EINVAL; for_each_available_child_of_node(ports, port) { - err = of_property_read_u32(port, "reg", ®); - if (err) { + ret = of_property_read_u32(port, "reg", ®); + if (ret) { of_node_put(port); of_node_put(ports); - return err; + return ret; } if (!dsa_is_user_port(priv->ds, reg))