mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Dave Young" <hidave.darkstar@gmail.com>
To: "Robert P. J. Day" <rpjday@crashcourse.ca>
Cc: gregkh@suse.de, linux-kernel@vger.kernel.org
Subject: Re: The use of KOBJ_NAME_LEN
Date: Tue, 4 Dec 2007 15:17:32 +0800	[thread overview]
Message-ID: <a8e1da0712032317k492ad15aq917668d8a9413c61@mail.gmail.com> (raw)
In-Reply-To: <alpine.LFD.0.9999.0712040150010.31686@localhost.localdomain>

On Dec 4, 2007 2:50 PM, Robert P. J. Day <rpjday@crashcourse.ca> wrote:
>
> On Tue, 4 Dec 2007, Dave Young wrote:
>
> > Hi,
> > Does the KOBJ_NAME_LEN really means the limit of kobject name length? seems not . And if it's true, is the KOBJ_NAME_LEN of 20 enough to use?
> >
> > In the kobject_set_name, the limit is 1024. Looks like either the comment or the code should be updated.
> >
> > /**
> >  *      kobject_set_name - Set the name of an object
> >  *      @kobj:  object.
> >  *      @fmt:   format string used to build the name
> >  *
> >  *      If strlen(name) >= KOBJ_NAME_LEN, then use a dynamically allocated
> >  *      string that @kobj->k_name points to. Otherwise, use the static
> >  *      @kobj->name array.
> >  */
>
> the comment seems fairly clear -- if the name is sufficiently short,
> it's stored in the static array.  if not, then it's stored in
> dynamically allocated space.

Yes, It's clear, but it is not the topic I talk about.
Please look at the KOBJ_NAME_LEN macro usage.

>
> rday
> ========================================================================
> Robert P. J. Day
> Linux Consulting, Training and Annoying Kernel Pedantry
> Waterloo, Ontario, CANADA
>
> http://crashcourse.ca
> ========================================================================
>

  reply	other threads:[~2007-12-04  7:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-04  6:45 Dave Young
2007-12-04  6:50 ` Robert P. J. Day
2007-12-04  7:17   ` Dave Young [this message]
2007-12-04  7:46   ` Greg KH
2007-12-04  8:02     ` Robert P. J. Day
2007-12-04  7:46 ` Greg KH
2007-12-04  7:53   ` Dave Young
2007-12-04  8:20     ` Greg KH
2007-12-04  8:22       ` Dave Young

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=a8e1da0712032317k492ad15aq917668d8a9413c61@mail.gmail.com \
    --to=hidave.darkstar@gmail.com \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rpjday@crashcourse.ca \
    /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

all inboxes | Powered by JetHome®