mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Alexander Kurz <akurz@blala.de>
To: barebox@lists.infradead.org
Cc: Alexander Kurz <akurz@blala.de>
Subject: [PATCH 3/5] scripts: imx-usb-loader: remove useless variable
Date: Sun, 17 Jul 2016 17:53:16 +0200	[thread overview]
Message-ID: <1468770798-22102-3-git-send-email-akurz@blala.de> (raw)
In-Reply-To: <1468770798-22102-1-git-send-email-akurz@blala.de>

Remove a variable raising complexity for no reason.

Signed-off-by: Alexander Kurz <akurz@blala.de>
---
 scripts/imx/imx-usb-loader.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/scripts/imx/imx-usb-loader.c b/scripts/imx/imx-usb-loader.c
index 17551e3..9607ce6 100644
--- a/scripts/imx/imx-usb-loader.c
+++ b/scripts/imx/imx-usb-loader.c
@@ -1029,7 +1029,6 @@ static int do_irom_download(struct usb_work *curr, int verify)
 	unsigned char *buf = NULL;
 	unsigned char *image;
 	unsigned char *verify_buffer = NULL;
-	unsigned char *p;
 	unsigned char tmp[64];
 	unsigned dladdr = 0;
 	unsigned max_length;
@@ -1102,7 +1101,6 @@ static int do_irom_download(struct usb_work *curr, int verify)
 
 	image = buf + skip;
 
-	p = image;
 	cnt -= skip;
 	fsize -= skip;
 
@@ -1120,7 +1118,7 @@ static int do_irom_download(struct usb_work *curr, int verify)
 			goto cleanup;
 		}
 
-		memcpy(verify_buffer, p, 64);
+		memcpy(verify_buffer, image, 64);
 
 		if ((type == FT_APP) && (usb_id->mach_id->mode != MODE_HID)) {
 			type = FT_LOAD_ONLY;
-- 
2.1.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2016-07-17 15:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-17 15:53 [PATCH 1/5] scripts: imx-usb-loader: const function args Alexander Kurz
2016-07-17 15:53 ` [PATCH 2/5] scripts: imx-usb-loader: remove useless code Alexander Kurz
2016-07-17 15:53 ` Alexander Kurz [this message]
2016-07-17 15:53 ` [PATCH 4/5] scripts: imx-usb-loader: structured protocol access Alexander Kurz
2016-07-17 15:53 ` [PATCH 5/5] scripts: imx-usb-loader: split off topic-code into functions Alexander Kurz
2016-07-17 16:19   ` Alexander Shiyan
2016-07-17 20:31     ` Alexander Kurz
2016-07-18  6:12       ` Sascha Hauer

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=1468770798-22102-3-git-send-email-akurz@blala.de \
    --to=akurz@blala.de \
    --cc=barebox@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox