From 2aadecb60a33c791bfb729d65c158a22f636961a Mon Sep 17 00:00:00 2001 From: Ksenija Stanojevic Date: Sat, 31 Oct 2015 06:36:44 -0700 Subject: [PATCH] Staging: comedi: adl_pci9118: Fix endian sparse warning Fix following sparse warning: warning: cast to restricted __be16 data is pointer of type void and can be used to store any type of data. barray and array have the same 16 bit offset. Signed-off-by: Ksenija Stanojevic Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adl_pci9118.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/adl_pci9118.c b/drivers/staging/comedi/drivers/adl_pci9118.c index 0dff1dbb53fb..4437ea3abe8d 100644 --- a/drivers/staging/comedi/drivers/adl_pci9118.c +++ b/drivers/staging/comedi/drivers/adl_pci9118.c @@ -603,10 +603,11 @@ static void pci9118_ai_munge(struct comedi_device *dev, unsigned short *array = data; unsigned int num_samples = comedi_bytes_to_samples(s, num_bytes); unsigned int i; + __be16 *barray = data; for (i = 0; i < num_samples; i++) { if (devpriv->usedma) - array[i] = be16_to_cpu(array[i]); + array[i] = be16_to_cpu(barray[i]); if (s->maxdata == 0xffff) array[i] ^= 0x8000; else -- 2.20.1