From patchwork Mon Dec 10 15:23:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suwan Kim X-Patchwork-Id: 10721423 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3552091E for ; Mon, 10 Dec 2018 15:23:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 277D92AD1A for ; Mon, 10 Dec 2018 15:23:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1BE612AD10; Mon, 10 Dec 2018 15:23:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B73C12AD12 for ; Mon, 10 Dec 2018 15:23:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727750AbeLJPX2 (ORCPT ); Mon, 10 Dec 2018 10:23:28 -0500 Received: from mail-pg1-f193.google.com ([209.85.215.193]:33346 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726607AbeLJPX2 (ORCPT ); Mon, 10 Dec 2018 10:23:28 -0500 Received: by mail-pg1-f193.google.com with SMTP id z11so5123320pgu.0 for ; Mon, 10 Dec 2018 07:23:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=JL7BFyIWOCEWeSz6HjiH8PyMLCyp+wXBevARSzHFR8M=; b=ur2dB1fSZQp8dSPMKDJIJurDbrW/LdOSGArDXTkbu7i/xH3lKGQaGNUZVrPI+Nw9ir t9jJzYGVbWxutoVKT38xgjxZiyrrH23BrNVGoQHtLOqEcdaQqRFB8fS+6J99A9b7y5B2 9prc90s0kLD5vvfA2e4Q0Z//1ZelRVb/BU0taE2cWA9UL6ndoVtYdiVaJD2BM6PiRFzr GJwnLs1fqq73jifJRrP8gyG+cWrQIKjqT49OCQjVsJ/0wa82EUtQllUmUR9q/Xu5cgBj t/YcijJYVK91AHbCTCmmXLrT1bh5mn77Ws8KLQeTTxEDdtios8FLE6jJRT7e5Gam/Q+7 tBgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=JL7BFyIWOCEWeSz6HjiH8PyMLCyp+wXBevARSzHFR8M=; b=dcHjMNiz5/yMl/6GKqXVL2cNPgZzftji3FlbddxIwo1T7N/8RPtWszn7QXtobtC9Sz 98AYMBIYD3NetRcbiY4OL2uN7cg8Wr0vQZSrsMMksIQu/aCfG9x5B38CINvEJVLKWFN/ oRILynInj3wPh5tIN3LEOrkzy25IbI0nF0lGuMZJmbb1TIO9kUtetnH9PhKzfv70dImL 1rRdrfGo6jwTIjzMJxhNsbDK0xOtp0KjxVhK25Qgkw1vpR0EpRJ+ab9VoAjtb1LEPJCb pv+4L0eUdynjU9B41lBSh0Pu+/ggGilOax048I6/MDr+t7zYZF67jqNgbz11XtrRfXJ2 ZM1A== X-Gm-Message-State: AA+aEWYhTHRw5GCHf6uyGtrN86kXzGqZ4Bn8TQUDZHAcaAsr/kEsNw31 S7TEUPv5UuZRbZYVvatX0jC3G3Fo X-Google-Smtp-Source: AFSGD/VxaAiYpyWz2ViK7kfWGZAObbk9ekWGo8ChdWnr3Crr/0sO+inQxM7Ov0tVU5gsNreLemFTpA== X-Received: by 2002:a62:c42:: with SMTP id u63mr12497158pfi.73.1544455407700; Mon, 10 Dec 2018 07:23:27 -0800 (PST) Received: from localhost.localdomain ([163.152.162.242]) by smtp.gmail.com with ESMTPSA id i1sm17169788pgb.46.2018.12.10.07.23.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Dec 2018 07:23:27 -0800 (PST) From: Suwan Kim To: gregkh@linuxfoundation.org, stern@rowland.harvard.edu Cc: linux-usb@vger.kernel.org, mathias.nyman@linux.intel.com, johan@kernel.org Subject: [PATCH] usb: core: hcd: Remove unnecessarily repeated memset() Date: Tue, 11 Dec 2018 00:23:23 +0900 Message-Id: <20181210152323.18587-1-suwan.kim027@gmail.com> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The device map of struct usb_bus is already initialized in usb_bus_init() during host controller probe function. Signed-off-by: Suwan Kim --- drivers/usb/core/hcd.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 487025d31d44..015b126ce455 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c @@ -1074,8 +1074,6 @@ static int register_root_hub(struct usb_hcd *hcd) usb_dev->devnum = devnum; usb_dev->bus->devnum_next = devnum + 1; - memset (&usb_dev->bus->devmap.devicemap, 0, - sizeof usb_dev->bus->devmap.devicemap); set_bit (devnum, usb_dev->bus->devmap.devicemap); usb_set_device_state(usb_dev, USB_STATE_ADDRESS);