Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp1357185ybx; Thu, 7 Nov 2019 10:50:42 -0800 (PST) X-Google-Smtp-Source: APXvYqwWvN9wiUkgPlyh3V28go6f+faKkfQZ0TKW8ouCtxcFmmuJeA9MT1VirlF8oY/bOxiUTTwA X-Received: by 2002:a17:907:384:: with SMTP id ss4mr2559581ejb.132.1573152642409; Thu, 07 Nov 2019 10:50:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573152642; cv=none; d=google.com; s=arc-20160816; b=VVIEVm2XYGe4W6dOqRwly6fbI08/Uj96C7AIpW1TcNTyPiiixrFdNQD0rCCf5WFwC2 o7VYZtOQMDSV0QMZPjjDkTOkB9Z7ootCGVIkiXu3zCUWPfLUbP41UmOs3piRwYciV+gw 5Jz1LMTumJKdbfZgTsOtFB0CNlbRjqdHyuoRgXJ2YO6M4VMqIzzawZNlef0uVzAtDXr9 JgEilQAmdr/vLeeX3sv32iySTNBShyBHv5Z9xDnQ01NB6ZArELMhSnaZAIvt27Wiqv9W M/8jcGAZFd2fYjCtfLcmBAXu3SUZYq+Y2HYuOXHG28EtuOErsqo5JBp7KXibqY1QOYhM HdLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=LlH/emK43X7VQlux0XjazW6nVpP1+OhxUnqAKnN/vBs=; b=LBH9Yk5eWmuQtsw96DSmcVDoS/U0fpSL5wKGsVqvKUMHGuzb2EK8VMopD0wVuBLVo/ DTIcwWDBswj5B4uHp/y2Z2xgpuHl0donqBAL7IJBQkKudpKAiGHpEn7uIBk2aYyv5ryk CyPlfThM5H0/5GfczAH+Gs3A1BnmNQg1k/wbVCQUqibBXV4NpOR2u9L3WMTbB+3cxKjv /M/l6jjWQiEsYC7jf4EqSN2o9s7HzAZNt0Yyi59BbMPSFYiWTRNNlyI4k0hHahdchAVG evvJ9hZ1lvLx/v2YNp0pw2QQvO9ZqxJYCG1HNZIy6TeV/WjdvVhABVMK84v/GN0i57jw MO/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JEB1F12i; 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 v4si2148247edm.299.2019.11.07.10.50.17; Thu, 07 Nov 2019 10:50:42 -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=JEB1F12i; 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 S1727030AbfKGSrX (ORCPT + 99 others); Thu, 7 Nov 2019 13:47:23 -0500 Received: from mail-il1-f196.google.com ([209.85.166.196]:45067 "EHLO mail-il1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725883AbfKGSrX (ORCPT ); Thu, 7 Nov 2019 13:47:23 -0500 Received: by mail-il1-f196.google.com with SMTP id o18so2744339ils.12 for ; Thu, 07 Nov 2019 10:47:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LlH/emK43X7VQlux0XjazW6nVpP1+OhxUnqAKnN/vBs=; b=JEB1F12iTYfjJYno9PiUHEyIvfvFi+cWQhuSPBKHPuy1ugZuXn4+uxYA3Ey4McDqlF PvDtJzEOxJSnnwrAitdgUXRRfeq3SlbXPFIE6k67sa3xWjywqkMIXl2xZ9MziBmUPsAl QX+sIqfsd0HwsZoDRs/WK9nqC6eBfcG0Vm9gLGk8eQg56BI/CqY5tritxhJkvt3pb2a5 uCR5rJtp8GXjIT4bMlrgdU4gghxt2xZNnrZRtp0lqc0S4lQ5JDbicq98gKRi039be6sD LumACIvxVvtdh2nbwrwLoZJm2SfXnunI5xJzIHARQGFZ8A8Qw0M/nwMrX0Oah7XPbLBt FE8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LlH/emK43X7VQlux0XjazW6nVpP1+OhxUnqAKnN/vBs=; b=mOacFJ5rDo2iB0VYaw/4BWky0i+j1mzmgX9dPxKrETulzAbkGVbE9IyK0b+l4LQoUF CLptwjldOimejnbBOtZAcm2lQL6lDnhsevgB2tLwurXqSKAIf8T4oetZgbzZ7leLtlGE DFkliAra1x53BzfvQPgt847KknpKj/xQxxETY8fDcPCsRoSz9GNuzpAlqmanUX7bvEpe Fc5Y7uv2MavcjhiWcfc4gU7yru1hdw1t6nE54To77lVutUCVlQCD/x23ij7kkxQ8vQle 8jAbMoI/jYq2t70Wi989Te63hwGwBAkDzFE0mznP25qQhvInB0shiSBMrVhw2RyQxmWw GP8Q== X-Gm-Message-State: APjAAAW7KfxZBk3JYFOtluY4iiw5zCwF2KQjVlHvawNQHIuS9rytx0t/ SY89/QAxV/eCBzI/UDYdf+C+RyfXyXRAeZHoz4KusQ== X-Received: by 2002:a92:350a:: with SMTP id c10mr6317836ila.140.1573152441970; Thu, 07 Nov 2019 10:47:21 -0800 (PST) MIME-Version: 1.0 References: <20191106115651.113943-1-weiyongjun1@huawei.com> In-Reply-To: <20191106115651.113943-1-weiyongjun1@huawei.com> From: Mathieu Poirier Date: Thu, 7 Nov 2019 11:47:11 -0700 Message-ID: Subject: Re: [PATCH -next] coresight: replicator: Fix missing spin_lock_init() To: Wei Yongjun Cc: Suzuki K Poulose , Alexander Shishkin , Yabin Cui , linux-arm-kernel , Linux Kernel Mailing List , kernel-janitors@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 6 Nov 2019 at 04:57, Wei Yongjun wrote: > > 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-replicator.c | 1 + > 1 file changed, 1 insertion(+) > > 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); I have applied both patches but removed the "Fixes" line since the commit is only visible in my local coresight next tree. Thanks, Mathieu > desc.type = CORESIGHT_DEV_TYPE_LINK; > desc.subtype.link_subtype = CORESIGHT_DEV_SUBTYPE_LINK_SPLIT; > desc.ops = &replicator_cs_ops; > > >