* [PATCH] reset: remove unused device pointer from struct reset_control
@ 2015-11-18 13:40 Philipp Zabel
2015-11-18 13:54 ` kbuild test robot
0 siblings, 1 reply; 2+ messages in thread
From: Philipp Zabel @ 2015-11-18 13:40 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel, Philipp Zabel
Commit 0c5b2b915a58 ("reset: Mark function as static and remove unused
function in core.c") removed the only user of the device pointer in
struct reset_control. As it is now unused, remove it.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
drivers/reset/core.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/reset/core.c b/drivers/reset/core.c
index 7955e00..ac2d461 100644
--- a/drivers/reset/core.c
+++ b/drivers/reset/core.c
@@ -30,7 +30,6 @@ static LIST_HEAD(reset_controller_list);
*/
struct reset_control {
struct reset_controller_dev *rcdev;
- struct device *dev;
unsigned int id;
};
@@ -220,11 +219,7 @@ struct reset_control *reset_control_get(struct device *dev, const char *id)
if (!dev)
return ERR_PTR(-EINVAL);
- rstc = of_reset_control_get(dev->of_node, id);
- if (!IS_ERR(rstc))
- rstc->dev = dev;
-
- return rstc;
+ return of_reset_control_get(dev->of_node, id);
}
EXPORT_SYMBOL_GPL(reset_control_get);
--
2.6.2
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] reset: remove unused device pointer from struct reset_control
2015-11-18 13:40 [PATCH] reset: remove unused device pointer from struct reset_control Philipp Zabel
@ 2015-11-18 13:54 ` kbuild test robot
0 siblings, 0 replies; 2+ messages in thread
From: kbuild test robot @ 2015-11-18 13:54 UTC (permalink / raw)
To: Philipp Zabel; +Cc: kbuild-all, linux-kernel, kernel, Philipp Zabel
[-- Attachment #1: Type: text/plain, Size: 2650 bytes --]
Hi Philipp,
[auto build test WARNING on: v4.4-rc1]
[also build test WARNING on: next-20151118]
url: https://github.com/0day-ci/linux/commits/Philipp-Zabel/reset-remove-unused-device-pointer-from-struct-reset_control/20151118-214443
config: x86_64-randconfig-x012-11181928 (attached as .config)
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All warnings (new ones prefixed by >>):
drivers/reset/core.c: In function 'reset_control_get':
>> drivers/reset/core.c:217:24: warning: unused variable 'rstc' [-Wunused-variable]
struct reset_control *rstc;
^
vim +/rstc +217 drivers/reset/core.c
61fc4131 Philipp Zabel 2012-11-19 201
61fc4131 Philipp Zabel 2012-11-19 202 return rstc;
61fc4131 Philipp Zabel 2012-11-19 203 }
fc0a5921 Maxime Ripard 2013-12-20 204 EXPORT_SYMBOL_GPL(of_reset_control_get);
fc0a5921 Maxime Ripard 2013-12-20 205
fc0a5921 Maxime Ripard 2013-12-20 206 /**
fc0a5921 Maxime Ripard 2013-12-20 207 * reset_control_get - Lookup and obtain a reference to a reset controller.
fc0a5921 Maxime Ripard 2013-12-20 208 * @dev: device to be reset by the controller
fc0a5921 Maxime Ripard 2013-12-20 209 * @id: reset line name
fc0a5921 Maxime Ripard 2013-12-20 210 *
fc0a5921 Maxime Ripard 2013-12-20 211 * Returns a struct reset_control or IS_ERR() condition containing errno.
fc0a5921 Maxime Ripard 2013-12-20 212 *
fc0a5921 Maxime Ripard 2013-12-20 213 * Use of id names is optional.
fc0a5921 Maxime Ripard 2013-12-20 214 */
fc0a5921 Maxime Ripard 2013-12-20 215 struct reset_control *reset_control_get(struct device *dev, const char *id)
fc0a5921 Maxime Ripard 2013-12-20 216 {
fc0a5921 Maxime Ripard 2013-12-20 @217 struct reset_control *rstc;
fc0a5921 Maxime Ripard 2013-12-20 218
fc0a5921 Maxime Ripard 2013-12-20 219 if (!dev)
fc0a5921 Maxime Ripard 2013-12-20 220 return ERR_PTR(-EINVAL);
fc0a5921 Maxime Ripard 2013-12-20 221
5d79cb8b Philipp Zabel 2015-11-18 222 return of_reset_control_get(dev->of_node, id);
fc0a5921 Maxime Ripard 2013-12-20 223 }
61fc4131 Philipp Zabel 2012-11-19 224 EXPORT_SYMBOL_GPL(reset_control_get);
61fc4131 Philipp Zabel 2012-11-19 225
:::::: The code at line 217 was first introduced by commit
:::::: fc0a5921561c71be2c334a335c1680f7930434d7 reset: Add of_reset_control_get
:::::: TO: Maxime Ripard <maxime.ripard@free-electrons.com>
:::::: CC: Philipp Zabel <p.zabel@pengutronix.de>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 28235 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-11-18 13:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-18 13:40 [PATCH] reset: remove unused device pointer from struct reset_control Philipp Zabel
2015-11-18 13:54 ` kbuild test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®