Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2167363ybv; Fri, 14 Feb 2020 12:50:56 -0800 (PST) X-Google-Smtp-Source: APXvYqyr20paUXvTJoQmp4igALOFZAQuOKg2XrTiiQQl+Nrun0VFM2eNnhrw1YgGu5a8SeoOtX/i X-Received: by 2002:aca:5083:: with SMTP id e125mr3204958oib.96.1581713455860; Fri, 14 Feb 2020 12:50:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581713455; cv=none; d=google.com; s=arc-20160816; b=ObSWOCi0nqIw3sVpP9nQg1K/B05Ic6jlHz74Wud4Y+2B54iyTsHRiErWo8xQrVS8ef 9IjtBdC2UQI73OvhO/wv0XhOwGlRGB+QcZ/uffku3ZrWYr+BtHQ224xu0fTfo07XZ/hR MC+OCtbV/nXjtUFPBHo7AeNhQMYfccAnkEtkJOihMyhpMxW5ZnFYKyVlZL/Bji0ry6Fg xNtMQxXhslu5yUH1ktJg/nhQM8tOk5BLAJoBTVb8jGyY9ha/MHTY1xbxFB7SioUZbj0Q xq2QFzcu4DP4sflQ1RPok72d+yLJ+6sLWdnOS8VP0ho/cBvmrDvMYESdQQxvBUWVb7d7 fykQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=zjr/tAS/dgk7oDUjadfYCF+NEQyK468tvuW7wnQKG8U=; b=BN6BolssDoIvPsyBHhReo0+dUNxNlE6AiwApGJlrEH1Qf2TGXrh6qFHdKqwY6WUGln SvVEAoG3p03miG8SCdRY3nF3KG85hxRbHgQSDFVlwzRaj8OPq0Vsi/0H0xxAAPBMJRh6 11YCdb/oqbB8zx6vIZ9EEDMkHTd7f4RsKGJHYaLxE1I1FomwWVeDbhtp5oBiYjQ193yv lPE9YndWdTXaSqTP2EYRyg5qUxZkTe0FWKCiBxboiDTxWmECpJrEOOty/4l4aFAEfGqz Jc7+KpXCvX5WzHo9T3e+s0QJA6MzkZ7SBla68lImJ4gpAiNt5xkaTRtFIt2DuFiant6Q YTLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VWbNVN0F; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id x16si3332955otp.184.2020.02.14.12.50.43; Fri, 14 Feb 2020 12:50:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VWbNVN0F; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S2389747AbgBNUt7 (ORCPT + 99 others); Fri, 14 Feb 2020 15:49:59 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:37961 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388735AbgBNUtB (ORCPT ); Fri, 14 Feb 2020 15:49:01 -0500 Received: by mail-wm1-f66.google.com with SMTP id a9so12159618wmj.3; Fri, 14 Feb 2020 12:49:00 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=zjr/tAS/dgk7oDUjadfYCF+NEQyK468tvuW7wnQKG8U=; b=VWbNVN0F91N2qSv/8jnIESRtqmMHF7ZDVOMvC24P+VkV+Nl3SRxWFa+voUgMJbs7Dj A1mDe01tt73aEE2XgktVL2ZND5MkulpHKO0/gqVrVk+fMfyw0GyIqNCjZLVxGFgPvMuH F52dt4WELzfGpeeypnkZCCXVHurmZ1fAMQwVXU9tq2Qud4dRn4m+HjzQu68KtTYBPKxt +YnqQgzc6Dq927MCleyAYgJN++w37b6iLrIECNmbewSALNygJPEqMET/gODZIvIDvLRg 9dTRJvkBgAAN/ar2PEnCYTYj720XxkX5NneE72MuF5fmf7AcBzRh2LMA5g9QGgiZOasj u1bg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=zjr/tAS/dgk7oDUjadfYCF+NEQyK468tvuW7wnQKG8U=; b=Lj4cyzYkkgi4UjhlwLJRbrJU2S6NTJ/Cou0x85Wj6X/iva1hFTdMaoFcsX+/R+v/N0 s7g7VH/QSgO1mDYSwDmVEdiFHivmuYJILauda5o4s6/O5sohDH/iOVs1Gdbp/IpfSi79 YtdiAMnUeMt770b/XDxT/ehUhyyMS8k3B4jR5PMWJzHioJ6ZNAFaL6KJmaUTChDUgbCG uiLUYFvZVSeSVY2b4lqv4J7jqmVvo1V+WURkEMgKCJkdU1ni2t5t0uhZS3LOCqjT+mGg kuQmCM/ZB284+4XU+3RGerreFM0GSL1NwLkcUZJLIgyK9wTAisGh04zzoSTrEFtpcFKc KQzg== X-Gm-Message-State: APjAAAVhPF1LKtpTe4btbxmwEffm4ltcahu1lnhi18KMmFGRa0ZDpggh vZnNsY9Nx5JpMzH9WRTU6eecFamPv2X7 X-Received: by 2002:a7b:c759:: with SMTP id w25mr6359861wmk.15.1581713339230; Fri, 14 Feb 2020 12:48:59 -0800 (PST) Received: from ninjahost.lan (host-2-102-13-223.as13285.net. [2.102.13.223]) by smtp.googlemail.com with ESMTPSA id y12sm8660782wmj.6.2020.02.14.12.48.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Feb 2020 12:48:58 -0800 (PST) From: Jules Irenge To: linux-kernel@vger.kernel.org Cc: boqun.feng@gmail.com, Jules Irenge , Mathias Nyman , Greg Kroah-Hartman , linux-usb@vger.kernel.org (open list:USB XHCI DRIVER) Subject: [PATCH 23/30] xhci: Add missing annotation for xhci_enter_test_mode Date: Fri, 14 Feb 2020 20:47:34 +0000 Message-Id: <20200214204741.94112-24-jbi.octave@gmail.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200214204741.94112-1-jbi.octave@gmail.com> References: <0/30> <20200214204741.94112-1-jbi.octave@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sparse reports a warning at xhci_enter_test_mode() warning: context imbalance in xhci_enter_test_mode - unexpected unlock The root cause is the missing annotation at xhci_enter_test_mode() Add the missing __must_hold(&xhci->lock) annotattion Signed-off-by: Jules Irenge --- drivers/usb/host/xhci-hub.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c index 57e3f2c5475a..38839308557e 100644 --- a/drivers/usb/host/xhci-hub.c +++ b/drivers/usb/host/xhci-hub.c @@ -609,6 +609,7 @@ static void xhci_port_set_test_mode(struct xhci_hcd *xhci, static int xhci_enter_test_mode(struct xhci_hcd *xhci, u16 test_mode, u16 wIndex, unsigned long *flags) + __must_hold(&xhci->lock) { int i, retval; -- 2.24.1