lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <8565906.sPkd1C9Bg3@wuerfel>
Date:	Mon, 12 Oct 2015 14:55:01 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	Andy Gross <agross@...eaurora.org>
Cc:	Kumar Gala <galak@...eaurora.org>,
	David Brown <davidb@...eaurora.org>,
	linux-arm-msm@...r.kernel.org, linux-soc@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	Hauke Mehrtens <hauke@...ke-m.de>, zajec5@...il.com
Subject: [PATCH] firmware: bcm47xx_nvram: fix typo / build error

The change to the new __ioread32_copy() helper used the
DIV_ROUND_UP macro incorrectly:

drivers/firmware/broadcom/bcm47xx_nvram.c: In function 'nvram_find_and_copy':
drivers/firmware/broadcom/bcm47xx_nvram.c:110:30: error: macro "DIV_ROUND_UP" requires 2 arguments, but only 1 given

The same commit also changed the behavior of the code in big-endian
builds to no longer perform byte swaps, which looks intentional
but was not part of the patch description.

Signed-off-by: Arnd Bergmann <arnd@...db.de>
Fixes: 31e2fab1c36b ("FIRMWARE: bcm47xx_nvram: Use __ioread32_copy() instead of open-coding")

diff --git a/drivers/firmware/broadcom/bcm47xx_nvram.c b/drivers/firmware/broadcom/bcm47xx_nvram.c
index 8f46e6e394b1..0c2f0a61b0ea 100644
--- a/drivers/firmware/broadcom/bcm47xx_nvram.c
+++ b/drivers/firmware/broadcom/bcm47xx_nvram.c
@@ -107,7 +107,7 @@ found:
 	}
 	/* proceed reading data after header */
 	__ioread32_copy(nvram_buf + sizeof(*header), header + 1,
-			DIV_ROUND_UP(nvram_len / 4));
+			DIV_ROUND_UP(nvram_len, 4));
 	nvram_buf[NVRAM_SPACE - 1] = '\0';
 
 	return 0;

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ