From patchwork Mon Nov 18 18:52:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 179598 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp3271116ilf; Mon, 18 Nov 2019 10:52:16 -0800 (PST) X-Google-Smtp-Source: APXvYqz6fWUoXVGcDkV54semxApDfWTqM+4VDSbcH9txUdJDnh1ujHys4SSQBWXP2UQG6rxQwzsq X-Received: by 2002:a17:906:8606:: with SMTP id o6mr29350901ejx.202.1574103136437; Mon, 18 Nov 2019 10:52:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574103136; cv=none; d=google.com; s=arc-20160816; b=DLmwukeg4h5OOCSg721wwD9S/0y8xAXtSno5uF09CTBc645UFyqNSTjrcTyEQztvg5 8Z9lVStS13yec4lTjHaUw2nof16JG9XDzglDbCQBOoVBidkgVOx23XF6sWyiuI6Ji9E2 cAaEJarWEbGoz3KdIlu3D1yo81m6J0nJ9pDlMKB77EfDzZIirr5oCnqw8QJIVa7QHImv 96KkEGOmBTKQ1yd0Xrl+cfjosOhzTFuRsCP7fTOO1NjOHmhP4S3DvgJ0N9D0Er9+sVV+ Azv6x9nBxj03hP4rx50HoeUySzqcO9x2xDurkowezwEZYp1I08ptPShc0UqDhaHW7em+ yq2Q== 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=GvV8oaMdUFkbGSdHfV8pM7qcL93fKWfHHP3kuX4k8Dc=; b=0GXii60w08sq66GgdcYvnVH6Sj/gWSfEo9cK3yA6Io6vvpFGO3pZxNPPkC972/dwoW XXje0HFRHl+VZRv0QUHEEZ83S7ygDVsESR4ULBEPf7LSffsEFSJCXMrw8d+Xirr5Eq1f d0idY4ClBfIMYzdggjLbsKWsSDLKtok3oB/9hnxe/B4ralXXz4b9zuLjKhXBXMcOF6T1 TXnMSg/m6wvSgjMsPsZvi9PF1v7OYUBRlhlVOkdcnF3xDNJChAPHZCKcQUNsupxGHB+m LkFNyKBkE8hjmQVrIBv78mjMi3oGLOrsjrDjLVhGpmR5coE60GSCAmGmcDPr3StILJuo JINg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Xy3llRtk; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g6si14085919eda.377.2019.11.18.10.52.16; Mon, 18 Nov 2019 10:52:16 -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; dkim=pass header.i=@linaro.org header.s=google header.b=Xy3llRtk; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726691AbfKRSwL (ORCPT + 26 others); Mon, 18 Nov 2019 13:52:11 -0500 Received: from mail-pf1-f193.google.com ([209.85.210.193]:34331 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726370AbfKRSwL (ORCPT ); Mon, 18 Nov 2019 13:52:11 -0500 Received: by mail-pf1-f193.google.com with SMTP id n13so10822304pff.1 for ; Mon, 18 Nov 2019 10:52:10 -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; bh=GvV8oaMdUFkbGSdHfV8pM7qcL93fKWfHHP3kuX4k8Dc=; b=Xy3llRtkMWbJAqF37pj7ZbvTW5JPx0TK6JCyO/kUFREaNtf9yL7z+DnF1CFd87jF+A Ix8V5NDls+qIdu5roV8yAcJSQKjAaYD2orEGxYLdJ5XkLG+/f1Qe/4qkPSksksyUc+jv FiDl5EmYCJpfFyUBYj1zYpfSGgtVruXJdlPc07cULx88xll8/infS8udX7sIQQyWZwon cOXhi6jbP58g//iBmc75C1zYKKTFlDop1xk5ieCBcU4tIq5hGdoCsEZAiyU9w7LY0BDY rvRVgOUOtH9buQ55eygh+a107ECd+Zkg6twvPeXdahlRIV88/KAzF9h9kvJ2HI0ZibkJ i2fw== 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; bh=GvV8oaMdUFkbGSdHfV8pM7qcL93fKWfHHP3kuX4k8Dc=; b=LLCREHK9HEQXtwhaXC1jzEmsCAVGE5FflxA17YNewgn2MQfMom8awvVBtnD/nTARUI yI+YH3DRZpfMeMAMVKzxUA5uE1L2QajsU7hxbMrq4lsid1Dz2sGt4carBUfdTxai6kO5 ICJKGHthiDfNZNJEzHBCNxPCP75r0kWc6/0Q48+DG4d2MAvDQYqt1kKxRgc7j8Wcj2yJ ZTGxKQhzvJdzC1FKsj/RNLiROnvQ/1s+8Gtz1Gt8O9j0mcXnTNBkkcA5ew7z6QbNS1nT qNtLoJhmcL9OpqcGGQ3M6nSk/fwO8HwWFl6FZC16dkgjnFo/N83AAa5HFaYa45pOYvIg ySCQ== X-Gm-Message-State: APjAAAW+fJsaXMRPqINIFFmmRlSQ2GQhUzS2ZHLS0Z6/3uWEONBC3znb wzCTL2l9SlX8w6KXNXlhBpVN7Q== X-Received: by 2002:a63:201b:: with SMTP id g27mr866907pgg.56.1574103130166; Mon, 18 Nov 2019 10:52:10 -0800 (PST) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id r10sm19878910pgn.68.2019.11.18.10.52.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2019 10:52:09 -0800 (PST) From: Mathieu Poirier To: gregkh@linuxfoundation.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] coresight: funnel: Fix missing spin_lock_init() Date: Mon, 18 Nov 2019 11:52:06 -0700 Message-Id: <20191118185207.30441-2-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191118185207.30441-1-mathieu.poirier@linaro.org> References: <20191118185207.30441-1-mathieu.poirier@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wei Yongjun 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. Signed-off-by: Wei Yongjun Tested-by: Yabin Cui Signed-off-by: Mathieu Poirier --- drivers/hwtracing/coresight/coresight-funnel.c | 1 + 1 file changed, 1 insertion(+) -- 2.17.1 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;