Re: [PATCH] rtc: mcp795: remove VLA usage

2018-03-13 Thread Alexandre Belloni
On 13/03/2018 at 09:29:33 +0100, Stefano Manni wrote: > Hi, > > 2018-03-13 0:31 GMT+01:00 Alexandre Belloni > : > > Hi, > > > > On 13/03/2018 at 00:13:38 +0100, Stefano Manni wrote: > >> In preparation to enabling -Wvla, remove VLAs and replace them with > >>

Re: [PATCH] rtc: mcp795: remove VLA usage

2018-03-13 Thread Alexandre Belloni
On 13/03/2018 at 09:29:33 +0100, Stefano Manni wrote: > Hi, > > 2018-03-13 0:31 GMT+01:00 Alexandre Belloni > : > > Hi, > > > > On 13/03/2018 at 00:13:38 +0100, Stefano Manni wrote: > >> In preparation to enabling -Wvla, remove VLAs and replace them with > >> fixed-length arrays instead. > >> >

Re: [PATCH] rtc: mcp795: remove VLA usage

2018-03-13 Thread Stefano Manni
Hi, 2018-03-13 0:31 GMT+01:00 Alexandre Belloni : > Hi, > > On 13/03/2018 at 00:13:38 +0100, Stefano Manni wrote: >> In preparation to enabling -Wvla, remove VLAs and replace them with >> fixed-length arrays instead. >> >> rtc-mcp795.c uses a variable-length

Re: [PATCH] rtc: mcp795: remove VLA usage

2018-03-13 Thread Stefano Manni
Hi, 2018-03-13 0:31 GMT+01:00 Alexandre Belloni : > Hi, > > On 13/03/2018 at 00:13:38 +0100, Stefano Manni wrote: >> In preparation to enabling -Wvla, remove VLAs and replace them with >> fixed-length arrays instead. >> >> rtc-mcp795.c uses a variable-length array declaration to contain >> the

Re: [PATCH] rtc: mcp795: remove VLA usage

2018-03-12 Thread Alexandre Belloni
Hi, On 13/03/2018 at 00:13:38 +0100, Stefano Manni wrote: > In preparation to enabling -Wvla, remove VLAs and replace them with > fixed-length arrays instead. > > rtc-mcp795.c uses a variable-length array declaration to contain > the command to write the rtcc; this can be replaced by a fixed- >

Re: [PATCH] rtc: mcp795: remove VLA usage

2018-03-12 Thread Alexandre Belloni
Hi, On 13/03/2018 at 00:13:38 +0100, Stefano Manni wrote: > In preparation to enabling -Wvla, remove VLAs and replace them with > fixed-length arrays instead. > > rtc-mcp795.c uses a variable-length array declaration to contain > the command to write the rtcc; this can be replaced by a fixed- >

[PATCH] rtc: mcp795: remove VLA usage

2018-03-12 Thread Stefano Manni
In preparation to enabling -Wvla, remove VLAs and replace them with fixed-length arrays instead. rtc-mcp795.c uses a variable-length array declaration to contain the command to write the rtcc; this can be replaced by a fixed- size array of length 2 (instruction, address) + 32 (data out), assuming

[PATCH] rtc: mcp795: remove VLA usage

2018-03-12 Thread Stefano Manni
In preparation to enabling -Wvla, remove VLAs and replace them with fixed-length arrays instead. rtc-mcp795.c uses a variable-length array declaration to contain the command to write the rtcc; this can be replaced by a fixed- size array of length 2 (instruction, address) + 32 (data out), assuming