Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5702113imm; Wed, 12 Sep 2018 09:47:30 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ7RJ3r0RH4X+zfqfM2YdFkWKFZtLTZxWicQUJeBJX4+pa62/QXizznlR/cr8dfpXOUleYX X-Received: by 2002:a63:3741:: with SMTP id g1-v6mr3287806pgn.59.1536770850473; Wed, 12 Sep 2018 09:47:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536770850; cv=none; d=google.com; s=arc-20160816; b=e3zNFGNqzuhQEzsi2V9SbQLrcF2f6U3j+ByBW4+SV9y2SZY5405+pBsmlZe0aFETVi g7bdB44+Na2B0XRlNDw8G0lmnLP80MZxCF7VEpf8SlRGg4Nk0EfDIsxfXdZXZgh8povH g9BWXW81+z5ZdAvhGSlSrKzmKN4ilyPaBDtr6coWuH1thNE9jAIjvjW/vvVOv+wecx4L Gr/aUWmYOeWORIGguZ3clMI67LroWFWJV8uAfp6dXMmPqZM8pDTqI8eN9HOPLyDhGtyO cGXVoOaQXW282itkBrPw1w5Kb0eVExLi/1NQHsgTahY66uQSTUNLA4Y7DJhCG7slcMfX kxyw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=/iSBHV4N+CfZFH8TFqEfs20bUBQJc1s8na1Lh4ikqcM=; b=YfWBOlvhBy7TC7pu0GdB+YyjGkSUW5cDdygkHUiDIHVeCgO1H4Fn7QtU+STccPfHav 7jNJPkmztonka3r4ajLdTZV0ZGbxsyjVlK0BTG+EHQaeYjkFsFhE2miNytEpLxPeh85A NOdh+UemmRipPNJdhq49PVVAHzeDJEDBgtxJzUnGWRhw9q4qzL2+mB4fCH4Xfd58bfR/ zFv1ixzyyJ4alf9zqFcEc0fOwEsUctRL5vbOD9zrglNyUw9RJnidkwvh1HR9nK8JDdRe 7+2tMyEZ7y/4+ffomlArRi57YGtLNMo1xyyzR/xRrICnmTPWd84HY3GU44fvDFyR5ZGu VTUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=U83OMdVB; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a2-v6si1430780plp.199.2018.09.12.09.47.10; Wed, 12 Sep 2018 09:47: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=@chromium.org header.s=google header.b=U83OMdVB; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727760AbeILVu5 (ORCPT + 99 others); Wed, 12 Sep 2018 17:50:57 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:41605 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726798AbeILVu5 (ORCPT ); Wed, 12 Sep 2018 17:50:57 -0400 Received: by mail-pl1-f195.google.com with SMTP id b12-v6so1245829plr.8 for ; Wed, 12 Sep 2018 09:45:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=/iSBHV4N+CfZFH8TFqEfs20bUBQJc1s8na1Lh4ikqcM=; b=U83OMdVBQY8wQU3Cu5OoRsxFIDF/ulCmoRor4KsW6EaXr8yyX85lRkyX2wBC2dnYMO gOBIeRWJLKwHbBlO6UxEj0llqORPlicXERwYsIptM/Y1j+GQZy5vy9aOuW0uMFRkYGbb IJ6u5dWmjcl0nzN3d5SkBrHx7gqL4WJeJctdM= 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:mime-version :content-transfer-encoding; bh=/iSBHV4N+CfZFH8TFqEfs20bUBQJc1s8na1Lh4ikqcM=; b=bIyNluqIkjC48lOwVh/qsATdaflK9odt6aJJiE+5yrfVpxf0Hx71cnP2Li9WOqoV04 pgGpWcy0oUlY3K30YYunExjuglZabJLNy05p8ZJ+DP8lC7YnHtNLcGzwN716TL/VBmMS keLTlsjg6rxzo2Jf4BpXQlm/Vos5yxm4QovzLb65hPT6vPRhxjWe8/OkTwksPHDiImge cZxSQpfZMDynbJ9v/kGVGL6cv1+X8Vm8k697Iuc2d4+kFy88+iSC0nuGuRXY5XkMGDrn 6peQk8kaggtMH1Sp3vClv6T1JIImmSmd1A6q59lQAyHfHibvDcYo3yzX00/3//GNtrJH +xgw== X-Gm-Message-State: APzg51D1EiG8Qi7fKycx7CJmqXB7YxKCRHhD6xbsHuyIHBr2xw0dn9jW pThPdYHvuzqooplY5Nb2n2KsGA== X-Received: by 2002:a17:902:6b05:: with SMTP id o5-v6mr3301855plk.338.1536770735271; Wed, 12 Sep 2018 09:45:35 -0700 (PDT) Received: from zsm-linux.mtv.corp.google.com ([2620:15c:202:201:1b7c:8280:c835:b226]) by smtp.googlemail.com with ESMTPSA id e14-v6sm2257804pgv.48.2018.09.12.09.45.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Sep 2018 09:45:34 -0700 (PDT) From: Zubin Mithra To: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org Cc: linux-kernel@vger.kernel.org, groeck@chromium.org, keescook@chromium.org, zsm@chromium.org Subject: [PATCH] perf/pt: Annotate pt_cap_group with __ro_after_init Date: Wed, 12 Sep 2018 09:45:10 -0700 Message-Id: <20180912164510.23444-1-zsm@chromium.org> X-Mailer: git-send-email 2.19.0.rc2.392.g5ba43deb5a-goog 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 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 --- 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