Re: ASoC: rsnd: fix sound route path when using SRC6/SRC9

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

 



Hi Geert

> > @@ -70,16 +71,19 @@ static int rsnd_cmd_init(struct rsnd_mod *mod,
> >         } else {
> >                 struct rsnd_mod *src = rsnd_io_to_mod_src(io);
> >
> > -               u32 path[] = {
> > -                       [0] = 0x30000,
> > -                       [1] = 0x30001,
> > -                       [2] = 0x40000,
> > -                       [3] = 0x10000,
> > -                       [4] = 0x20000,
> > -                       [5] = 0x40100
> > +               u8 cmd_case[] = {
> > +                       [0] = 0x3,
> > +                       [1] = 0x3,
> > +                       [2] = 0x4,
> > +                       [3] = 0x1,
> > +                       [4] = 0x2,
> > +                       [5] = 0x4,
> > +                       [6] = 0x1,
> > +                       [9] = 0x2,
> >                 };
> >
> > -               data = path[rsnd_mod_id(src)];
> > +               data = path[rsnd_mod_id(src)] |
> 
> With gcc 4.9.0:
> 
>     sound/soc/sh/rcar/cmd.c: In function 'rsnd_cmd_init':
>     sound/soc/sh/rcar/cmd.c:85:14: warning: array subscript is below
> array bounds [-Warray-bounds]
>        data = path[rsnd_mod_id(src)] |

Hmm....
I tried random code/compile, but gcc behavior seems strange.
Fore example if I removed next line, this warning disappeard

-		data = path[rsnd_mod_id(src)] |
-			cmd_case[rsnd_mod_id(src)] << 16;
+		data = path[rsnd_mod_id(src)];

Is this related to this ?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59124



Best regards
---
Kuninori Morimoto



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux