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


Groups > linux.kernel > #1461519 > unrolled thread

[PATCH 03/13] remoteproc: use variable names for sizeof() operator

Started bySuman Anna <s-anna@ti.com>
First post2016-08-13 01:50 +0200
Last post2016-08-13 01:50 +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 03/13] remoteproc: use variable names for sizeof() operator Suman Anna <s-anna@ti.com> - 2016-08-13 01:50 +0200

#1461519 — [PATCH 03/13] remoteproc: use variable names for sizeof() operator

FromSuman Anna <s-anna@ti.com>
Date2016-08-13 01:50 +0200
Subject[PATCH 03/13] remoteproc: use variable names for sizeof() operator
Message-ID<s5un8-6A-21@gated-at.bofh.it>
Fix the code formatting to use the kernel preferred style
of using the actual variables to determize the size using
the sizeof() operator.

Signed-off-by: Suman Anna <s-anna@ti.com>
---
 drivers/remoteproc/remoteproc_core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
index e1644c992839..140b580477e3 100644
--- a/drivers/remoteproc/remoteproc_core.c
+++ b/drivers/remoteproc/remoteproc_core.c
@@ -358,7 +358,7 @@ static int rproc_handle_vdev(struct rproc *rproc, struct fw_rsc_vdev *rsc,
 		return -EINVAL;
 	}
 
-	rvdev = kzalloc(sizeof(struct rproc_vdev), GFP_KERNEL);
+	rvdev = kzalloc(sizeof(*rvdev), GFP_KERNEL);
 	if (!rvdev)
 		return -ENOMEM;
 
@@ -1359,7 +1359,7 @@ struct rproc *rproc_alloc(struct device *dev, const char *name,
 		 */
 		name_len = strlen(name) + strlen(template) - 2 + 1;
 
-	rproc = kzalloc(sizeof(struct rproc) + len + name_len, GFP_KERNEL);
+	rproc = kzalloc(sizeof(*rproc) + len + name_len, GFP_KERNEL);
 	if (!rproc)
 		return NULL;
 
-- 
2.9.0

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web