From: Philipp Zabel <pza@pengutronix.de>
To: Josh Triplett <josh@joshtriplett.org>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
Rashika Kheria <rashika.kheria@gmail.com>,
Philipp Zabel <p.zabel@pengutronix.de>,
linux-kernel@vger.kernel.org, Pavel Machek <pavel@ucw.cz>,
Stephen Warren <swarren@nvidia.com>
Subject: Re: [PATCH] drivers: reset: Mark function as static in core.c
Date: Sat, 14 Dec 2013 22:37:43 +0100 [thread overview]
Message-ID: <20131214213743.GA11872@pengutronix.de> (raw)
In-Reply-To: <20131214205657.GQ17601@leaf>
On Sat, Dec 14, 2013 at 12:56:57PM -0800, Josh Triplett wrote:
> On Sat, Dec 14, 2013 at 05:15:34PM +0300, Dan Carpenter wrote:
> > On Sat, Dec 14, 2013 at 06:56:10PM +0530, Rashika Kheria wrote:
> > > This patch marks the function of_reset_simple_xlate() and
> > > devm_reset_control_put() as static in core.c because it is not used
> > > outside this file.
> > >
> > > Thus, it also eliminate the following warnings in core.c:
> > > drivers/reset/core.c:46:5: warning: no previous prototype for ‘of_reset_simple_xlate’ [-Wmissing-prototypes]
> > > drivers/reset/core.c:262:6: warning: no previous prototype for ‘devm_reset_control_put’ [-Wmissing-prototypes]
> > >
> >
> > These are EXPORT_SYMBOL_GPL() so that doesn't make sense.
> > devm_reset_control_put() is not used at all and of_reset_simple_xlate()
> > doesn't look like it needs to be exported. Philipp?
>
> That sounds like the right fix to me: drop devm_reset_control_put and
> its export completely, and drop the export of make
> of_reset_simple_xlate. Unless there's some relevant out-of-tree caller
> of either function, that seems sensible.
Yes, of_reset_simple_xlate() is used as default if the driver does not specify
the .of_xlate field of the rcdev parameter to reset_controller_register().
It does not need to be exported. This is analogous to of_gpio_simple_xlate.
devm_reset_control_put would be needed if a driver wanted to release
the reset control before the devres cleanup for some reason. I added
it for symmetry with devm_reset_control_get but forgot the header
prototypes.
If this is considered not useful, we should probably also review
devm_{clk,gpiod,phy,pinctrl,pwm,regulator,usb}_put.
regards
Philipp
prev parent reply other threads:[~2013-12-14 21:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-14 13:26 [PATCH] drivers: reset: Mark function as static in core.c Rashika Kheria
2013-12-14 14:15 ` Dan Carpenter
2013-12-14 20:56 ` Josh Triplett
2013-12-14 21:37 ` Philipp Zabel [this message]
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=20131214213743.GA11872@pengutronix.de \
--to=pza@pengutronix.de \
--cc=dan.carpenter@oracle.com \
--cc=josh@joshtriplett.org \
--cc=linux-kernel@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=pavel@ucw.cz \
--cc=rashika.kheria@gmail.com \
--cc=swarren@nvidia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.