From patchwork Mon Jan 14 13:44:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 155506 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3674749jaa; Mon, 14 Jan 2019 05:46:01 -0800 (PST) X-Google-Smtp-Source: ALg8bN5jVjR+6N8F1q7BBRJh9aueP5Zj/EK+rdTKNXoBkg5PRp1dVNqAB8L6sU4e1R6cgF0rK09D X-Received: by 2002:a63:ef04:: with SMTP id u4mr23078291pgh.197.1547473561648; Mon, 14 Jan 2019 05:46:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547473561; cv=none; d=google.com; s=arc-20160816; b=wQmN9i7eIP9PfwEvJMSsfZfIW+gGoJDMYCWCX8cxg4hmWW/8sJEnCveuI2eo4qIrgG W5yTCvGCnnYeKixMweyQn+QYnsAeNC8/vinuZLMfs7jSc55JS1IXdrwOVmkyjIEufmr2 QTtGXZlBPknK2bXl/DM+nf0oPzwqxx+/SvWxxZRbw0GUCCKeyoCefp0rj9PDJv1nLqV3 PKXh0m6ayglN6OtFH2t+Yfy5ZNP/iIjtCX3eD5GWsa84BSXfgulnuWjyaYGF7p3gVjlT lnsWJ7WZZsIHB/bZNr7iPfBoA2gyhyfBKnatQG+zlBC+JOKKYLBxsUM4VO1TwD6dxDhk cMFg== 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=wcq/BZjA1FXBmfYxzVF9/4lLVBugXEKEif9lDq84KTU=; b=FokPBBuJ0LCqJlXquu1BOtfzfCky/rNOoFKiKv+5ZZl7TlvfA65AlDMjxYvAiN7l+l JMrYqui0OrzFDffI0NiK8yAsemSnvdrTyj8re8U1+68KWjKHfJOKK7qDyar61mX/ssnf V4snjoO8TryioD98HyuCpEed+BrYOOgDx1V5M5cQfIALpOsPT2yc7OEGGl77amMVk04q 0Xs5oT/kOpIF6inmCrrMSjD+q0lFkUOhtgGMRvxmlPjHaynZB2CvRLmQ86D9m0ZoAFrR mBLozkuZswszrpzxCVFvh6Z1hdctKKh+FU0penR+cs7eEpFZJ57ySHy3sQf0ZB6LDA0r 5nqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WYgKve76; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j21si361875pll.150.2019.01.14.05.46.01; Mon, 14 Jan 2019 05:46:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-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=@linaro.org header.s=google header.b=WYgKve76; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726656AbfANNqA (ORCPT + 15 others); Mon, 14 Jan 2019 08:46:00 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:36375 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726598AbfANNp6 (ORCPT ); Mon, 14 Jan 2019 08:45:58 -0500 Received: by mail-wm1-f65.google.com with SMTP id p6so8889909wmc.1 for ; Mon, 14 Jan 2019 05:45:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wcq/BZjA1FXBmfYxzVF9/4lLVBugXEKEif9lDq84KTU=; b=WYgKve76AQapL96P//w9NBFMjzVpCPuV8TxBk81O+FXe5c9IK/zBEFrQmR4S2O09UR 6OqbSicCV3seQTILK21YiaU4XHBsbTV82pUDQjCB5AObNHnfxuBde8YbBvoZBhRgVhnw xberplgt88Z4je80I8tlQZ7v7o2XE7iOFxMTY= 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=wcq/BZjA1FXBmfYxzVF9/4lLVBugXEKEif9lDq84KTU=; b=ZoGflbn0B8DWIuEfPpgqp7kJiNcJwwllhxRZ0fS5qLSgvNZSTxFyh/iPRSO4GbrYRY /dKC9MPuN4rSo+12cv62OkF/baZIEEuzVsC729+rJxeepF3SnnigH4Jo0kGNwvNJbJhH 5FM8RpeNjDKAid02CStMRllBq3qqIP0jUWTlphda4HdVXlw+9pMnYL7zYOY7fO3jp2O8 Pt+aHOBqg9Mcf8hMjV6akYXrXTTDNk63CqR/DSq4RlCVoHm3/XtI9+fLm+s1ShWksi9w q8U5Hw4jmcQsTIwfdMX4d2Woes4TmPVJN98lR5ZqHroteQ8iLuw6rQHtIqOJ7moK5o6b 4j6Q== X-Gm-Message-State: AJcUukc/KV4Ibcgbya+H85+bgWrAEOdibmJpMcoYDNcKRSPJOYEfpGSJ GdKlezlLAFrtCNej2nvFWbE21A== X-Received: by 2002:a1c:bdc5:: with SMTP id n188mr12588988wmf.69.1547473556520; Mon, 14 Jan 2019 05:45:56 -0800 (PST) Received: from srini-hackbox.lan (cpc89974-aztw32-2-0-cust43.18-1.cable.virginm.net. [86.30.250.44]) by smtp.gmail.com with ESMTPSA id x10sm86766472wrn.29.2019.01.14.05.45.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 14 Jan 2019 05:45:55 -0800 (PST) From: Srinivas Kandagatla To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, broonie@kernel.org, linux-arm-msm@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH 2/4] slimbus: core: do not call device_status under a lock Date: Mon, 14 Jan 2019 13:44:47 +0000 Message-Id: <20190114134449.15367-3-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190114134449.15367-1-srinivas.kandagatla@linaro.org> References: <20190114134449.15367-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Calling device_status callback under a lock would prevent drivers to do any slimbus trasactions which would invoke this lock like get_laddr(). Remove this unnecessary lock! Signed-off-by: Srinivas Kandagatla --- drivers/slimbus/core.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.20.1 diff --git a/drivers/slimbus/core.c b/drivers/slimbus/core.c index 9e4f3b21ba8c..1ba08b5f2e78 100644 --- a/drivers/slimbus/core.c +++ b/drivers/slimbus/core.c @@ -466,6 +466,7 @@ static int slim_device_alloc_laddr(struct slim_device *sbdev, sbdev->laddr = laddr; sbdev->is_laddr_valid = true; + mutex_unlock(&ctrl->lock); slim_device_update_status(sbdev, SLIM_DEVICE_STATUS_UP); @@ -473,6 +474,8 @@ static int slim_device_alloc_laddr(struct slim_device *sbdev, laddr, sbdev->e_addr.manf_id, sbdev->e_addr.prod_code, sbdev->e_addr.dev_index, sbdev->e_addr.instance); + return 0; + err: mutex_unlock(&ctrl->lock); return ret;