lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20131214213743.GA11872@pengutronix.de>
Date:	Sat, 14 Dec 2013 22:37:43 +0100
From:	Philipp Zabel <pza@...gutronix.de>
To:	Josh Triplett <josh@...htriplett.org>
Cc:	Dan Carpenter <dan.carpenter@...cle.com>,
	Rashika Kheria <rashika.kheria@...il.com>,
	Philipp Zabel <p.zabel@...gutronix.de>,
	linux-kernel@...r.kernel.org, Pavel Machek <pavel@....cz>,
	Stephen Warren <swarren@...dia.com>
Subject: Re: [PATCH] drivers: reset: Mark function as static in core.c

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ