Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp443850ybz; Wed, 29 Apr 2020 03:08:40 -0700 (PDT) X-Google-Smtp-Source: APiQypIiVEpcvKzrObc39JOMy1iZZ+2OXFF6HEwrOPaY/0TxOT/IoJsZU3RxJkKas0FAFO71P+Hr X-Received: by 2002:a05:6402:31b1:: with SMTP id dj17mr1610160edb.146.1588154920344; Wed, 29 Apr 2020 03:08:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588154920; cv=none; d=google.com; s=arc-20160816; b=xff1R0Ir9lefJl0XSg0jCopdh7Nih7I03w8rk34U1dDf05Bm9mpGeWXNge5BC6NlUH bJpr2ADhg+0esjyjZe7zqEf3I+1sgubr6EtZ2mneWHvsrTfInM9Yy4Lp65ENVpfzgPMH W2UzhjjzQvzxEr0/hHzWReZh57JXfnAskL+rU/S8nDzgF7EEIQq2BEsS3JcNabBIm5hL MgnMK74/2LkqObGEktbwafe1pqOPK6K1fpp258Puf7nimHeRvOt8AM+OVmEvuDGuAAda LoHBLTp/Yu73lCNxYeQsjs78uSryZfBQ9webTdiNktEV3yub8MtpKpIEkesFGxDWWaso oaQw== 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=Nu1X2CW6jPtDQ0aEhEItVv3kksJg5s4aseacqkeIhzw=; b=Ad/Fr2a873JRiaBeEgUschHzmcnRMmOb5/jL/kgDntm15+XOZ44/cmEnTi0Sa0GiGg CRpzZJnXbCkHE9c4BT8rmfTvcqS76GScUYzByjIXPYKS4vxnMubOZuHP/jLQyWjzJVTO oOntJ6/WdZHz2jgCnyfqCkUS3uzr6CrPflo5QX4zkAscayHHPCXR30trnqP7DYwDkBdJ yNPlyEBPdeJgDQi5ptdjhN0E2Qakwh6XrzedXyqTVMLXi3PFaEAeeNUWcPhVMplsCI7q 0I//1XXf+m037eS3VoWo78VgBCfA9vU3sOTVW09zZga/5Jf8dd7NZlMbaStdtf0y1E0o IvrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=huwf0HvL; 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 a20si3480724ejj.269.2020.04.29.03.08.17; Wed, 29 Apr 2020 03:08:40 -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=huwf0HvL; 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 S1726839AbgD2KGu (ORCPT + 99 others); Wed, 29 Apr 2020 06:06:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726763AbgD2KGq (ORCPT ); Wed, 29 Apr 2020 06:06:46 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8490DC03C1AD; Wed, 29 Apr 2020 03:06:45 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id k1so1788709wrx.4; Wed, 29 Apr 2020 03:06:45 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=Nu1X2CW6jPtDQ0aEhEItVv3kksJg5s4aseacqkeIhzw=; b=huwf0HvL6kpp+czUgrhjvRS4qZYndq90uhZM4bWYOZfbxK7vqRE95//PfH49sRMF0K gjmLwjrKYHai0Y52Fg/6e0HydeOgU3IZ2Bffnx3P6/xgWvTcMCUvc050VNQICGtjhSKP xnOCt9d9gN4JkAWiQ65oqNc16HqXA+tIm4LSDYqZJZNwJOG0as5NQVCECvMpJK8obg7n HX/kf2pSKCE1B0T9WXGId98rqK7ZOkExlBZj/mKS4bepIidwYPVTu9fVdF5patYeGxwK Zy2HnES4sM/lzJdoupRJRjcOHI89hlcW0pPIxFWGAV1tA7j5jWM/H+14sQKZEJg1wjGz dUpw== 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=Nu1X2CW6jPtDQ0aEhEItVv3kksJg5s4aseacqkeIhzw=; b=Ucsbq1lPpL5/7lcRqLz7zI2byM9DBCFDR44V2VyUPQYgnGUQ59wl33+YFU0ujhuaX0 0NxY13JRzvHR3C9m0P90qMfa9owPEFVMLiTJ63ZtvgTlMaNsKaPjnE39s5DRcC2+7KIz hIveuMmvdMFcbJJ9jyHTLGDMbh6JQ7XiCr6rriGqRoW8WDqgFzFW93Q2AZp82tTDYrHB oJHNbNDZkxtftI0vayJDf4/yI4pocCaoSk0L02zKFHRE6S7zVQSEdaYjJ+HSK7eWOKFH UfZjqECK1N+HuaeidC53fYi6wjVFhMmCtaRiaZ4mhxs8TaHCJMzQ9OZKT3H7MTWehxTc eBGA== X-Gm-Message-State: AGi0PuZZhOVPGM0OQgcCFGfxTu6O+MwGAv3v1ZTV5KB/B5OFX8YBz73H oG4PhhWdf4F8i/uPnpuWCUpv8W++xQ== X-Received: by 2002:adf:b1c9:: with SMTP id r9mr41352720wra.271.1588154803962; Wed, 29 Apr 2020 03:06:43 -0700 (PDT) Received: from ninjahost.lan (host-2-102-14-195.as13285.net. [2.102.14.195]) by smtp.gmail.com with ESMTPSA id 1sm7205478wmi.0.2020.04.29.03.06.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Apr 2020 03:06:43 -0700 (PDT) From: Jules Irenge To: linux-kernel@vger.kernel.org Cc: Felipe Balbi , Greg Kroah-Hartman , Michal Simek , Stephen Boyd , linux-usb@vger.kernel.org (open list:USB GADGET/PERIPHERAL SUBSYSTEM), linux-arm-kernel@lists.infradead.org (moderated list:ARM/ZYNQ ARCHITECTURE) Subject: [PATCH 1/6] usb: gadget: Add missing annotation for xudc_handle_setup() Date: Wed, 29 Apr 2020 11:05:23 +0100 Message-Id: <20200429100529.19645-2-jbi.octave@gmail.com> X-Mailer: git-send-email 2.25.3 In-Reply-To: <20200429100529.19645-1-jbi.octave@gmail.com> References: <0/6> <20200429100529.19645-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 xudc_handle_setup() warning: context imbalance in xudc_handle_setup() - unexpected unlock The root cause is the missing annotation at xudc_handle_setup() Add the missing __must_hold(&udc->lock) annotation Signed-off-by: Jules Irenge --- drivers/usb/gadget/udc/udc-xilinx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/gadget/udc/udc-xilinx.c b/drivers/usb/gadget/udc/udc-xilinx.c index 29d8e5f8bb58..ae22882dba6a 100644 --- a/drivers/usb/gadget/udc/udc-xilinx.c +++ b/drivers/usb/gadget/udc/udc-xilinx.c @@ -1733,6 +1733,7 @@ static void xudc_set_clear_feature(struct xusb_udc *udc) * Process setup packet and delegate to gadget layer. */ static void xudc_handle_setup(struct xusb_udc *udc) + __must_hold(&udc->lock) { struct xusb_ep *ep0 = &udc->ep[0]; struct usb_ctrlrequest setup; -- 2.25.3