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;