Re: [PATCH 5/5] brcm80211: remove the rest of broadcom specific byte swapping routines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 20 February 2011 19:43, Stanislav Fomichev <kernel@xxxxxxxxxxx> wrote:
> (...)
> diff --git a/drivers/staging/brcm80211/util/bcmsrom.c b/drivers/staging/brcm80211/util/bcmsrom.c
> index b26877c..c4cfd96 100644
> --- a/drivers/staging/brcm80211/util/bcmsrom.c
> +++ b/drivers/staging/brcm80211/util/bcmsrom.c
> @@ -25,7 +25,6 @@
> Â#include <hndsoc.h>
> Â#include <sbchipc.h>
> Â#include <bcmdevs.h>
> -#include <bcmendian.h>
> Â#include <pcicfg.h>
> Â#include <siutils.h>
> Â#include <bcmsrom.h>
> @@ -1438,6 +1437,18 @@ srom_cc_cmd(si_t *sih, struct osl_info *osh, void *ccregs, u32 cmd,
> Â Â Â Â Â Â Â Âreturn 0xffff;
> Â}
>
> +static inline ltoh16_buf(u16 *buf, unsigned int size)
> +{
> + Â Â Â for (size /= 2; size; size--)
> + Â Â Â Â Â Â Â le16_to_cpu(*(buf + size));

Shouldn't this be something like *(buf + size) = le16_to_cpu(*(buf +
size));? Else the actual buffer content won't be changed.

> +}
> +
> +static inline htol16_buf(u16 *buf, unsigned int size)
> +{
> + Â Â Â for (size /= 2; size; size--)
> + Â Â Â Â Â Â Â cpu_to_le16(*(buf + size));
> +}
> +

Same here.


Regards,
Jonas Gorski
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux