Thread (43 messages) read the whole thread 43 messages, 6 authors, 2021-11-18

Re: [PATCH v1 14/19] pinctrl: st: Use temporary variable for struct device

From: Joe Perches <joe@perches.com>
Date: 2021-11-06 07:50:34
Also in: linux-gpio, linux-rockchip, lkml

On Fri, 2021-11-05 at 14:42 +0200, Andy Shevchenko wrote:
Use temporary variable for struct device to make code neater.
[]
quoted hunk ↗ jump to hunk
diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c
[]
quoted hunk ↗ jump to hunk
@@ -814,26 +814,25 @@ static int st_pctl_dt_node_to_map(struct pinctrl_dev *pctldev,
 {
 	struct st_pinctrl *info = pinctrl_dev_get_drvdata(pctldev);
 	const struct st_pctl_group *grp;
+	struct device *dev = info->dev;
[]
-	new_map = devm_kcalloc(pctldev->dev,
-				map_num, sizeof(*new_map), GFP_KERNEL);
+	new_map = devm_kcalloc(dev, map_num, sizeof(*new_map), GFP_KERNEL);
Are pctldev->dev and dev the same pointer?
It seems they are not.
Why reassign the ownership?



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help