Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1647627
| From | Christoph Hellwig <hch@lst.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] kernel: mark all struct k_clock instances const |
| Date | 2017-05-23 06:50 +0200 |
| Message-ID | <tK9VE-6JS-5@gated-at.bofh.it> (permalink) |
| References | <tHuWC-4t8-15@gated-at.bofh.it> <tK3Qd-30F-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, May 23, 2017 at 12:17:31AM +0200, Thomas Gleixner wrote:
> On Mon, 15 May 2017, Christoph Hellwig wrote:
>
> > And keep a pointer to it instead of a copy in the posix_clocks array.
> >
> > Based on similar changes in the Grsecurity patchset, but redone from
> > scratch including a few tweaks.
>
> Hmm, that adds another level of indirection, but yes, we can do it.
>
> > diff --git a/drivers/char/mmtimer.c b/drivers/char/mmtimer.c
> > index 0e7fcb04f01e..e501403dd860 100644
> > --- a/drivers/char/mmtimer.c
> > +++ b/drivers/char/mmtimer.c
> > @@ -53,7 +53,7 @@ MODULE_LICENSE("GPL");
> >
> > #define RTC_BITS 55 /* 55 bits for this implementation */
> >
> > -static struct k_clock sgi_clock;
> > +static const struct k_clock sgi_clock;
>
> Bah. This mmtimer which is used by 3 people in the world requires that we
> keep the register_clock() function around after init and even export it.
We can require the driver to be built into the kernel, which seems pretty
reasonable for a timer. It's only selectable on IA64 anyway.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] kernel: mark all struct k_clock instances const Christoph Hellwig <hch@lst.de> - 2017-05-15 22:40 +0200
Re: [PATCH] kernel: mark all struct k_clock instances const Thomas Gleixner <tglx@linutronix.de> - 2017-05-23 00:20 +0200
Re: [PATCH] kernel: mark all struct k_clock instances const Christoph Hellwig <hch@lst.de> - 2017-05-23 06:50 +0200
Re: [PATCH] kernel: mark all struct k_clock instances const Christoph Hellwig <hch@lst.de> - 2017-05-23 09:10 +0200
Re: [PATCH] kernel: mark all struct k_clock instances const Thomas Gleixner <tglx@linutronix.de> - 2017-05-23 09:10 +0200
csiph-web