From: Cong Ding <dinggnu@gmail.com>
To: Benoit Cousson <b-cousson@ti.com>, Aneesh V <aneesh@ti.com>,
Santosh Shilimkar <santosh.shilimkar@ti.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Grant Likely <grant.likely@secretlab.ca>,
linux-kernel@vger.kernel.org
Cc: Cong Ding <dinggnu@gmail.com>
Subject: [PATCH] memory: of_memory.c: remove unnecessary initialization
Date: Tue, 4 Dec 2012 11:26:59 +0000 [thread overview]
Message-ID: <1354620448-14317-1-git-send-email-dinggnu@gmail.com> (raw)
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
next reply other threads:[~2012-12-04 11:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-04 11:26 Cong Ding [this message]
2012-12-04 11:44 ` [PATCH] memory: of_memory.c: remove unnecessary initialization 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1354620448-14317-1-git-send-email-dinggnu@gmail.com \
--to=dinggnu@gmail.com \
--cc=aneesh@ti.com \
--cc=b-cousson@ti.com \
--cc=grant.likely@secretlab.ca \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=santosh.shilimkar@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.