public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Jonathan Corbet <corbet@lwn.net>
Cc: linux-kernel@vger.kernel.org, viro@parcelfarce.linux.theplanet.co.uk
Subject: Re: [PATCH] cdev 2/2: hide cdev->kobj
Date: Fri, 12 Mar 2004 15:25:44 -0800	[thread overview]
Message-ID: <20040312232544.GB16623@kroah.com> (raw)
In-Reply-To: <20040312183329.1438.qmail@lwn.net>

On Fri, Mar 12, 2004 at 11:33:29AM -0700, Jonathan Corbet wrote:
> The existing cdev interface requires users to deal with the embedded
> kobject in two places:
> 
> - The kobject name field must be set before adding the cdev, and
> - Should cdev_add() fail, a call to kobject_put() is required.
> 
> IMO, this exposure of the embedded kobject makes the interface more brittle
> and harder to understand.  It's also unnecessary.  With the removal of
> /sys/cdev, a call to cdev_del() will nicely replace kobject_put(), and the
> name setting is easily wrapped.
> 
> This is against 2.6.4, but depends on the /sys/cdev removal patch.

I've also applied this and it works for me.

But do we really even need this anymore?  The only reason the name was
even semi-important was that we were actually putting the kobject into
sysfs.  Now that we are not doing that, it isn't needed.  In fact I am
now running with a simple:
	#define cdev_set_name(cdev, args...)
in cdev.h to verify this.

Anyone object to me just deleting cdev_set_name() and everywhere it is
now used entirely?

thanks,

greg k-h

  reply	other threads:[~2004-03-12 23:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-12 18:33 [PATCH] cdev 2/2: hide cdev->kobj Jonathan Corbet
2004-03-12 23:25 ` Greg KH [this message]
2004-03-13  0:08   ` Greg KH

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=20040312232544.GB16623@kroah.com \
    --to=greg@kroah.com \
    --cc=corbet@lwn.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@parcelfarce.linux.theplanet.co.uk \
    /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