Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp892581ybx; Wed, 30 Oct 2019 06:49:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqwVbTNsOlFc4vnYo6N9F9UCOgvcmq8FKKzsHfzxJi4IPhTzwL0us2Ixe1u3F/fPtDotI2Z+ X-Received: by 2002:aa7:cad5:: with SMTP id l21mr2869241edt.131.1572443382564; Wed, 30 Oct 2019 06:49:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572443382; cv=none; d=google.com; s=arc-20160816; b=sn0/EL16W9Yy3uK/9SCONOGr8gr5air6p8HoXhKHYxPoC5Z/E/J2RDQF7Flck9/EwG AF5hJc23uoyc224n6cb2gzbD9lB/kc8rj1MfYD1u30wP5lxtvrm1DFVOabxCVKjZrNAg /yGRmN7yrHxIaEccVMwassCV4POtMiw173FdDu7PDB+V27qxEOD4ZiOwF521E5X4ztmF r0il8JsyNM/xdEr5TZMZRLESiqcRha80BOsT6TTqmp/7/3K0t1lndXB+ZKUNJX7vFKbc tCDsHxct9NqkfDt4vXqQ03LDdXQHS7Z4Oqwe/orJCJgCpJm+MYPGcPg2hCJ/mi98vvzV OyFQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=fRJJKZ8Oy+cuW9lnn1Oog07ZbZtEyX2mediIuK7q/Lw=; b=wwtCVT00No1Tc2ndywXU90z0KRA3OPwYe6kRrZBuWLIYJ2CpkVRS5p0QAdEVyaqC4G 37n8ITynBwo3dFkSSpIh72RKLkGF9frK2b/pDNTG38fLri/V2k9VTHENrRsAqHqYzISG yq7w0aoM4KGhClGWhA9C04/6EcIYPTlZKnSsL4yVhjyAh9oyy1UMiN9DzbceVgllEPxG n14twWF+ka6B8WTENwbVjx0ajiH6YbvwsMvI7f2Tosr9lE/Ks5MUjywkRIoOqQyMlnBo Mo5ULiNGmlSqdxuataERB2yTit7CfIrCOfrkwgxaO5ucYK8a63GgVZ+bfpnbKEQwpvj2 koXw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z24si1329427eju.50.2019.10.30.06.49.19; Wed, 30 Oct 2019 06:49:42 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726589AbfJ3Nr6 (ORCPT + 99 others); Wed, 30 Oct 2019 09:47:58 -0400 Received: from mga17.intel.com ([192.55.52.151]:28792 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726206AbfJ3Nr5 (ORCPT ); Wed, 30 Oct 2019 09:47:57 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Oct 2019 06:47:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,247,1569308400"; d="scan'208";a="190281925" Received: from black.fi.intel.com (HELO black.fi.intel.com.) ([10.237.72.28]) by orsmga007.jf.intel.com with ESMTP; 30 Oct 2019 06:47:36 -0700 From: Alexander Shishkin To: Peter Zijlstra Cc: Arnaldo Carvalho de Melo , Ingo Molnar , linux-kernel@vger.kernel.org, Alexander Shishkin Subject: [PATCH 1/2] perf: Reattach a misplaced comment Date: Wed, 30 Oct 2019 15:47:30 +0200 Message-Id: <20191030134731.5437-2-alexander.shishkin@linux.intel.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191030134731.5437-1-alexander.shishkin@linux.intel.com> References: <20191030134731.5437-1-alexander.shishkin@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A comment is in a wrong place in perf_event_create_kernel_counter(). Fix that. Signed-off-by: Alexander Shishkin --- kernel/events/core.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/kernel/events/core.c b/kernel/events/core.c index cfd89b4a02d8..d2f16546a2ab 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -11415,10 +11415,6 @@ perf_event_create_kernel_counter(struct perf_event_attr *attr, int cpu, struct perf_event *event; int err; - /* - * Get the target context (task or percpu): - */ - event = perf_event_alloc(attr, cpu, task, NULL, NULL, overflow_handler, context, -1); if (IS_ERR(event)) { @@ -11429,6 +11425,9 @@ perf_event_create_kernel_counter(struct perf_event_attr *attr, int cpu, /* Mark owner so we could distinguish it from user events. */ event->owner = TASK_TOMBSTONE; + /* + * Get the target context (task or percpu): + */ ctx = find_get_context(event->pmu, task, event); if (IS_ERR(ctx)) { err = PTR_ERR(ctx); -- 2.23.0