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; From patchwork Mon Nov 18 18:52:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 179599 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp3271134ilf; Mon, 18 Nov 2019 10:52:17 -0800 (PST) X-Google-Smtp-Source: APXvYqxPV4C4L+ENlgN3VKhQt6zMaeWo8RyZD79H01zc/A/Eu1E24C4JtBG9zjwvZs6I63LlJu/u X-Received: by 2002:adf:de86:: with SMTP id w6mr32054152wrl.220.1574103136949; 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=C5E21kifmUJbusWQhvrsUMFSu0y1QWLnK8s2asxvooK8N2lqmHe3Ou2jbSHVlk20+x hgxGYZzFJW9umzvzhZNYZGtZgat2ZVt05iMlxNIdFYm5uqxhPwRFw5maAaOMFCB+tyUY lwxujgxUrMCo4645BDzS1kAsBtsid8vySmZ6Qkj0OW+ZO6Ats6/xtd708JjI3itWNOA6 vyWnXNQ1KTt3c9RAxxiPpvfCtLpa8NJnTLJLFqYu9hfLr2gEXCRadb7/QTcWW7m6MIQh OJIm8TsKW+HOkaoqxECFPLeU/56exFKvayMqFEz1dDNERaPJI2U+0ykaxs3uY1x7raVi b2lg== 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=uSTPqpXCkdIz0Ys9ZLE2MJ6RpXCWxgbm8ltsUhdFuaA=; b=WFrBNT1uaNKvzW6Tu62VRrJrOytPbJlESLv4UOgqiqLC6wyP2ZM9lmKu9Y7C1my169 gnEtZPiTHPTSl4MGV+utPyr35mqN9jIrnMOxe3mbqHJzOhJr4zb26DfMBm9iGy5gW1aU KqsYc/lgSFRm8DhpDwCzP3+57k0plalNAlYdYU4/fugzRQ3hIcSlxBQYfDf5K2u/KRws ttUnF9Uf1oEeNQHvePnTAfssoXDfTf1r4p9FEwLXCmpfZ7ruZRAfNGuESP52p/+ksOl0 vlDQHlAnr08OQZhQgFWP4U6idb7WUXxZzqzaOjToAv4S+1YIfv2a7DIeYHCBsq3RgxV+ g5tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=X2Qv3IxF; 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=X2Qv3IxF; 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 S1726721AbfKRSwO (ORCPT + 26 others); Mon, 18 Nov 2019 13:52:14 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:38997 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726370AbfKRSwM (ORCPT ); Mon, 18 Nov 2019 13:52:12 -0500 Received: by mail-pl1-f196.google.com with SMTP id o9so10276074plk.6 for ; Mon, 18 Nov 2019 10:52:12 -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=uSTPqpXCkdIz0Ys9ZLE2MJ6RpXCWxgbm8ltsUhdFuaA=; b=X2Qv3IxFUWevF27cjY8aXXrQI2siYVe73dYgkiMeUtD/JEU7etfRh0B7TwpGyJ4dG6 jy0fqJ/P9lbHqOib0wPfWSFcfjZVDpP7MWNTjayCixoBsM55AtghsA8jB2GsDcvQOZi0 Us6IssUiDvQAGIkruSf/mIDKvpH+JaKyL13YjPV2CI6+Sb+IFf22B9AbrdOhh+f2VfQU x5Ky+GqrN4UPOKZu7xBcsGsGNtsH0j1aHNS9G6wpjVzMc9usP1PIdfmNuFn8nYUz6pDL m19ojjf5y5iB2iDEXA61IiX8bUDRh0lvu1letC5Lej5L0ZaDvofGQDca93txuvzzp+1K zp6g== 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=uSTPqpXCkdIz0Ys9ZLE2MJ6RpXCWxgbm8ltsUhdFuaA=; b=FddRXBbYUUAMssq30+i3704H95kXKYHdVxD9HKVel/paxW6TWU5+0I7v8ejMS64FCE F3QoyC4o1doZQERWZhMnUT/PVPJvWvV42GT0nP9agZBd0f76dfys1T/8GyUSeLd2kguj 94Og3u9nTa8/VV7y9ZDknKnFeosyKG8C36hiW2/xYtkNu28QfgNG2HvNW2VtS2ZkS/JM Iumi8x6YOVIfh6jk4iO9+RBasjcQOiA3otDUNHujQg1ISN25TfwcQ7/FwwYz88/wgKZi Ldr5IdcKM64S5hvpvHhjTNYA7k6LQbp6TctHH7gaFPZG2DolywdNK0k/A5Hsrs4G4XCV s7FA== X-Gm-Message-State: APjAAAW/8y9ZuAinJ5xNerWvTbS7ycAjybnFbOXgtB2zVc/8CmwM/DyT Ve6poN7OKLolsbiTdey/AQiY/G9W9oo= X-Received: by 2002:a17:902:9a04:: with SMTP id v4mr4924119plp.192.1574103131601; Mon, 18 Nov 2019 10:52:11 -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.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2019 10:52:10 -0800 (PST) From: Mathieu Poirier To: gregkh@linuxfoundation.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] coresight: replicator: Fix missing spin_lock_init() Date: Mon, 18 Nov 2019 11:52:07 -0700 Message-Id: <20191118185207.30441-3-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-replicator.c | 1 + 1 file changed, 1 insertion(+) -- 2.17.1 diff --git a/drivers/hwtracing/coresight/coresight-replicator.c b/drivers/hwtracing/coresight/coresight-replicator.c index 43304196a1a6..e7dc1c31d20d 100644 --- a/drivers/hwtracing/coresight/coresight-replicator.c +++ b/drivers/hwtracing/coresight/coresight-replicator.c @@ -248,6 +248,7 @@ static int replicator_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_SPLIT; desc.ops = &replicator_cs_ops;