Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750750Ab3IFEw3 (ORCPT ); Fri, 6 Sep 2013 00:52:29 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:56676 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750705Ab3IFEwU (ORCPT ); Fri, 6 Sep 2013 00:52:20 -0400 Date: Thu, 5 Sep 2013 21:55:03 -0700 From: Greg Kroah-Hartman To: Sudeep Dutt Cc: Arnd Bergmann , Rusty Russell , "Michael S. Tsirkin" , Rob Landley , linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-doc@vger.kernel.org, Asias He , Nikhil Rao , Ashutosh Dixit , Caz Yokoyama , Dasaratharaman Chandramouli , Harshavardhan R Kharche , "Yaozu (Eddie) Dong" , Peter P Waskiewicz Jr Subject: Re: [PATCH RESEND v3 1/7] Intel MIC Host Driver for X100 family. Message-ID: <20130906045503.GB28806@kroah.com> References: <8b972a444f4529ecffc718db4112aa8959bf72ad.1378423596.git.sudeep.dutt@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8b972a444f4529ecffc718db4112aa8959bf72ad.1378423596.git.sudeep.dutt@intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1283 Lines: 48 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/