Commit 37e1370b authored by Al Viro's avatar Al Viro Committed by David S. Miller

drivers/net/irda: endianness, NULL noise

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent c676504e
...@@ -464,7 +464,7 @@ static void mcs_unwrap_fir(struct mcs_cb *mcs, __u8 *buf, int len) ...@@ -464,7 +464,7 @@ static void mcs_unwrap_fir(struct mcs_cb *mcs, __u8 *buf, int len)
} }
fcs = ~(crc32_le(~0, buf, new_len)); fcs = ~(crc32_le(~0, buf, new_len));
if(fcs != le32_to_cpu(get_unaligned((u32 *)(buf+new_len)))) { if(fcs != le32_to_cpu(get_unaligned((__le32 *)(buf+new_len)))) {
IRDA_ERROR("crc error calc 0x%x len %d\n", fcs, new_len); IRDA_ERROR("crc error calc 0x%x len %d\n", fcs, new_len);
mcs->stats.rx_errors++; mcs->stats.rx_errors++;
mcs->stats.rx_crc_errors++; mcs->stats.rx_crc_errors++;
......
...@@ -414,7 +414,7 @@ EXPORT_SYMBOL(sirdev_raw_read); ...@@ -414,7 +414,7 @@ EXPORT_SYMBOL(sirdev_raw_read);
int sirdev_set_dtr_rts(struct sir_dev *dev, int dtr, int rts) int sirdev_set_dtr_rts(struct sir_dev *dev, int dtr, int rts)
{ {
int ret = -ENXIO; int ret = -ENXIO;
if (dev->drv->set_dtr_rts != 0) if (dev->drv->set_dtr_rts)
ret = dev->drv->set_dtr_rts(dev, dtr, rts); ret = dev->drv->set_dtr_rts(dev, dtr, rts);
return ret; return ret;
} }
......
...@@ -332,7 +332,7 @@ static void fir_eof(struct stir_cb *stir) ...@@ -332,7 +332,7 @@ static void fir_eof(struct stir_cb *stir)
} }
fcs = ~(crc32_le(~0, rx_buff->data, len)); fcs = ~(crc32_le(~0, rx_buff->data, len));
if (fcs != le32_to_cpu(get_unaligned((u32 *)(rx_buff->data+len)))) { if (fcs != le32_to_cpu(get_unaligned((__le32 *)(rx_buff->data+len)))) {
pr_debug("crc error calc 0x%x len %d\n", fcs, len); pr_debug("crc error calc 0x%x len %d\n", fcs, len);
stir->stats.rx_errors++; stir->stats.rx_errors++;
stir->stats.rx_crc_errors++; stir->stats.rx_crc_errors++;
......
...@@ -537,10 +537,10 @@ calc_width_bits(unsigned baudrate, unsigned widthselect, unsigned clockselect) ...@@ -537,10 +537,10 @@ calc_width_bits(unsigned baudrate, unsigned widthselect, unsigned clockselect)
*/ */
struct ring_descr_hw { struct ring_descr_hw {
volatile u16 rd_count; /* tx/rx count [11:0] */ volatile __le16 rd_count; /* tx/rx count [11:0] */
u16 reserved; __le16 reserved;
union { union {
u32 addr; /* [23:0] of the buffer's busaddress */ __le32 addr; /* [23:0] of the buffer's busaddress */
struct { struct {
u8 addr_res[3]; u8 addr_res[3];
volatile u8 status; /* descriptor status */ volatile u8 status; /* descriptor status */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment