Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3661895pxu; Sun, 11 Oct 2020 19:15:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyy+Z084gqRCFmS8SSK3vVbFDyeruvv+cza0IB3PkOiwEpKkV3TBf5RQzPoVdHDd4V+56X7 X-Received: by 2002:a05:6402:21c5:: with SMTP id bi5mr11979477edb.380.1602468932968; Sun, 11 Oct 2020 19:15:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602468932; cv=none; d=google.com; s=arc-20160816; b=ihN78ypkDDHIWPjzMUD10MyErwUCgJ+1PQZYpgkkln1eIEkB9h1xeSz8uG+fPCS1IE FivtyZzdZhJAuUbx8fH2V7SRc9maxbGhHLG58yHi/a4K8X7SINw723Ldq2SLvTKA0AsN eYfSNPUQl0K1KHmRfsAOEi1h4qnR5RmbfjjZj+jmngWvwvNf6dvIDHx+9lQ0VBYb7S6B jq2KsPHUX4XQqOYXHOAnF/oXWIEjrWHqtS3wQtog/MU5pXCdJCU22q5X9Xy4qpoalMxi bVUWBHjyTc3XLw3oz+GRkBnZr5M4GqArj5425mlHsi11LfpWe+aPbyjL3Nk9VGRBq/pl WSiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=BX4Ksw8KZPsLtrPcO58GtjEV3POmqSDp6KnUeCMIM/A=; b=nhtyKicy8vXZhPGhflbvpFXrB94t6BdVj1sRD/REN/qdDZiekiFPSXUWYe0tGwfwra R+Ahg6c1OOHDQrw+irjZEwdCEI0mKOGlh+5IxUXg/zZso6YE2zNOMbsFOZzQrVz4i2LG lmXtQz4YMNdpIq6JVyixLA13j12C6cM+6zcFSQ/7prqmsLlvI8QzthqxfIYdIJze18li Dj/2jSfGwfmSkrW831Wpstmmnr4ZVY22YAiD2KKhGPW7aromcop7zefUDnSh1XRl88rt 8odk24PXlIIFdoJGcA3e09lYO4lbv5M+MVmN3YMf/tPJXHj/KiSLsAMsQXnz/WCCHLMU /dSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=puQfLXc6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h25si7146640edt.103.2020.10.11.19.15.10; Sun, 11 Oct 2020 19:15:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=puQfLXc6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729423AbgJKUwo (ORCPT + 99 others); Sun, 11 Oct 2020 16:52:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729321AbgJKUwn (ORCPT ); Sun, 11 Oct 2020 16:52:43 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B5CEC0613CE; Sun, 11 Oct 2020 13:52:43 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id h7so16819966wre.4; Sun, 11 Oct 2020 13:52:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=BX4Ksw8KZPsLtrPcO58GtjEV3POmqSDp6KnUeCMIM/A=; b=puQfLXc6z9+ETjKkL3Ql8/IIvJrtTJ7yoOUQFZYaK56Am2Of/0p/QIkXYIls5tL0in sXD5MPMLKThYYDrcVtkjjdlNAfW1niIOCYs7z/EoBXfIhtZNd9+XCReGNYD6psFnvVrS zqYHwPJadWzCPZpMBOZRbMwKtBpVFa6VSc9dhZr6e8m6WhztVaOYRgrkpck8yjBPXthL FOVItwA6bhlnlUR28E12jFRSEeCRtF5tT8FXxRyQ/nt+iKEfxjmNUqQijUGOw7EfXxHs +4eSg9SAVBP2ey197ffk+f8U9ynPg7NsY7XU6oU5ssGeBPDX9LXDIAzIX3VuxlXDsm7B 23lg== 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; bh=BX4Ksw8KZPsLtrPcO58GtjEV3POmqSDp6KnUeCMIM/A=; b=Crg2pMrLN1iGfTtXVPTEBm7jI4/8wIyZU7lKbDC2gPYW9ZX0jhSGK2zWJA70oyqraj DFTjGYne0ey/89zlDuNjoB7w5foLRiu+2cE79HDXx1dbNqc6YvWe2Ma7d0n0pOePqzbK ksweNnBQVBG1jspQCgrmYFwOrKYR7p8Hem7Ro98x8bi0xTd23Njmqc2Kd72bJCeKvpYL 9UuOTZQz8h2xDtbGh6xla0T3MXvMrzV/M3NMYNFYxHBbtoYQ6PebjDBievjZQrVHX5Xy bgvjUx6UCbKNCCIhAe9VwAptsYZgH8zighccG8rI/dAQib6UHrFSktr3MhSQyO1oYh/w DTqg== X-Gm-Message-State: AOAM533N9jocDM7WDhkVZjk8XRSoBGeqjQwDc9NRKfzUzv/pySZ0kR+q YLjNo0dIC4Ok7TN/7v3Grvs= X-Received: by 2002:a5d:6a51:: with SMTP id t17mr9957357wrw.80.1602449562207; Sun, 11 Oct 2020 13:52:42 -0700 (PDT) Received: from localhost.localdomain (host-92-5-241-147.as43234.net. [92.5.241.147]) by smtp.gmail.com with ESMTPSA id y66sm4070595wmd.14.2020.10.11.13.52.41 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Oct 2020 13:52:41 -0700 (PDT) From: Sudip Mukherjee To: Alan Stern , Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, linux-safety@lists.elisa.tech, linux-usb@vger.kernel.org, Sudip Mukherjee Subject: [PATCH] usb: host: ehci-sched: add comment about find_tt() not returning error Date: Sun, 11 Oct 2020 21:50:08 +0100 Message-Id: <20201011205008.24369-1-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 2.11.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a comment explaining why find_tt() will not return error even though find_tt() is checking for NULL and other errors. Signed-off-by: Sudip Mukherjee --- drivers/usb/host/ehci-sched.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c index 6dfb242f9a4b..0f85aa9b2fb1 100644 --- a/drivers/usb/host/ehci-sched.c +++ b/drivers/usb/host/ehci-sched.c @@ -244,6 +244,12 @@ static void reserve_release_intr_bandwidth(struct ehci_hcd *ehci, /* FS/LS bus bandwidth */ if (tt_usecs) { + /* + * find_tt() will not return any error here as we have + * already called find_tt() before calling this function + * and checked for any error return. The previous call + * would have created the data structure. + */ tt = find_tt(qh->ps.udev); if (sign > 0) list_add_tail(&qh->ps.ps_list, &tt->ps_list); @@ -1337,6 +1343,12 @@ static void reserve_release_iso_bandwidth(struct ehci_hcd *ehci, } } + /* + * find_tt() will not return any error here as we have + * already called find_tt() before calling this function + * and checked for any error return. The previous call + * would have created the data structure. + */ tt = find_tt(stream->ps.udev); if (sign > 0) list_add_tail(&stream->ps.ps_list, &tt->ps_list); -- 2.11.0