Re: [PATCH RESEND v3 1/7] Intel MIC Host Driver for X100 family.

2013-09-05 Thread Greg Kroah-Hartman
Very minor nits, you can change this in a future add-on patch:

 +static DEVICE_ATTR(family, S_IRUGO, mic_show_family, NULL);

This should use DEVICE_ATTR_RO(), so that we don't have to audit the
permissions of your DEVICE_ATTR() files.

 +static DEVICE_ATTR(stepping, S_IRUGO, mic_show_stepping, NULL);

Same here.

 +static struct attribute *mic_default_attrs[] = {
 + dev_attr_family.attr,
 + dev_attr_stepping.attr,
 +
 + NULL
 +};
 +
 +static struct attribute_group mic_attr_group = {
 + .attrs = mic_default_attrs,
 +};
 +
 +static const struct attribute_group *__mic_attr_group[] = {
 + mic_attr_group,
 + NULL
 +};

These last two structures can be replaced with:
ATTRIBUTE_GROUPS(mic_default);

 +void mic_sysfs_init(struct mic_device *mdev)
 +{
 + mdev-attr_group = __mic_attr_group;
 +}

This is odd, why not just export the data structure and reference it
in the other code?  The pci core does this, and so do other busses.

Anyway, it's not a big deal, just a bit strange to me.

thanks,

greg k-h
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [PATCH RESEND v3 1/7] Intel MIC Host Driver for X100 family.

2013-09-05 Thread Greg Kroah-Hartman
On Thu, Sep 05, 2013 at 04:41:31PM -0700, Sudeep Dutt wrote:
  drivers/misc/mic/common/mic_device.h  |  37 +++
  drivers/misc/mic/host/mic_device.h| 109 +

Two different files, with the same name?  You are asking for trouble in
the future, getting them confused :)

Please try to pick a unique name, especially when you later do things
like:

 +#include ../common/mic_device.h
 +#include mic_device.h

Which just looks odd.

Again, not a big deal, follow-on patch can fix this.

thanks,

greg k-h
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization