From patchwork Mon May 13 20:31:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 243531 X-Patchwork-Delegate: wd@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id DF7042C009F for ; Tue, 14 May 2013 06:32:46 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DEAFB4A039; Mon, 13 May 2013 22:32:36 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vOK9cUxdCEAy; Mon, 13 May 2013 22:32:36 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D01F34A03C; Mon, 13 May 2013 22:32:23 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4F22C4A01C for ; Mon, 13 May 2013 22:32:18 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SKEpXWkennE0 for ; Mon, 13 May 2013 22:32:12 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-yh0-f54.google.com (mail-yh0-f54.google.com [209.85.213.54]) by theia.denx.de (Postfix) with ESMTPS id 4CA464A025 for ; Mon, 13 May 2013 22:32:02 +0200 (CEST) Received: by mail-yh0-f54.google.com with SMTP id b12so1657553yha.13 for ; Mon, 13 May 2013 13:32:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=BIXWhXChryZmwJ5eNpHzVP1lJ/cODviCtiUr6FGqBN0=; b=0k2zdhfOBcU5YkS/UCHicyeDcP8x7SY6gvouAva6RZmhZNmDsqYOcC8LneWjtzzAka vMjxHy3pmiEHNmzCyWvoXrtghEisAzM1nDeCVfWVYRw7YPEAHiOOwLAHWAxoC/iVMONL fVecYJ0VO6jDmk4GmpAKRr7aO//1X6nQzWrMnH0EKeySOdvvkNsVdI0qRD8m/5OTtb0N KMUEK8M6bUIZDZU/pV66VHVbDQV07DtWaG+o0xqRWXClLK1099+fCN66YKWUeySoG5aS WkhqTTQ3qRQXq/xQWvLKvyqav0C+fyiy4ptvhcidduESBQLvQwqZ0VYr1zooFHNGm7os EWBQ== X-Received: by 10.236.192.231 with SMTP id i67mr16909422yhn.23.1368477121868; Mon, 13 May 2013 13:32:01 -0700 (PDT) Received: from localhost.localdomain (cpe-065-184-250-089.ec.res.rr.com. [65.184.250.89]) by mx.google.com with ESMTPSA id s20sm17074763yhh.17.2013.05.13.13.32.00 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 13 May 2013 13:32:00 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Date: Mon, 13 May 2013 16:31:57 -0400 Message-Id: <1368477117-32669-4-git-send-email-trini@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1368477117-32669-1-git-send-email-trini@ti.com> References: <1368477117-32669-1-git-send-email-trini@ti.com> Cc: Michael Barkowski Subject: [U-Boot] [PATCH 4/4] mpc8323erdb: Update crc32 check of MAC X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de We need to cast to unsigned char, not unsigned short here to avoid a warning. Cc: Michael Barkowski Signed-off-by: Tom Rini --- board/freescale/mpc8323erdb/mpc8323erdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/freescale/mpc8323erdb/mpc8323erdb.c b/board/freescale/mpc8323erdb/mpc8323erdb.c index f29b2f4..ba4993e 100644 --- a/board/freescale/mpc8323erdb/mpc8323erdb.c +++ b/board/freescale/mpc8323erdb/mpc8323erdb.c @@ -195,7 +195,7 @@ int mac_read_from_eeprom(void) printf("\nEEPROM @ 0x%02x read FAILED!!!\n", CONFIG_SYS_I2C_EEPROM_ADDR); } else { - if (crc32(crc, buf, 24) == *(unsigned int *)&buf[24]) { + if (crc32(crc, buf, 24) == *(unsigned char *)&buf[24]) { printf("Reading MAC from EEPROM\n"); for (i = 0; i < 4; i++) { if (memcmp(&buf[i * 6], "\0\0\0\0\0\0", 6)) {