linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] memory: of_memory.c: remove unnecessary initialization
@ 2012-12-04 11:26 Cong Ding
  2012-12-04 11:44 ` Santosh Shilimkar
  0 siblings, 1 reply; 8+ messages in thread
From: Cong Ding @ 2012-12-04 11:26 UTC (permalink / raw)
  To: Benoit Cousson, Aneesh V, Santosh Shilimkar, Greg Kroah-Hartman,
	Grant Likely, linux-kernel
  Cc: Cong Ding

the initialization of variable ret is unnecessary, we can remove it while save
one time "or" operation.

Signed-off-by: Cong Ding <dinggnu@gmail.com>
---
 drivers/memory/of_memory.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/memory/of_memory.c b/drivers/memory/of_memory.c
index 6007435..c59a946 100644
--- a/drivers/memory/of_memory.c
+++ b/drivers/memory/of_memory.c
@@ -30,14 +30,14 @@
 const struct lpddr2_min_tck *of_get_min_tck(struct device_node *np,
 		struct device *dev)
 {
-	int			ret = 0;
+	int			ret;
 	struct lpddr2_min_tck	*min;
 
 	min = devm_kzalloc(dev, sizeof(*min), GFP_KERNEL);
 	if (!min)
 		goto default_min_tck;
 
-	ret |= of_property_read_u32(np, "tRPab-min-tck", &min->tRPab);
+	ret = of_property_read_u32(np, "tRPab-min-tck", &min->tRPab);
 	ret |= of_property_read_u32(np, "tRCD-min-tck", &min->tRCD);
 	ret |= of_property_read_u32(np, "tWR-min-tck", &min->tWR);
 	ret |= of_property_read_u32(np, "tRASmin-min-tck", &min->tRASmin);
-- 
1.7.4.5


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-12-24  9:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-04 11:26 [PATCH] memory: of_memory.c: remove unnecessary initialization Cong Ding
2012-12-04 11:44 ` Santosh Shilimkar
2012-12-04 13:55   ` Grant Likely
2012-12-04 14:46     ` Santosh Shilimkar
2012-12-05  7:26       ` Li, Zhen-Hua
2012-12-05  7:41         ` Li, Zhen-Hua
2012-12-05 10:06         ` Cong Ding
2012-12-24  9:00           ` Li, Zhen-Hua

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).