From: Joe Perches <joe@perches.com>
To: Gilad Ben-Yossef <gilad@benyossef.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Ofir Drang <ofir.drang@arm.com>,
linux-crypto@vger.kernel.org,
driverdev-devel@linuxdriverproject.org,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] staging: ccree: simplify access to struct device
Date: Mon, 02 Oct 2017 03:00:22 -0700 [thread overview]
Message-ID: <1506938422.2274.11.camel@perches.com> (raw)
In-Reply-To: <1506935008-14240-3-git-send-email-gilad@benyossef.com>
On Mon, 2017-10-02 at 10:03 +0100, Gilad Ben-Yossef wrote:
> Introduce a DEV macro to retrieve struct device from private
> data structure in preparation to replacing custom logging
> macros with proper dev_dbg and friends which require struct
> device.
[]
> diff --git a/drivers/staging/ccree/ssi_driver.h b/drivers/staging/ccree/ssi_driver.h
[]
> @@ -103,6 +103,8 @@
> #define SSI_LOG_DEBUG(format, ...) do {} while (0)
> #endif
>
> +#define DEV(drvdata) ((&(drvdata)->plat_dev->dev))
The name seems not particularly descriptive.
It seems a longer name would
not be too bad.
Perhaps
static inline struct device *drvdata_to_dev(struct ssi_drvdata *drvdata)
{
return &drvdata->plat_dev->dev;
}
next prev parent reply other threads:[~2017-10-02 10:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-02 9:03 [PATCH 0/4] staging: ccree: logging related coding style fixes Gilad Ben-Yossef
2017-10-02 9:03 ` [PATCH 1/4] staging: ccree: remove sysfs if of deleted code Gilad Ben-Yossef
2017-10-02 9:03 ` [PATCH 2/4] staging: ccree: simplify access to struct device Gilad Ben-Yossef
2017-10-02 10:00 ` Joe Perches [this message]
2017-10-03 10:43 ` Gilad Ben-Yossef
2017-10-02 9:03 ` [PATCH 3/4] staging: ccree: move to generic device log infra Gilad Ben-Yossef
2017-10-02 9:03 ` [PATCH 4/4] staging: ccree: simplify OOM handling Gilad Ben-Yossef
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=1506938422.2274.11.camel@perches.com \
--to=joe@perches.com \
--cc=devel@driverdev.osuosl.org \
--cc=driverdev-devel@linuxdriverproject.org \
--cc=gilad@benyossef.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ofir.drang@arm.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
Powered by JetHome