Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp1968997ima; Thu, 25 Oct 2018 07:43:42 -0700 (PDT) X-Google-Smtp-Source: AJdET5cHmSE8zMqpM70Une0ryzJkrbI82uogoUxE7s0ORaB3zdBi3dGVQ5h3rT2JwCEBoF4WHgGm X-Received: by 2002:a62:ab05:: with SMTP id p5-v6mr1558597pff.211.1540478622102; Thu, 25 Oct 2018 07:43:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540478622; cv=none; d=google.com; s=arc-20160816; b=Gs6ZdQG0ewi/3o2IHlcZsCc4lTKCrrRx/0hq3MFzMN6dFqSTjpL4vYJCFv1SziYBaW r0d5Ypdk9TdGn1dx958o5rG40LIJjY/qb/OeJheFUUKwo1gmMMeg6MUbXzobamyBh5PT 3pCyiqC1SO05Jwi/VFaCiyeCyn1YAC14g1KPUlrHWrn791qRjYK89Z/xVSzbBpI+JMuD /npzg/QcqQs8LMNBmbgv6tx4PYMtOH+DmTXOYHdrBjaAH96SZDMa31b/jEp3Lnd2+oue 8Hh4elpjUQTl3vbXAx2rdXZNoLdpc5XXhlAEKD79B+fAWP0EedAXw/LG7ilhp3WoYunM HL5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=ZGYv6H1+AoFqyvOHJCCCY1EJScpU1BvW7mgU0SB9FJg=; b=vR3tl1HRBGCKcpEWAbnbIk9reBx2l9DQi3IJOkChn2ESzwAcERck+XmBolvAujKxPz eluZoCekI8S9TX02pDKVuYVU4/vM0SDsdlaQfUhrCkQ+PaIeXczksdvrayziaeowQKcu aiaSLSmDbj65e5Lcf7JfnBCs5lhtUlWVHaVd4JtSYGU1DfFG6hEw/gNNTW+aTipCFc4T vHVraL8LbnaoQIinrxsmW0xbfXf1UUCmOuOE5xe08oOoVFZ3owjWlN/eENoYfldKSpNN 3avGOrVGIZV8fLPqUunfVjWvwhJ9/tXYhuwuGjB/F7mJGcouezS7ETU7j3bOIvoWDpCS iOng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Co9mKufj; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c5-v6si7590589pgq.226.2018.10.25.07.43.03; Thu, 25 Oct 2018 07:43:42 -0700 (PDT) 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=@kernel.org header.s=default header.b=Co9mKufj; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729038AbeJYWse (ORCPT + 99 others); Thu, 25 Oct 2018 18:48:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:57244 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728244AbeJYWse (ORCPT ); Thu, 25 Oct 2018 18:48:34 -0400 Received: from sasha-vm.mshome.net (unknown [167.98.65.38]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5597B2085B; Thu, 25 Oct 2018 14:15:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1540476937; bh=wOc5kPQ70iLUHv+kQwC8LvSjMpuN8n5k2tyy8jB552U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Co9mKufjPkP3d+yvybOdG3+uwdJxIQYdo5oHk160Oh3vwVXLWS8qRHM1h5Ycnhrjl ei22vi7NIivuB0rGUpWb4tbpOquQJXIMNNKKU2/kkJRYZNFk5JvI8pAgLIN9rQApUq 4/UvERaJYAKSQE26tO2pgpVeqwO8BBvy4ihQGDJs= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Yoshihiro Shimoda , Felipe Balbi , Sasha Levin Subject: [PATCH AUTOSEL 4.9 49/98] usb: renesas_usbhs: gadget: fix spin_lock_init() for &uep->lock Date: Thu, 25 Oct 2018 10:13:34 -0400 Message-Id: <20181025141423.213774-49-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181025141423.213774-1-sashal@kernel.org> References: <20181025141423.213774-1-sashal@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yoshihiro Shimoda [ Upstream commit 14a8d4bfc2102f85ce097563d151370c91c1898a ] This patch fixes an issue that the spin_lock_init() is not called for almost all pipes. Otherwise, the lockdep output the following message when we connect a usb cable using g_ncm: INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. Reported-by: Kazuya Mizuguchi Fixes: b8b9c974afee ("usb: renesas_usbhs: gadget: disable all eps when the driver stops") Signed-off-by: Yoshihiro Shimoda Tested-by: Kazuya Mizuguchi Signed-off-by: Felipe Balbi Signed-off-by: Sasha Levin --- drivers/usb/renesas_usbhs/mod_gadget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/renesas_usbhs/mod_gadget.c b/drivers/usb/renesas_usbhs/mod_gadget.c index 93fba9033b00..54a3237aac08 100644 --- a/drivers/usb/renesas_usbhs/mod_gadget.c +++ b/drivers/usb/renesas_usbhs/mod_gadget.c @@ -1085,7 +1085,6 @@ int usbhs_mod_gadget_probe(struct usbhs_priv *priv) ret = -ENOMEM; goto usbhs_mod_gadget_probe_err_gpriv; } - spin_lock_init(&uep->lock); gpriv->transceiver = usb_get_phy(USB_PHY_TYPE_UNDEFINED); dev_info(dev, "%stransceiver found\n", @@ -1135,6 +1134,7 @@ int usbhs_mod_gadget_probe(struct usbhs_priv *priv) uep->ep.name = uep->ep_name; uep->ep.ops = &usbhsg_ep_ops; INIT_LIST_HEAD(&uep->ep.ep_list); + spin_lock_init(&uep->lock); /* init DCP */ if (usbhsg_is_dcp(uep)) { -- 2.17.1