All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Frank Haverkamp <haver@linux.vnet.ibm.com>
Cc: linux-kernel@vger.kernel.org, arnd@arndb.de,
	cody@linux.vnet.ibm.com, schwidefsky@de.ibm.com,
	utz.bacher@de.ibm.com, mmarek@suse.cz, rmallon@gmail.com,
	jsvogt@de.ibm.com, MIJUNG@de.ibm.com,
	cascardo@linux.vnet.ibm.com, michael@ibmra.de
Subject: Re: [PATCH 5/6] GenWQE Sysfs interfaces
Date: Tue, 3 Dec 2013 06:28:28 -0800	[thread overview]
Message-ID: <20131203142828.GA3521@kroah.com> (raw)
In-Reply-To: <1386075193.839.3.camel@oc7383187364.ibm.com>

On Tue, Dec 03, 2013 at 01:53:13PM +0100, Frank Haverkamp wrote:
> Hi Greg,
> 
> thanks for taking your time to review our code once more.
> 
> Am Mittwoch, den 27.11.2013, 11:22 -0800 schrieb Greg KH:
> > On Wed, Nov 06, 2013 at 01:45:42PM +0100, Frank Haverkamp wrote:
> > > +/**
> > > + * genwqe_init_sysfs() - Setup sysfs entries of the card device
> > > + */
> > > +int genwqe_init_sysfs(struct genwqe_dev *cd)
> > > +{
> > > +	int rc;
> > > +
> > > +	rc = sysfs_create_group(&cd->dev->kobj, &genwqe_attribute_group);
> > > +	if (rc)
> > > +		return -ENXIO;
> > > +
> > > +	return 0;
> > > +}
> > 
> > Why isn't this group the "default" one for the device?  That way you
> > don't have to explicitly create/remove it, the driver core handles it
> > all automatically for you, and you don't race with userspace when it is
> > created/announced.
> 
> I found the ..._with_groups variant of device_create:
>         cd->dev = device_create_with_groups(cd->class_genwqe,
>                                             &cd->pci_dev->dev,
>                                             cd->devnum_genwqe, cd,
>                                             genwqe_attribute_groups,
>                                             GENWQE_DEVNAME "%u_card",
>                                             cd->card_idx);
> 
> This works nicely for me too. Is that what you had in mind?

Yes, that's what it was created for :)


  reply	other threads:[~2013-12-03 14:27 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-06 12:45 [PATCH 0/6] Generic WorkQueue Engine (GenWQE) device driver (v7) Frank Haverkamp
2013-11-06 12:45 ` [PATCH 1/6] GenWQE PCI support, health monitoring and recovery Frank Haverkamp
2013-11-27 19:16   ` Greg KH
2013-12-03 13:35     ` Frank Haverkamp
2013-12-03 14:30       ` Greg KH
2013-12-03 14:46         ` Frank Haverkamp
2013-12-03 15:05           ` Arnd Bergmann
2013-12-04  9:59             ` Frank Haverkamp
2013-11-27 19:20   ` Greg KH
2013-12-03 13:49     ` Frank Haverkamp
2013-12-03 14:30       ` Greg KH
2013-11-06 12:45 ` [PATCH 2/6] GenWQE Character device and DDCB queue Frank Haverkamp
2013-11-06 12:45 ` [PATCH 3/6] GenWQE Utility functions Frank Haverkamp
2013-11-27 19:26   ` Greg KH
2013-12-03 13:21     ` Frank Haverkamp
2013-11-06 12:45 ` [PATCH 4/6] GenWQE Debugfs interfaces Frank Haverkamp
2013-11-06 12:45 ` [PATCH 5/6] GenWQE Sysfs interfaces Frank Haverkamp
2013-11-27 19:22   ` Greg KH
2013-12-03 12:53     ` Frank Haverkamp
2013-12-03 14:28       ` Greg KH [this message]
2013-11-06 12:45 ` [PATCH 6/6] GenWQE Enable driver Frank Haverkamp
2013-11-22 13:37 ` [PATCH 0/6] Generic WorkQueue Engine (GenWQE) device driver (v7) Frank Haverkamp
2013-11-22 16:52   ` Greg KH
2013-11-27 10:26     ` Frank Haverkamp
  -- strict thread matches above, loose matches on Subject: below --
2013-12-09 12:30 [PATCH 0/6] Generic WorkQueue Engine (GenWQE) device driver (v10) Frank Haverkamp
2013-12-09 12:30 ` [PATCH 5/6] GenWQE Sysfs interfaces Frank Haverkamp
2013-12-05 14:15 [PATCH 0/6] Generic WorkQueue Engine (GenWQE) device driver (v9) Frank Haverkamp
2013-12-05 14:16 ` [PATCH 5/6] GenWQE Sysfs interfaces Frank Haverkamp
2013-12-03 14:28 [PATCH 0/6] Generic WorkQueue Engine (GenWQE) device driver (v8) Frank Haverkamp
2013-12-03 14:28 ` [PATCH 5/6] GenWQE Sysfs interfaces Frank Haverkamp
2013-11-05  8:44 [PATCH 0/6] Generic WorkQueue Engine (GenWQE) device driver (v6) Frank Haverkamp
2013-11-05  8:44 ` [PATCH 5/6] GenWQE Sysfs interfaces Frank Haverkamp
2013-11-05 20:43   ` Ryan Mallon
2013-11-06 12:24     ` Frank Haverkamp

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=20131203142828.GA3521@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=MIJUNG@de.ibm.com \
    --cc=arnd@arndb.de \
    --cc=cascardo@linux.vnet.ibm.com \
    --cc=cody@linux.vnet.ibm.com \
    --cc=haver@linux.vnet.ibm.com \
    --cc=jsvogt@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael@ibmra.de \
    --cc=mmarek@suse.cz \
    --cc=rmallon@gmail.com \
    --cc=schwidefsky@de.ibm.com \
    --cc=utz.bacher@de.ibm.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.