All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Ohad Ben-Cohen <ohad@wizery.com>,
	Bjorn Andersson <bjorn.andersson@sonymobile.com>
Cc: linux-remoteproc@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] remoteproc: qcom: remove some bogus error handling
Date: Wed, 29 Jun 2016 14:40:55 +0000	[thread overview]
Message-ID: <20160629144055.GB22818@mwanda> (raw)

"val" can't be negative because it's unsigned and also readl() doesn't
return negative error codes.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/remoteproc/qcom_q6v5_pil.c b/drivers/remoteproc/qcom_q6v5_pil.c
index fb4c56c..8abc369 100644
--- a/drivers/remoteproc/qcom_q6v5_pil.c
+++ b/drivers/remoteproc/qcom_q6v5_pil.c
@@ -386,7 +386,6 @@ static int q6v5_mpss_validate(struct q6v5 *qproc, const struct firmware *fw)
 	phys_addr_t fw_addr;
 	bool relocate;
 	size_t size;
-	u32 val;
 	int ret;
 	int i;
 
@@ -425,8 +424,7 @@ static int q6v5_mpss_validate(struct q6v5 *qproc, const struct firmware *fw)
 		writel(size, qproc->rmb_base + RMB_PMI_CODE_LENGTH_REG);
 	}
 
-	val = readl(qproc->rmb_base + RMB_MBA_STATUS_REG);
-	return val < 0 ? val : 0;
+	return readl(qproc->rmb_base + RMB_MBA_STATUS_REG);
 }
 
 static int q6v5_mpss_load(struct q6v5 *qproc)

WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Ohad Ben-Cohen <ohad@wizery.com>,
	Bjorn Andersson <bjorn.andersson@sonymobile.com>
Cc: linux-remoteproc@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] remoteproc: qcom: remove some bogus error handling
Date: Wed, 29 Jun 2016 17:40:55 +0300	[thread overview]
Message-ID: <20160629144055.GB22818@mwanda> (raw)

"val" can't be negative because it's unsigned and also readl() doesn't
return negative error codes.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/remoteproc/qcom_q6v5_pil.c b/drivers/remoteproc/qcom_q6v5_pil.c
index fb4c56c..8abc369 100644
--- a/drivers/remoteproc/qcom_q6v5_pil.c
+++ b/drivers/remoteproc/qcom_q6v5_pil.c
@@ -386,7 +386,6 @@ static int q6v5_mpss_validate(struct q6v5 *qproc, const struct firmware *fw)
 	phys_addr_t fw_addr;
 	bool relocate;
 	size_t size;
-	u32 val;
 	int ret;
 	int i;
 
@@ -425,8 +424,7 @@ static int q6v5_mpss_validate(struct q6v5 *qproc, const struct firmware *fw)
 		writel(size, qproc->rmb_base + RMB_PMI_CODE_LENGTH_REG);
 	}
 
-	val = readl(qproc->rmb_base + RMB_MBA_STATUS_REG);
-	return val < 0 ? val : 0;
+	return readl(qproc->rmb_base + RMB_MBA_STATUS_REG);
 }
 
 static int q6v5_mpss_load(struct q6v5 *qproc)

             reply	other threads:[~2016-06-29 14:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-29 14:40 Dan Carpenter [this message]
2016-06-29 14:40 ` [patch] remoteproc: qcom: remove some bogus error handling Dan Carpenter
2016-07-05 23:43 ` Bjorn Andersson
2016-07-05 23:43   ` Bjorn Andersson

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=20160629144055.GB22818@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=bjorn.andersson@sonymobile.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=ohad@wizery.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.