From patchwork Wed Jan 4 21:05:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 39095 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp5358811wrt; Wed, 4 Jan 2023 13:12:39 -0800 (PST) X-Google-Smtp-Source: AMrXdXtOma/txlAd6dtMJsVNlgtnFZGT41+Lu0hv7fH5uLPk6ZN6bPOWFd8rQtYLqq1T7bfZNm8F X-Received: by 2002:a17:906:308c:b0:7c0:a6a9:64e9 with SMTP id 12-20020a170906308c00b007c0a6a964e9mr56955839ejv.36.1672866759599; Wed, 04 Jan 2023 13:12:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672866759; cv=none; d=google.com; s=arc-20160816; b=ktc5Jxe6RgDzJedMZBlzfNhmj2vGo0n4xPtsLM2KMiY/XTcaVnhla9VlDdWnMre16X aJ2U4LvDaRGaDzNKhx4y8kOGAPC4muYIa8uSKoHNR2XPYkYh3lSvRodYE4IhArvQTRHO 8+be+g3HTCYPh0NwkzTB70giTpjkLSuRMFgeZYd6wubhjJ3Gm0ILsSQmcZiNthojSwDn jXA0DFs8tZTIADUo7xSYjhURZlJphr7sGw7LxUp+F4uH20wQ3+2tNn1qoQPwH/XEOPTk HqV4TzDf+y12gQrsFv6ZH2NnG/ShTp3N2lpXYS1jS3CRpVgHx5iaHwB4NxUQnefnHhaC 7X1Q== 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; bh=5dLvXOoqHzSCv3b78u2NVUI559bf6TEckGptanl0v/8=; b=X7VChdbKPUB5IiupM6Rft5Ghb0RLD1w4G0w36rf/9FChWYNZZCe6v1T5A7kQE+ef9N c2LgWyFrh+vYjq9Sjuf0dSkxszK3WpI8rLBnKcFIQRWyhf4DGXKLdqxBmH6Wipl1WLOh efnvbUxoT9XLpYlHKa8YTBIEjYjobDOcBH7wzNExbfZigS7Ze4lOHUb5Ta8zmyY/CT8b XICQwdwuwCDdUtMfRSZiyucWqZgZaj9mHAb4R6GV0zmbLwqsoSE5ZBWWWNkE+Utm2wCK z48zf0HUt+jmNdSjQmhMQDPsmRDxmFHpoJO8cCpiV+RO8GKOMUvrzSUIZtApDcMFfzzj 7v1w== ARC-Authentication-Results: i=1; mx.google.com; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xa8-20020a170906fd8800b007b8b7da6480si29864763ejb.659.2023.01.04.13.12.15; Wed, 04 Jan 2023 13:12:39 -0800 (PST) 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; 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 S240304AbjADVGs (ORCPT + 99 others); Wed, 4 Jan 2023 16:06:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240312AbjADVGa (ORCPT ); Wed, 4 Jan 2023 16:06:30 -0500 Received: from smtp.smtpout.orange.fr (smtp-14.smtpout.orange.fr [80.12.242.14]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CDE81CB12 for ; Wed, 4 Jan 2023 13:06:29 -0800 (PST) Received: from pop-os.home ([86.243.100.34]) by smtp.orange.fr with ESMTPA id DAxcpwWwVxN58DAxvpFlKB; Wed, 04 Jan 2023 22:06:27 +0100 X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Wed, 04 Jan 2023 22:06:27 +0100 X-ME-IP: 86.243.100.34 From: Christophe JAILLET To: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, netdev@vger.kernel.org, Christophe JAILLET Subject: [PATCH net-next 3/3] ezchip: Further clean-up Date: Wed, 4 Jan 2023 22:05:34 +0100 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754127935151780836?= X-GMAIL-MSGID: =?utf-8?q?1754127935151780836?= Now that is only call to platform_get_drvdata() is removed, calling platform_set_drvdata() looks useless. Remove it. While at it, remove a useless 'err' initialization and change its type to a more common 'int' Signed-off-by: Christophe JAILLET --- drivers/net/ethernet/ezchip/nps_enet.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/ezchip/nps_enet.c b/drivers/net/ethernet/ezchip/nps_enet.c index 21e230150104..139510d9669f 100644 --- a/drivers/net/ethernet/ezchip/nps_enet.c +++ b/drivers/net/ethernet/ezchip/nps_enet.c @@ -574,7 +574,7 @@ static s32 nps_enet_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct net_device *ndev; struct nps_enet_priv *priv; - s32 err = 0; + int err; if (!dev->of_node) return -ENODEV; @@ -583,7 +583,6 @@ static s32 nps_enet_probe(struct platform_device *pdev) if (!ndev) return -ENOMEM; - platform_set_drvdata(pdev, ndev); SET_NETDEV_DEV(ndev, dev); priv = netdev_priv(ndev);