Message ID | a0293812-c05d-45f0-a535-3f24fe582c02@moroto.mountain |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp3081522vqx; Mon, 27 Nov 2023 04:56:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IFFaVKDbtWqgeKbZ5V20LdR/ghZRUxXwCdHfCy9Y9iQ/uNN9oZ6d/9mhf/gDmW4WG6Hg3je X-Received: by 2002:a05:6a20:6a0e:b0:18a:d7a8:5e5e with SMTP id p14-20020a056a206a0e00b0018ad7a85e5emr9240911pzk.41.1701089811428; Mon, 27 Nov 2023 04:56:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701089811; cv=none; d=google.com; s=arc-20160816; b=KX/pr6G8aVCsWjo1g0+Uo+LiWLOHwungNSkFo7mCKknMl8xHMMneE/PPCRnqZ4PogC WofvSPpK7iz/A6pXtagISCKo3ivT2xQ7ZOGpp172ke2WkbLPyx9CFjG/VwPqmf2CKkP2 VglozttMSRwqJ85OL2wIKqAoJap0+2D5T/haRdyutAEbiFRZifZV0BbE9Gj1QEeMJPCl G0s5od4WFedOQeFDaR5b6rVioFmw/Cs6zRE6pDE0m5hgXpe5sf4CRQofPo7pOklRCO7f g9LsXW7fkVPOsdYw/OclQLqBXo7zAtLgz0uK1YcFh8KRkKNxKWqvK6V4+EoSxHTNT31u YylA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=OIYOB2eU2H+bluz3T89WDZtEixLUpIjEWJSjNBKPfQM=; fh=HobuWe+qPxGEFsA0Dmy34zxt0Ci/osITpR21ZDcXC/g=; b=KBkHSC0aIlve5t1tBTyBKMlzfmccijGpn/2kGHKGavALIL01MOY3sgafm3sHRClMbd ie/yRfu/0PhFk6iRj4+zcGPiK/jygvS9drnHyTBhr/4pkc4OJ9v5HuDrzstFVRZ/gd2Z cmlOckGUtI8Qh81v8MrnteZj0kqAyz4uiPlGLfpJpfBgCvRPcsvj5H9hXGOeWc/F9nJG aktX2i22IMPuwQqzvMCpffM6ZvHEu4GrKe6BrFoQOPUrM0DT3cegVdLPzLoHqdCwauk5 vuPd2y59wS4kKVlchB1S+8zTVAPRfZMuXIiGVKrvEWV9ErFH2dzRFL9ddcWY2Uz7Ydcd Ni1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rUGcXBq4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id j9-20020a63e749000000b005bda77217eesi9774772pgk.209.2023.11.27.04.56.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 04:56:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rUGcXBq4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id F171A8070E15; Mon, 27 Nov 2023 04:56:48 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233461AbjK0M4e (ORCPT <rfc822;toshivichauhan@gmail.com> + 99 others); Mon, 27 Nov 2023 07:56:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233453AbjK0M4b (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 27 Nov 2023 07:56:31 -0500 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BEF421B5 for <linux-kernel@vger.kernel.org>; Mon, 27 Nov 2023 04:56:37 -0800 (PST) Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-40b473d3debso5080115e9.2 for <linux-kernel@vger.kernel.org>; Mon, 27 Nov 2023 04:56:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701089796; x=1701694596; darn=vger.kernel.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=OIYOB2eU2H+bluz3T89WDZtEixLUpIjEWJSjNBKPfQM=; b=rUGcXBq4iWK8F4iT3UXDeOE+1d7jzILvB4lK63tR0pE5q/4YF+ZjKUujXhzk+WzjKv idBY7rjdQOprsQMkXwkwcGvCHWTrJk12RcyMKWQckCJge8Gqdj+66rRR9nOm7cHSCTA+ 6tx4tMguBvzBS/x8dHKppM/e7AJ0Vgl9zJp+V/kVhgQ8icgshehTgYrztwG+GLjKhYFp pBy9fzYeDf5VgLcHyBF4y5s8aJlPXib5RcX327uwNDiIlnMJGrnDFkBrFnTkNrXG9isd b2eneETAf5NvesTrJFcfXfeV4TMzR5Eku2lTNEWrba7UhA55nu+oG3I4KXipafw+7Mga Jigg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701089796; x=1701694596; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=OIYOB2eU2H+bluz3T89WDZtEixLUpIjEWJSjNBKPfQM=; b=so4NtKuz/uHYomd5Q6liIZknKzVCqbNnipg6fT0n3pOKrmuotK9yla9cKok/mNpQzO mCnYU1hVRwc8CD97Rdvi72TxoUhBLGPuxUH4n/4bv/eLTH3QiHQZaAqlG9d/o6C59yms 3lrXtYiAm3kvr21l3mMX8rMqwmWy/rZw97yIy7lEvo7Fbd33cKkslHRTwCj9CtDhTDQS ppxuiVtyhrJWWSNHU0Vfjb6kEdSTYZsAe3KtcEk9KMAheySc1uIB+51EnAhY8E/94u4X lHyFXiGLC+qAj3XoX3urAwREaL8VUwfe+LBCudfOjrS+sabwqPiPBPWM4aBv5vcubH5m 5xqw== X-Gm-Message-State: AOJu0YwtPXJ2PXAj2q3Q/fUJZ4IiCdGSGifPhXhiAo6k8hfKi9TLE9lo X3k8z6Kjja3u2QM8YFxretyiFw== X-Received: by 2002:a05:600c:45cf:b0:3f6:58ad:ed85 with SMTP id s15-20020a05600c45cf00b003f658aded85mr8311151wmo.10.1701089796257; Mon, 27 Nov 2023 04:56:36 -0800 (PST) Received: from localhost ([102.36.222.112]) by smtp.gmail.com with ESMTPSA id z15-20020a05600c220f00b003fe1fe56202sm13576241wml.33.2023.11.27.04.56.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 04:56:36 -0800 (PST) Date: Mon, 27 Nov 2023 15:56:33 +0300 From: Dan Carpenter <dan.carpenter@linaro.org> To: Karol Herbst <kherbst@redhat.com> Cc: Lyude Paul <lyude@redhat.com>, Danilo Krummrich <dakr@redhat.com>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>, Dave Airlie <airlied@redhat.com>, dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] nouveau/gsp/r535: remove a stray unlock in r535_gsp_rpc_send() Message-ID: <a0293812-c05d-45f0-a535-3f24fe582c02@moroto.mountain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Mailer: git-send-email haha only kidding X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 27 Nov 2023 04:56:49 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783721949915885562 X-GMAIL-MSGID: 1783721949915885562 |
Series |
nouveau/gsp/r535: remove a stray unlock in r535_gsp_rpc_send()
|
|
Commit Message
Dan Carpenter
Nov. 27, 2023, 12:56 p.m. UTC
This unlock doesn't belong here and it leads to a double unlock in
the caller, r535_gsp_rpc_push().
Fixes: 176fdcbddfd2 ("drm/nouveau/gsp/r535: add support for booting GSP-RM")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
Comments
On Mon, 2023-11-27 at 15:56 +0300, Dan Carpenter wrote: > This unlock doesn't belong here and it leads to a double unlock in > the caller, r535_gsp_rpc_push(). > > Fixes: 176fdcbddfd2 ("drm/nouveau/gsp/r535: add support for booting GSP- > RM") > Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Nice catch! Reviewed-by: Timur Tabi <ttabi@nvidia.com>
On 11/27/23 13:56, Dan Carpenter wrote: > This unlock doesn't belong here and it leads to a double unlock in > the caller, r535_gsp_rpc_push(). > > Fixes: 176fdcbddfd2 ("drm/nouveau/gsp/r535: add support for booting GSP-RM") > Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Good catch - applied to drm-misc-fixes. - Danilo > --- > drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c > index dc44f5c7833f..818e5c73b7a6 100644 > --- a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c > +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c > @@ -365,10 +365,8 @@ r535_gsp_rpc_send(struct nvkm_gsp *gsp, void *argv, bool wait, u32 repc) > } > > ret = r535_gsp_cmdq_push(gsp, rpc); > - if (ret) { > - mutex_unlock(&gsp->cmdq.mutex); > + if (ret) > return ERR_PTR(ret); > - } > > if (wait) { > msg = r535_gsp_msg_recv(gsp, fn, repc);
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c index dc44f5c7833f..818e5c73b7a6 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c @@ -365,10 +365,8 @@ r535_gsp_rpc_send(struct nvkm_gsp *gsp, void *argv, bool wait, u32 repc) } ret = r535_gsp_cmdq_push(gsp, rpc); - if (ret) { - mutex_unlock(&gsp->cmdq.mutex); + if (ret) return ERR_PTR(ret); - } if (wait) { msg = r535_gsp_msg_recv(gsp, fn, repc);