From patchwork Thu Apr 28 21:23:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 567431 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D756DC4332F for ; Thu, 28 Apr 2022 21:23:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352090AbiD1V1A (ORCPT ); Thu, 28 Apr 2022 17:27:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352120AbiD1V05 (ORCPT ); Thu, 28 Apr 2022 17:26:57 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D61A8B9F2F; Thu, 28 Apr 2022 14:23:41 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4C98F61F49; Thu, 28 Apr 2022 21:23:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 21B8CC385AE; Thu, 28 Apr 2022 21:23:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651181020; bh=Z0xLbXX/H1N+jpH3VVNc2Ehyk/u94AsbE5Ev+LudcuA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JBEImXMuDwIeCegr7nD+VqtpI2UsYDdjsU0JG1lBkaOos/x2GcEob3/7GiVgnSP84 8oojII51vYl36IMZYYcgr6CAn31BYPXADlyqwnRSMwyr0F0X6HFuzjMYBlkNClBTwm cWXGVu3WptP/57Z8VqOT8r2g2IvdzmstXrSgzt8/MoV5vZ2IgQaJ88480Ohg0X3HlK yGxIPbJCyh2oUVAqX04wSPcVe+onAOEeMeltZon1YlDwyDXyYHT+DyEAgodMFOgISq CjToWrGj1/jGvsPxpQ/wREPXV/aVDb+oihuTg6iP1KjtD6j0D+Ya3kxQpKeXYJSfLg PuuPicvanBzEw== From: Jakub Kicinski To: davem@davemloft.net, pabeni@redhat.com Cc: edumazet@google.com, netdev@vger.kernel.org, Jakub Kicinski , woojung.huh@microchip.com, UNGLinuxDriver@microchip.com, linux-usb@vger.kernel.org Subject: [PATCH net-next v2 06/15] usb: lan78xx: remove a copy of the NAPI_POLL_WEIGHT define Date: Thu, 28 Apr 2022 14:23:14 -0700 Message-Id: <20220428212323.104417-7-kuba@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220428212323.104417-1-kuba@kernel.org> References: <20220428212323.104417-1-kuba@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Defining local versions of NAPI_POLL_WEIGHT with the same values in the drivers just makes refactoring harder. Signed-off-by: Jakub Kicinski --- CC: woojung.huh@microchip.com CC: UNGLinuxDriver@microchip.com CC: linux-usb@vger.kernel.org --- drivers/net/usb/lan78xx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c index 415f16662f88..94e571fb61da 100644 --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c @@ -92,8 +92,6 @@ WAKE_MCAST | WAKE_BCAST | \ WAKE_ARP | WAKE_MAGIC) -#define LAN78XX_NAPI_WEIGHT 64 - #define TX_URB_NUM 10 #define TX_SS_URB_NUM TX_URB_NUM #define TX_HS_URB_NUM TX_URB_NUM @@ -4376,7 +4374,7 @@ static int lan78xx_probe(struct usb_interface *intf, netif_set_gso_max_size(netdev, LAN78XX_TSO_SIZE(dev)); - netif_napi_add(netdev, &dev->napi, lan78xx_poll, LAN78XX_NAPI_WEIGHT); + netif_napi_add(netdev, &dev->napi, lan78xx_poll, NAPI_POLL_WEIGHT); INIT_DELAYED_WORK(&dev->wq, lan78xx_delayedwork); init_usb_anchor(&dev->deferred);