Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1660785

Re: [PATCH 46/58] clocksource/drivers: Add a new driver for the Atmel ARM TC blocks

Path csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From Boris Brezillon <boris.brezillon@free-electrons.com>
Newsgroups linux.kernel
Subject Re: [PATCH 46/58] clocksource/drivers: Add a new driver for the Atmel ARM TC blocks
Date Thu, 08 Jun 2017 08:30:02 +0200
Message-ID <tPZ7c-BL-9@gated-at.bofh.it> (permalink)
References <tMXlg-4i6-3@gated-at.bofh.it> <tMXli-4i6-55@gated-at.bofh.it> <tPoAG-27S-23@gated-at.bofh.it> <tPr5w-3PW-21@gated-at.bofh.it> <tPJYu-7IG-19@gated-at.bofh.it> <tPL4e-8ou-23@gated-at.bofh.it> <tPQng-3rp-35@gated-at.bofh.it>
X-Mailer Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu)
MIME-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 8BIT
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 31
Organization linux.* mail to news gateway
X-Original-Cc Alexandre Belloni <alexandre.belloni@free-electrons.com>, Nicolas Ferre <nicolas.ferre@microchip.com>, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Thomas Gleixner <tglx@linutronix.de>
X-Original-Date Thu, 8 Jun 2017 08:21:48 +0200
X-Original-Message-ID <20170608082148.78bcf1a0@bbrezillon>
X-Original-References <20170530215139.9983-1-alexandre.belloni@free-electrons.com> <20170530215139.9983-47-alexandre.belloni@free-electrons.com> <20170606152104.GC2345@mai> <20170606180559.pkrr7ux2qqnmsd6y@piout.net> <20170607141735.GH2345@mai> <20170607152750.tksmyf5p3oajbsac@piout.net> <20170607210848.GJ2345@mai>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1660785

Show key headers only | View raw


Le Wed, 7 Jun 2017 23:08:48 +0200,
Daniel Lezcano <daniel.lezcano@linaro.org> a écrit :

> On Wed, Jun 07, 2017 at 05:27:50PM +0200, Alexandre Belloni wrote:
> > On 07/06/2017 at 16:17:35 +0200, Daniel Lezcano wrote:  
> > > > You mean you don't like how it is used? Or you don't think having the
> > > > timer full name is useful?  
> > > 
> > > The field is not needed, the only place where it is used is where we affect it.
> > >    
> > 
> > It is used in tcb_clksrc_register:
> > 
> > tc.clksrc.name = tc.name;  
> 
> Yes, but tc.name is only in the scope of the function, so there is no need to
> include this field in the structure, just a working buffer in the function is
> enough.

Hm, do you mean allocating the buffer dynamically and leaking the
resource (not a real leak here, since we're talking about something
that cannot be unregistered) or defining a 'static char name[]' variable
in the function and passing this pointer to clksrc.name? Note
that putting the name var on the stack won't work, because the core
does not seem to duplicate the name, and uses clksrc->name after
tcb_clksrc_register() has returned.

Anyway, I'm not sure dynamically generating the name is really
needed because we only accept a single tcb-clocksource device. We can
just set tc.clksrc.name to "atmel-tcb-clocksource" and we should be
good.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH 46/58] clocksource/drivers: Add a new driver for the  Atmel ARM TC blocks Daniel Lezcano <daniel.lezcano@linaro.org> - 2017-06-07 23:10 +0200
  Re: [PATCH 46/58] clocksource/drivers: Add a new driver for the  Atmel ARM TC blocks Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-06-08 01:20 +0200
    Re: [PATCH 46/58] clocksource/drivers: Add a new driver for the  Atmel ARM TC blocks Boris Brezillon <boris.brezillon@free-electrons.com> - 2017-06-08 07:50 +0200
      Re: [PATCH 46/58] clocksource/drivers: Add a new driver for the  Atmel ARM TC blocks Daniel Lezcano <daniel.lezcano@linaro.org> - 2017-06-08 09:50 +0200
        Re: [PATCH 46/58] clocksource/drivers: Add a new driver for the  Atmel ARM TC blocks Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-06-08 10:00 +0200
          Re: [PATCH 46/58] clocksource/drivers: Add a new driver for the  Atmel ARM TC blocks Daniel Lezcano <daniel.lezcano@linaro.org> - 2017-06-08 10:30 +0200
            Re: [PATCH 46/58] clocksource/drivers: Add a new driver for the  Atmel ARM TC blocks Boris Brezillon <boris.brezillon@free-electrons.com> - 2017-06-08 10:40 +0200
            Re: [PATCH 46/58] clocksource/drivers: Add a new driver for the  Atmel ARM TC blocks Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-06-08 10:50 +0200
        Re: [PATCH 46/58] clocksource/drivers: Add a new driver for the  Atmel ARM TC blocks Boris Brezillon <boris.brezillon@free-electrons.com> - 2017-06-08 10:20 +0200
          Re: [PATCH 46/58] clocksource/drivers: Add a new driver for the  Atmel ARM TC blocks Daniel Lezcano <daniel.lezcano@linaro.org> - 2017-06-08 10:50 +0200
            Re: [PATCH 46/58] clocksource/drivers: Add a new driver for the  Atmel ARM TC blocks Boris Brezillon <boris.brezillon@free-electrons.com> - 2017-06-08 11:00 +0200
            Re: [PATCH 46/58] clocksource/drivers: Add a new driver for the Atmel  ARM TC blocks Nicolas Ferre <nicolas.ferre@microchip.com> - 2017-06-12 15:00 +0200
              Re: [PATCH 46/58] clocksource/drivers: Add a new driver for the Atmel  ARM TC blocks Daniel Lezcano <daniel.lezcano@linaro.org> - 2017-06-12 15:30 +0200
                Re: [PATCH 46/58] clocksource/drivers: Add a new driver for the Atmel  ARM TC blocks Nicolas Ferre <nicolas.ferre@microchip.com> - 2017-06-12 17:30 +0200
  Re: [PATCH 46/58] clocksource/drivers: Add a new driver for the  Atmel ARM TC blocks Boris Brezillon <boris.brezillon@free-electrons.com> - 2017-06-08 08:30 +0200

csiph-web