From: Roland Stigge <stigge@antcom.de>
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] Use of swab16() in drivers/hwmon/*.c
Date: Fri, 07 Jan 2011 10:37:15 +0000 [thread overview]
Message-ID: <4D26ECDB.7010602@antcom.de> (raw)
Hi,
I wonder about a specific use of swab16() in several files
in drivers/hwmon/.
Consider ds1621.c: We get big endian words from
i2c_smbus_read_word_data(). To use it on a little endian arch, the
driver uses swab16() for conversion by swapping bytes unconditionally.
IMHO this is not suitable on a big endian architecture. Shouldn't it be
sth. like be16_to_cpu()?
Thanks in advance.
bye,
Roland
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
next reply other threads:[~2011-01-07 10:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-07 10:37 Roland Stigge [this message]
2011-01-07 10:59 ` [lm-sensors] Use of swab16() in drivers/hwmon/*.c Jean Delvare
2011-01-07 12:56 ` Roland Stigge
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=4D26ECDB.7010602@antcom.de \
--to=stigge@antcom.de \
--cc=lm-sensors@vger.kernel.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 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.