From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ale.deltatee.com (ale.deltatee.com. [207.54.116.67]) by gmr-mx.google.com with ESMTPS id w2si867625pfg.0.2017.01.10.15.34.44 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Jan 2017 15:34:44 -0800 (PST) References: <1483407036-20697-1-git-send-email-logang@deltatee.com> <20170110215527.GD13381@kudzu.us> <1484089612.12006.11.camel@perches.com> From: Logan Gunthorpe Message-ID: Date: Tue, 10 Jan 2017 16:34:41 -0700 MIME-Version: 1.0 In-Reply-To: <1484089612.12006.11.camel@perches.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH 0/2] Style fixes: open code obfuscating macros To: Joe Perches , Jon Mason Cc: Xiangliang Yu , Dave Jiang , Allen Hubbe , Greg Kroah-Hartman , linux-ntb@googlegroups.com, linux-kernel List-ID: On 10/01/17 04:06 PM, Joe Perches wrote: > It might also be better to add and use YA > logging macro like ndev_dbg > > #define ndev_dvg(ndev, fmt, ...) \ > dev_dbg(&(ndev)->ntb.pdev->dev, fmt, ##__VA_ARGS__) > > so that the new temporaries that are used just > for debugging are not required. > I feel like that's going in the exact opposite direction from what Greg was looking for... I think the point is to hide less of where the device is coming from, not to create a new and different macro that hides things in a different way. Or, more likely, I _think_ Greg would suggest that this is showing that the driver model isn't really being used properly. Perhaps, we should be printing against the ntb struct device instead of the pci device so there is no dereferencing. Logan