Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1705013 > unrolled thread

[PATCH 3/3] power: supply: charger-manager: Slighly simplify code

Started byChristophe JAILLET <christophe.jaillet@wanadoo.fr>
First post2017-08-07 00:40 +0200
Last post2017-08-07 00:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3/3] power: supply: charger-manager: Slighly simplify code Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2017-08-07 00:40 +0200

#1705013 — [PATCH 3/3] power: supply: charger-manager: Slighly simplify code

FromChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Date2017-08-07 00:40 +0200
Subject[PATCH 3/3] power: supply: charger-manager: Slighly simplify code
Message-ID<ubCnf-893-3@gated-at.bofh.it>
Use 'sizeof(*var)' instead of the equivalent 'sizeof(data structure type)'
because it is less verbose.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/power/supply/charger-manager.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/power/supply/charger-manager.c b/drivers/power/supply/charger-manager.c
index 83c08c8e2c32..6502fa7c2106 100644
--- a/drivers/power/supply/charger-manager.c
+++ b/drivers/power/supply/charger-manager.c
@@ -1632,8 +1632,7 @@ static int charger_manager_probe(struct platform_device *pdev)
 		return -ENODEV;
 	}
 
-	cm = devm_kzalloc(&pdev->dev,
-			sizeof(struct charger_manager),	GFP_KERNEL);
+	cm = devm_kzalloc(&pdev->dev, sizeof(*cm), GFP_KERNEL);
 	if (!cm)
 		return -ENOMEM;
 
-- 
2.11.0

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web