From patchwork Fri Aug 11 15:47:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Stern X-Patchwork-Id: 713289 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 63D3AEB64DD for ; Fri, 11 Aug 2023 15:47:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235743AbjHKPrR (ORCPT ); Fri, 11 Aug 2023 11:47:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235703AbjHKPrR (ORCPT ); Fri, 11 Aug 2023 11:47:17 -0400 Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 32A73270F for ; Fri, 11 Aug 2023 08:47:15 -0700 (PDT) Received: (qmail 285616 invoked by uid 1000); 11 Aug 2023 11:47:15 -0400 Date: Fri, 11 Aug 2023 11:47:15 -0400 From: Alan Stern To: Greg KH Cc: oe-kbuild-all@lists.linux.dev, linux-usb@vger.kernel.org Subject: [PATCH] USB: core: Fix unused variable warning in usb_alloc_dev() Message-ID: <7223cc66-f006-42ae-9f30-a6c546bf97a7@rowland.harvard.edu> References: <202308092350.HR4PVHUt-lkp@intel.com> <2023081032-launch-unrigged-2a4b@gregkh> <2023081034-nanny-repacking-3f26@gregkh> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <2023081034-nanny-repacking-3f26@gregkh> Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org The kernel test robot reported that a recent commit caused a "variable set but not used" warning. As a result of that commit, the variable no longer serves any purpose; it should be removed. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202308092350.HR4PVHUt-lkp@intel.com/ Signed-off-by: Alan Stern Fixes: 1e4c574225cc ("USB: Remove remnants of Wireless USB and UWB") --- drivers/usb/core/usb.c | 2 -- 1 file changed, 2 deletions(-) Index: usb-devel/drivers/usb/core/usb.c =================================================================== --- usb-devel.orig/drivers/usb/core/usb.c +++ usb-devel/drivers/usb/core/usb.c @@ -644,7 +644,6 @@ struct usb_device *usb_alloc_dev(struct { struct usb_device *dev; struct usb_hcd *usb_hcd = bus_to_hcd(bus); - unsigned root_hub = 0; unsigned raw_port = port1; dev = kzalloc(sizeof(*dev), GFP_KERNEL); @@ -694,7 +693,6 @@ struct usb_device *usb_alloc_dev(struct dev->dev.parent = bus->controller; device_set_of_node_from_dev(&dev->dev, bus->sysdev); dev_set_name(&dev->dev, "usb%d", bus->busnum); - root_hub = 1; } else { /* match any labeling on the hubs; it's one-based */ if (parent->devpath[0] == '0') {