Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp753569ybb; Fri, 3 Apr 2020 11:10:30 -0700 (PDT) X-Google-Smtp-Source: APiQypKi6aVzZ5UPh4DNalQ66fZiz/cCyI9Dn8pCdahg4h5K0Na8KCykvqLMFjk6olotm0vw1bja X-Received: by 2002:a05:6830:1f39:: with SMTP id e25mr7651715oth.135.1585937430717; Fri, 03 Apr 2020 11:10:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585937430; cv=none; d=google.com; s=arc-20160816; b=OBd+uO7RlaXYE+xrJGRtlUXMKupKN3x2/9hX2QpWgLsW2KBWhJyTViZNjOXMtQtwjQ +0qUaeoUjz7QxoaLty07bF4se0MaWDNRWQK2ahrk1cQOpeUdH7540/OdJE4cNxzTtKSK qB0CzJF0esn+axx7jx1qGbdCnfNoeYiPz0OEn5dNtC33/arGfU8nX6tLxeO64a5be0Mu i5s3wTr9zSnZuDP7633JD5P8+fP0sDjDcNVhPKOoCBhgaNBwXaOk/t9fL8Ewev0e1jQq 4w/cu2CB4XMCxeGsBcI56Sw6BL+V4BLvhEqsUwqzpIK7PvaLT4pOwmvG/vfjSYDISIjt jVjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:mime-version :message-id:date:dkim-signature; bh=vKSRcwOgSxpovOTlIQ2GGXc7undTikgLR4vPeODvBEg=; b=jYf/xQGi7trGyLtEvwVbtNwGI8amo2Ea0KLE0RW2WtdSNIdcY5IS0kLucDpk8yJ9W/ Hb+IJwCcmG7waUY86xVGDJH48HWpZNr1ksU/xJ3mGJjM8kIfDXhiHmBYrBCK9vr+aBe5 1/HkuJY8sYdMFTeQxDMEpiFRfBHjyebC5yHklqZfUfCqe+H9Ztm8VgBw3FRx6L9aO/qx s9X1kJ/lcE93hZqxPVy7cNXmKeNggiTFH4T21WOt/ouox516gJ73OnK8KLkHwP/U8Q6x IxhNPHOkrtSpnjzNESMIU7/HKM7jHxolRGQf+VBQryuO/yqOSq7gdweq6OZlLCVvcBgG X8iA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=EAdVcQMf; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u25si4424262otg.199.2020.04.03.11.10.17; Fri, 03 Apr 2020 11:10:30 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=EAdVcQMf; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404622AbgDCSIP (ORCPT + 99 others); Fri, 3 Apr 2020 14:08:15 -0400 Received: from mail-qk1-f202.google.com ([209.85.222.202]:46280 "EHLO mail-qk1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404617AbgDCSIO (ORCPT ); Fri, 3 Apr 2020 14:08:14 -0400 Received: by mail-qk1-f202.google.com with SMTP id y5so7127790qky.13 for ; Fri, 03 Apr 2020 11:08:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=vKSRcwOgSxpovOTlIQ2GGXc7undTikgLR4vPeODvBEg=; b=EAdVcQMfqNQMWp+4WRmfe91idIJgxgyEfZOUxbBy5g7FhdJ3iwUVewvmIgdlkqwKKB 4XGNVvOFr0KM7VoBQjEDBe0GhQv0F0yrLTTCdeyAERNGWx+iroMIx7J1123VuaGXl0IO air1JUnAgGTLBNudw8Qwiya3n+dbaxmbd8WNxz8kiz4SyqBE/T8dEJFunVE6ma9t0jdH PhbYjrpBSqVmzygopF4G9frAkLgylR1+3Az5YUa5yXseLNV0X1siNiGUoJ6m5aOckuDO N6jdBJBvMihi9JSqZM7CDvBukST8mvAXKx01SSJAoJaN68Pa4McVpwJXITE1bezXTBv/ P4Ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=vKSRcwOgSxpovOTlIQ2GGXc7undTikgLR4vPeODvBEg=; b=JjVqiCN6aa9PNpQ/2Q5K/PTB/JO2hqmnSCt84mBFj2lI+iA13trJHdC9RcOTo+JPo/ /fFjirA9Kw9WWDtaPTECtGOLy9vXDsBkfkzRkq7JkH3kAGeith960u2b9RoyioLbm2vg kjXUE8Mq+MZswAZOVhncRdQJp/Mgnpo8DwHe4Skqmxh/HVlXGuRd/DYV4wdE5dxXPg3S FrDQizejyWALjKfEGPHlDx9Ww7f2MzFtbx4dNk/igU/P8kD9DdsAvOZ15y5rQ7QFxiOt jQpVhxJ75FCqRu7L5YRnNFkNZc7GocbF559zspiboQdjg7/4VX2eX5NcvPFJz25PU0sM B1jg== X-Gm-Message-State: AGi0PuZxlu+RwObE7JzdxrqVTrhKDgpa+M3GPd6zKgX34RvaUEQxZMEP VlBCi1inIAOlTzk0LBIJVF14lY1p X-Received: by 2002:ac8:1aed:: with SMTP id h42mr9705788qtk.43.1585937293082; Fri, 03 Apr 2020 11:08:13 -0700 (PDT) Date: Fri, 3 Apr 2020 14:08:01 -0400 Message-Id: <20200403180801.209970-1-brho@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.26.0.292.g33ef6b2f38-goog Subject: perf/cgroup: use the cgroup_id() helper From: Barret Rhoden To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim Cc: linux-kernel@vger.kernel.org, Ian Rogers 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 We had a few places that still used cgrp->kn->id instead of cgroup_id(). Signed-off-by: Barret Rhoden --- kernel/events/core.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/kernel/events/core.c b/kernel/events/core.c index 318435c5bf0b..e5deab0e7185 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -1594,7 +1594,8 @@ perf_event_groups_less(struct perf_event *left, struct perf_event *right) return false; } /* Two dissimilar cgroups, order by id. */ - if (left->cgrp->css.cgroup->kn->id < right->cgrp->css.cgroup->kn->id) + if (cgroup_id(left->cgrp->css.cgroup) < + cgroup_id(right->cgrp->css.cgroup)) return true; return false; @@ -1692,7 +1693,7 @@ perf_event_groups_first(struct perf_event_groups *groups, int cpu, u64 node_cgrp_id, cgrp_id = 0; if (cgrp) - cgrp_id = cgrp->kn->id; + cgrp_id = cgroup_id(cgrp); #endif while (node) { @@ -1709,7 +1710,7 @@ perf_event_groups_first(struct perf_event_groups *groups, int cpu, #ifdef CONFIG_CGROUP_PERF node_cgrp_id = 0; if (node_event->cgrp && node_event->cgrp->css.cgroup) - node_cgrp_id = node_event->cgrp->css.cgroup->kn->id; + node_cgrp_id = cgroup_id(node_event->cgrp->css.cgroup); if (cgrp_id < node_cgrp_id) { node = node->rb_left; @@ -1745,10 +1746,10 @@ perf_event_groups_next(struct perf_event *event) #ifdef CONFIG_CGROUP_PERF if (event->cgrp && event->cgrp->css.cgroup) - curr_cgrp_id = event->cgrp->css.cgroup->kn->id; + curr_cgrp_id = cgroup_id(event->cgrp->css.cgroup); if (next->cgrp && next->cgrp->css.cgroup) - next_cgrp_id = next->cgrp->css.cgroup->kn->id; + next_cgrp_id = cgroup_id(next->cgrp->css.cgroup); if (curr_cgrp_id != next_cgrp_id) return NULL; -- 2.26.0.292.g33ef6b2f38-goog