All of lore.kernel.org
 help / color / mirror / Atom feed
* [lm-sensors] Use of swab16() in drivers/hwmon/*.c
@ 2011-01-07 10:37 Roland Stigge
  2011-01-07 10:59 ` Jean Delvare
  2011-01-07 12:56 ` Roland Stigge
  0 siblings, 2 replies; 3+ messages in thread
From: Roland Stigge @ 2011-01-07 10:37 UTC (permalink / raw)
  To: lm-sensors

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-01-07 12:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-07 10:37 [lm-sensors] Use of swab16() in drivers/hwmon/*.c Roland Stigge
2011-01-07 10:59 ` Jean Delvare
2011-01-07 12:56 ` Roland Stigge

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.