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>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1317740528-23110-1-git-send-email-jic23@cam.ac.uk>
Date:	Tue,  4 Oct 2011 16:02:08 +0100
From:	Jonathan Cameron <jic23@....ac.uk>
To:	greg@...ah.com, sfr@...b.auug.org.au
Cc:	linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
	Jonathan Cameron <jic23@....ac.uk>
Subject: [PATCH] staging;iio: if(__LITTLE_ENDIAN) -> #ifdef __LITTLE_ENDIAN

Unsuprisingly this symbol isn't defined on big endian systems.

Signed-off-by: Jonathan Cameron <jic23@....ac.uk>
Reported-by: Stephen Rothwell <sfr@...b.auug.org.au>
---

Sorry about this one.  Stupid mistake and I didn't have a cross compiler
for anything big endian set up.  Now I do. This time build tested on
arm, x86-64 and 32bit powerpc.

 drivers/staging/iio/industrialio-buffer.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/iio/industrialio-buffer.c b/drivers/staging/iio/industrialio-buffer.c
index 4ce101a..60929ff 100644
--- a/drivers/staging/iio/industrialio-buffer.c
+++ b/drivers/staging/iio/industrialio-buffer.c
@@ -104,10 +104,11 @@ static ssize_t iio_show_fixed_type(struct device *dev,
 	u8 type = this_attr->c->scan_type.endianness;
 
 	if (type == IIO_CPU) {
-		if (__LITTLE_ENDIAN)
-			type = IIO_LE;
-		else
-			type = IIO_BE;
+#ifdef __LITTLE_ENDIAN
+		type = IIO_LE;
+#else
+		type = IIO_BE;
+#endif
 	}
 	return sprintf(buf, "%s:%c%d/%d>>%u\n",
 		       iio_endian_prefix[type],
-- 
1.7.3.4

--
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