linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: krzk@kernel.org (Krzysztof Kozlowski)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC 4/7] ARM: s3c64xx: Annotate external clock frequencies __ro_after_init
Date: Sat, 10 Dec 2016 15:47:35 +0200	[thread overview]
Message-ID: <1481377658-22603-4-git-send-email-krzk@kernel.org> (raw)
In-Reply-To: <1481377658-22603-1-git-send-email-krzk@kernel.org>

The xtal_f and xusbxti_f static variables are modified only through
__init accessors (like s3c64xx_set_xtal_freq()).  Later these variables
are used only in read-only way so we can mark them __ro_after_init to
increase code safeness.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

---

Looks safe, but not tested.
---
 arch/arm/mach-s3c64xx/common.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-s3c64xx/common.c b/arch/arm/mach-s3c64xx/common.c
index 7c66ce1a6bb6..9843eb4dd04e 100644
--- a/arch/arm/mach-s3c64xx/common.c
+++ b/arch/arm/mach-s3c64xx/common.c
@@ -56,7 +56,8 @@
 #include "watchdog-reset.h"
 
 /* External clock frequency */
-static unsigned long xtal_f = 12000000, xusbxti_f = 48000000;
+static unsigned long xtal_f __ro_after_init = 12000000;
+static unsigned long xusbxti_f __ro_after_init = 48000000;
 
 void __init s3c64xx_set_xtal_freq(unsigned long freq)
 {
-- 
2.7.4

  parent reply	other threads:[~2016-12-10 13:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-10 13:47 [PATCH 1/7] ARM: EXYNOS: Constify list of retention registers Krzysztof Kozlowski
2016-12-10 13:47 ` [PATCH 2/7] ARM: EXYNOS: Annotate iomem and pm_data pointers __ro_after_init Krzysztof Kozlowski
2016-12-10 13:47 ` [PATCH 3/7] ARM: s3c24xx: Constify few integer tables Krzysztof Kozlowski
2016-12-10 13:47 ` Krzysztof Kozlowski [this message]
2016-12-10 13:47 ` [PATCH 5/7] ARM: SAMSUNG: Constify array of wake irqs passed to samsung_sync_wakemask Krzysztof Kozlowski
2016-12-10 13:47 ` [PATCH 6/7] ARM: s3c24xx: Constify wake_irqs Krzysztof Kozlowski
2016-12-10 13:47 ` [PATCH 7/7] ARM: s3c64xx: " Krzysztof Kozlowski
2016-12-12 13:39 ` [PATCH 1/7] ARM: EXYNOS: Constify list of retention registers Bartlomiej Zolnierkiewicz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1481377658-22603-4-git-send-email-krzk@kernel.org \
    --to=krzk@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).