All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@codeaurora.org>
To: York Sun <yorksun@freescale.com>
Cc: Michael Turquette <mturquette@baylibre.com>,
	linux-clk@vger.kernel.org, Russell King <linux@arm.linux.org.uk>
Subject: Re: What's the proper use of con_id in clkdev
Date: Tue, 6 Oct 2015 12:44:30 -0700	[thread overview]
Message-ID: <20151006194430.GJ12338@codeaurora.org> (raw)
In-Reply-To: <5612D4D0.30104@freescale.com>

On 10/05, York Sun wrote:
> Michael and Stephen,
> 
> Can you help me to understand "#define MAX_CON_ID 16" in clkdev.c? I am trying
> to use clk_get() to acquire the clock with its name. This fails when the clock
> name is more than 15 characters. I traced it to this macro.
> 
> The reason of using clk_get() is I don't have device tree for my platform until
> device tree overlay is officially supported. So I use clkdev_add() in the clock
> driver.
> 
> So my issue is with the MAX_CON_ID. Is there a reason to limit it to 16?
> Wouldn't it be better to use kstrdup() in vclkdev_alloc()?
> 

Mike and I are not the maintainers of clkdev. The maintainer of
clkdev is Russell King.

I believe we can't use kstrdup() in vclkdev_alloc() because we
don't know if vclkdev_alloc() is called before the slab
allocators are up and running (this is why we have a
__clkdev_alloc() function). The simplest solution is to use
shorter names, can you do that?

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

  reply	other threads:[~2015-10-06 19:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-05 19:51 What's the proper use of con_id in clkdev York Sun
2015-10-06 19:44 ` Stephen Boyd [this message]
2015-10-06 19:50   ` Russell King - ARM Linux
2015-10-06 19:53     ` York Sun

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=20151006194430.GJ12338@codeaurora.org \
    --to=sboyd@codeaurora.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mturquette@baylibre.com \
    --cc=yorksun@freescale.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.