Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5705581imm; Wed, 12 Sep 2018 09:50:55 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda8CLMBNGZ+EVsKxaO3PVWLqsi0rh+n3gCSXasDulVE4nwjx3UnXgqobwOZ+QtvQN9D/P8+ X-Received: by 2002:a63:2d87:: with SMTP id t129-v6mr3339565pgt.128.1536771055830; Wed, 12 Sep 2018 09:50:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536771055; cv=none; d=google.com; s=arc-20160816; b=GaWgFfD+OWtMrYlfT5H9piCCOYPrXrNeKCEZK8oPFss+4CXAow7U/cCV4Qw0pE7G9p N7YYPt+A33+SGMLiAoTQW5TqcPRQBMyXTyqC6rFDOF5mUG7HWnCdY4aCDdW0guGhbOta t/GVGI35ZiDCE2fOYCT/1qdo1vBLrzrDdpXQtkq6aiR+xort9t+a2BZzabXTG/+L8hYn Crbl1CTg0cZ0hHN0RfGBgbEy34Dly3NOGAz2J4woenvwaZCsAQWpWl9r74B18ZF/inbH XDPeclto5KrBEmjhHdCiUoc9puHbM2XpERXN1RhEUbHE7Q4j7eEFf+GNQZS2M848Zv9d /QTw== 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=2+GZ7nhCvCJtMfAnGwLb7t33EjeSQ6FLWypH0GUfebk=; b=OEJmcWArJrDFzuLaoabV1hOm6f3i2eEyxOxztd3l2HGmVWqW8IcAhg/VxjrwPIB/7g DCVB8UDshbM2q6lBJl+xAtyan9ZTHKqbWk7ZNE9chZK3TSJDqJ1VDbmx0eClfvXoaIHL +rnpRZQVDQR5W4uBhZrajleny/AjRgn99U7DCJxUrclZBkteHj4rQvOBfarQRekViccp IWLrKKijHChyJzEoJK+1DrTa2RqX+GdMUq9Jm3JWIwzPSnv139LfWRVOiwcchjm4xnG8 KX5B5mzMRFuBLdGaQT41MtW6vlsYLw4+p+qV8+BYFSkMc/xbViiOCzjdFUT5pi5NhmOb pKcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=j3u13uZU; 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 d9-v6si1567084pfk.166.2018.09.12.09.50.40; Wed, 12 Sep 2018 09:50:55 -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=j3u13uZU; 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 S1727865AbeILVzv (ORCPT + 99 others); Wed, 12 Sep 2018 17:55:51 -0400 Received: from mail-yb1-f193.google.com ([209.85.219.193]:43071 "EHLO mail-yb1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726798AbeILVzv (ORCPT ); Wed, 12 Sep 2018 17:55:51 -0400 Received: by mail-yb1-f193.google.com with SMTP id k5-v6so1966778ybo.10 for ; Wed, 12 Sep 2018 09:50:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2+GZ7nhCvCJtMfAnGwLb7t33EjeSQ6FLWypH0GUfebk=; b=j3u13uZUcJ0Eu4Kqh2TUgFz0bgIWqof3zJBkK0cW0A+/SsNM9GMLwUz56whQp2fot6 1B44HfpOpcanuVf0ypWVuMXp5QvVZ7J5gENi2GNwM4EyhquyzYQ8S2KMicSWjffF+UnN V3KXSVZGJW4Wmg1x8CjLzF9jCzbkJecc9QnXkyHubz7vqTYcOCtXFs50VxTcskLS+IVC dWyU+C0oyZr9ipJB/tqF3Sm+xfcchxQkhhJnD7yoxkQvnbUrVyZj/7fkZhecz3DqnGEZ aLGxBCo6JDJ4FrSPNakAmTP0kENc4qkXeg4AvLlrB36SAPEhUPvP1YQHI/dEQD9Jir3o 0gVw== 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=2+GZ7nhCvCJtMfAnGwLb7t33EjeSQ6FLWypH0GUfebk=; b=d1joqEBew8U+w2iuMgBBowIoxMUUbzT1C327AWAGSOtLvejsU6WynKDh1ZOrU9vUoj iKGcjKbgJt4y6hP7USySKAT0rrblUFnaxuMMxMjy32HPcIzM7iEDTa8DeSSDbi+U0r8U ani3VzCpTS6cOGgn++AeiqSUBMqI841h8587wXbKKp4+2BKflOW3qBknJQ2hYzmHVpUD JBz/+7DN+S1UdFoWlSFz18211Qz9/8JIoSXgF6pMramn4RWBsDB0Omw2Y80iZm0jeN66 XJcsZG64fKozRFnN+tUOFFCQW1l/fnf55tSM5W20B5OUkkA7xtfc1ktN5pa+1vzBVicu h0jw== X-Gm-Message-State: APzg51CZZZNccg2BIiZLXDiWogP+JOKqI5y4dmYyFCnQ6j7Btb56Gpnk RJuGxUQx+F7KZN4dkMsYXE8RuCqVmfzGM0l2OvEFHA== X-Received: by 2002:a81:e54c:: with SMTP id c12-v6mr1311079ywm.299.1536771027663; Wed, 12 Sep 2018 09:50:27 -0700 (PDT) MIME-Version: 1.0 References: <20180912164510.23444-1-zsm@chromium.org> In-Reply-To: <20180912164510.23444-1-zsm@chromium.org> From: Guenter Roeck Date: Wed, 12 Sep 2018 09:50:16 -0700 Message-ID: Subject: Re: [PATCH] perf/pt: Annotate pt_cap_group with __ro_after_init To: Zubin Mithra Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, linux-kernel , Guenter Roeck , Kees Cook 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, Sep 12, 2018 at 9:45 AM Zubin Mithra wrote: > > pt_cap_group is written to in pt_pmu_hw_init and not modified after. This makes > it a suitable candidate for annotating as __ro_after_init. > > Signed-off-by: Zubin Mithra Reviewed-by: Guenter Roeck > --- > arch/x86/events/intel/pt.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/x86/events/intel/pt.c b/arch/x86/events/intel/pt.c > index 8d016ce5b80d..3a0aa83cbd07 100644 > --- a/arch/x86/events/intel/pt.c > +++ b/arch/x86/events/intel/pt.c > @@ -95,7 +95,7 @@ static ssize_t pt_cap_show(struct device *cdev, > return snprintf(buf, PAGE_SIZE, "%x\n", pt_cap_get(cap)); > } > > -static struct attribute_group pt_cap_group = { > +static struct attribute_group pt_cap_group __ro_after_init = { > .name = "caps", > }; > > -- > 2.18.0.597.ga71716f1ad-goog >