From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754761Ab2ADJVI (ORCPT ); Wed, 4 Jan 2012 04:21:08 -0500 Received: from smtp.ctxuk.citrix.com ([62.200.22.115]:47699 "EHLO SMTP.EU.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754522Ab2ADJVE (ORCPT ); Wed, 4 Jan 2012 04:21:04 -0500 X-IronPort-AV: E=Sophos;i="4.71,455,1320624000"; d="scan'208";a="9805130" Subject: Re: [PATCH, v2] Xen: consolidate and simplify struct xenbus_driver instantiation From: Ian Campbell To: Konrad Rzeszutek Wilk CC: Ben Hutchings , Jan Beulich , Konrad Rzeszutek Wilk , "davem@davemloft.net" , "dmitry.torokhov@gmail.com" , "FlorianSchandinat@gmx.de" , Jeremy Fitzhardinge , "Jens Axboe" , "xen-devel@lists.xensource.com" , "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" Date: Wed, 4 Jan 2012 09:20:45 +0000 In-Reply-To: <20120103203637.GF17472@phenom.dumpdata.com> References: <4EF3018D020000780006986E@nat28.tlf.novell.com> <1324547820.7877.71.camel@zakaz.uk.xensource.com> <4EF327E2020000780006993E@nat28.tlf.novell.com> <1324555060.7877.84.camel@zakaz.uk.xensource.com> <1324565067.2897.2.camel@bwh-desktop> <1324586301.13113.3.camel@dagon.hellion.org.uk> <20120103203637.GF17472@phenom.dumpdata.com> Organization: Citrix Systems, Inc. Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.0.3- Content-Transfer-Encoding: 7bit Message-ID: <1325668846.25206.172.camel@zakaz.uk.xensource.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2012-01-03 at 20:36 +0000, Konrad Rzeszutek Wilk wrote: > On Thu, Dec 22, 2011 at 08:38:21PM +0000, Ian Campbell wrote: > > On Thu, 2011-12-22 at 14:44 +0000, Ben Hutchings wrote: > > > On Thu, 2011-12-22 at 11:57 +0000, Ian Campbell wrote: > > > > On Thu, 2011-12-22 at 11:51 +0000, Jan Beulich wrote: > > > > > >>> On 22.12.11 at 10:57, Ian Campbell wrote: > > > > > > On Thu, 2011-12-22 at 09:08 +0000, Jan Beulich wrote: > > > > > >> The 'name', 'owner', and 'mod_name' members are redundant with the > > > > > >> identically named fields in the 'driver' sub-structure. Rather than > > > > > >> switching each instance to specify these fields explicitly, introduce > > > > > >> a macro to simplify this. > > > > > >> > > > > > >> Eliminate further redundancy by allowing the drvname argument to > > > > > >> DEFINE_XENBUS_DRIVER() to be blank (in which case the first entry from > > > > > >> the ID table will be used for .driver.name). > > > > > > > > > > > > Any reason not to always use DRV_NAME here (which is generally a bit > > > > > > more specific e.g. "xen-foofront" rather than "foo") and rely on the id > > > > > > table for the shorter names used in xenstore? > > > > > > > > > > That would imply that DRV_NAME is always defined, but I don't > > > > > see this being the case. > > > > > > > > My mistake, I thought it was a Kbuild thing. > > > > > > You're maybe thinking of KBUILD_MODNAME. > > > > Yes, I think I was. > > Ian, are you OK with this patch? I think Jan needs to repost once more with the > "pciback" -> DRV_NAME change and then it is OK? I don't much like the style of leaving macro parameters blank -- I'd much rather have things be explicitly specified and live with the slight duplication in cases where the device name happens to match an entry in the id list. But it's not a show stopper for me. > I've tested it with all backends, except the pciback one, and I see no regressions > with 'xl' or 'xm' toolstack. Great! Presumably there is no actual change to sysfs arising from this patch. Ian.