Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp497169ybx; Wed, 6 Nov 2019 04:04:27 -0800 (PST) X-Google-Smtp-Source: APXvYqz8glLdsP+Xe8cSaVmLpGYIKL05bwp+raneTZVLE3ukRftuKJLkxLWxOgw7eno98swTLcTG X-Received: by 2002:a17:906:1395:: with SMTP id f21mr20561198ejc.152.1573041867081; Wed, 06 Nov 2019 04:04:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573041867; cv=none; d=google.com; s=arc-20160816; b=E2LERK3dRmdiRGDchVl06vI6CDg5V/RUvVI3iEXr8FqMgvuGlvnUEEmUC7dg2KvAGy ntHOgJWBdEhmkiKtR6kFpEuVfo3npFjSCYgIsXLGgUgpTDIIKXosnHJLQKEb4FzASnlx FBlIy50IQBQCFDFfoRVo8Q2STWVMz1FIsT3Oqe4mflPL2kh2QrWxv+CgVJhJTlKGmOtL 6kShkbRzpS55sL30wNtkNblP9hFtCkTNnLkL8iz7aX0LtWBlV5BlDjplkn+Smb6cWUNS hmZFuShJcj/rPbbTsnZaXsv/Pzf2evgQlDAkq+4UD7Y+Wa+oScKZ1EtO1t8cUL+EV/vs PkIQ== 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 :message-id:date:subject:cc:to:from; bh=lciDsxHbJDae2YcTfk75IvJVpLLfo959pkDXNum9WvA=; b=VMj3fcEs5ykr83Dit5qDCXQ9y6CZGlvKLD+a7wxfva7vpMNcjOosiqiEvLccHZMIWq 4N3ciBA75URzsiTm8iE5QvLS49O/cDtY8UIRlCC2yDv/8Ts4xvPHx1E7LoY9gMERKl5y 5XnUjkfhfbdMZoxfy5fsZKyo20RS04Yzj01qL87DRlU+DdlPp9rFEkjrR+smblATqJ65 c9nGtOQ3ePhRuNSWn/E5hbB1mH92Efy8kChQizV1XDdhR4Ek0O2A/RvG1N6NkMwXFA4v kb5Uk5JNMN6WDjduRt8q04V+GRheSMZPA5Rkevz1LAPMC97/6UryKh9Ws0EEiLRkumkb FiNA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id me8si5517352ejb.382.2019.11.06.04.04.03; Wed, 06 Nov 2019 04:04:27 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730233AbfKFMBU (ORCPT + 99 others); Wed, 6 Nov 2019 07:01:20 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:47544 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728550AbfKFMBU (ORCPT ); Wed, 6 Nov 2019 07:01:20 -0500 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id E76BAB703EE466FD6D42; Wed, 6 Nov 2019 20:01:16 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.439.0; Wed, 6 Nov 2019 20:01:06 +0800 From: Wei Yongjun To: Mathieu Poirier , Suzuki K Poulose , Alexander Shishkin , Yabin Cui CC: Wei Yongjun , , , Subject: [PATCH -next] coresight: funnel: Fix missing spin_lock_init() Date: Wed, 6 Nov 2019 12:00:21 +0000 Message-ID: <20191106120021.115200-1-weiyongjun1@huawei.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The driver allocates the spinlock but not initialize it. Use spin_lock_init() on it to initialize it correctly. This is detected by Coccinelle semantic patch. Fixes: 0093875ad129 ("coresight: Serialize enabling/disabling a link device.") Signed-off-by: Wei Yongjun --- drivers/hwtracing/coresight/coresight-funnel.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/hwtracing/coresight/coresight-funnel.c b/drivers/hwtracing/coresight/coresight-funnel.c index b605889b507a..900690a9f7f0 100644 --- a/drivers/hwtracing/coresight/coresight-funnel.c +++ b/drivers/hwtracing/coresight/coresight-funnel.c @@ -253,6 +253,7 @@ static int funnel_probe(struct device *dev, struct resource *res) } dev->platform_data = pdata; + spin_lock_init(&drvdata->spinlock); desc.type = CORESIGHT_DEV_TYPE_LINK; desc.subtype.link_subtype = CORESIGHT_DEV_SUBTYPE_LINK_MERG; desc.ops = &funnel_cs_ops;