From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Logan Gunthorpe <logang@deltatee.com>
Cc: Joe Perches <joe@perches.com>, Jon Mason <jdmason@kudzu.us>,
Xiangliang Yu <Xiangliang.Yu@amd.com>,
Dave Jiang <dave.jiang@intel.com>,
Allen Hubbe <Allen.Hubbe@emc.com>,
linux-ntb@googlegroups.com,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 0/2] Style fixes: open code obfuscating macros
Date: Wed, 11 Jan 2017 07:50:36 +0100 [thread overview]
Message-ID: <20170111065036.GA4111@kroah.com> (raw)
In-Reply-To: <ebef7d4f-1e3d-b70f-741b-3f06b820289a@deltatee.com>
On Tue, Jan 10, 2017 at 04:34:41PM -0700, Logan Gunthorpe wrote:
>
>
> 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.
You should be printing against the ntb struct device, as that's the
"correct" structure here, and not the PCI device at all, as that's too
far up the device chain from what the driver is supposed to be doing.
thanks,
greg k-h
next prev parent reply other threads:[~2017-01-11 6:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-03 1:30 [PATCH 0/2] Style fixes: open code obfuscating macros Logan Gunthorpe
2017-01-03 1:30 ` [PATCH 1/2] ntb_hw_amd: Style fixes: open code macros that just obfuscate code Logan Gunthorpe
2017-01-03 1:30 ` [PATCH 2/2] ntb_hw_intel: " Logan Gunthorpe
2017-01-10 21:55 ` [PATCH 0/2] Style fixes: open code obfuscating macros Jon Mason
2017-01-10 21:59 ` Jon Mason
2017-01-10 23:06 ` Joe Perches
2017-01-10 23:34 ` Logan Gunthorpe
2017-01-11 6:50 ` Greg Kroah-Hartman [this message]
2017-01-11 17:48 ` Logan Gunthorpe
2017-01-15 22:38 ` jmrodriguezhw88
-- strict thread matches above, loose matches on Subject: below --
2017-01-11 0:32 Logan Gunthorpe
2017-01-11 0:34 ` Logan Gunthorpe
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=20170111065036.GA4111@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=Allen.Hubbe@emc.com \
--cc=Xiangliang.Yu@amd.com \
--cc=dave.jiang@intel.com \
--cc=jdmason@kudzu.us \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-ntb@googlegroups.com \
--cc=logang@deltatee.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox