Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1589346
| From | Laurentiu Tudor <laurentiu.tudor@nxp.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] staging: fsl-mc: fix warning in DT ranges parser |
| Date | 2017-02-28 11:40 +0100 |
| Message-ID | <tfNmi-3aH-5@gated-at.bofh.it> (permalink) |
| References | <tfB1L-2XP-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Arnd, On 02/27/2017 10:42 PM, Arnd Bergmann wrote: > The fsl-mc-bus driver in staging contains a copy of the standard > 'ranges' property parsing algorithm with a hack to treat a missing > property the same way as an empty one. This code produces false-positive > warnings for me in an allmodconfig build: > > drivers/staging/fsl-mc/bus/fsl-mc-bus.c: In function 'fsl_mc_bus_probe': > drivers/staging/fsl-mc/bus/fsl-mc-bus.c:645:6: error: 'mc_size_cells' may be used uninitialized in this function [-Werror=maybe-uninitialized] > drivers/staging/fsl-mc/bus/fsl-mc-bus.c:682:8: error: 'mc_addr_cells' may be used uninitialized in this function [-Werror=maybe-uninitialized] > drivers/staging/fsl-mc/bus/fsl-mc-bus.c:644:6: note: 'mc_addr_cells' was declared here > drivers/staging/fsl-mc/bus/fsl-mc-bus.c:684:8: error: 'paddr_cells' may be used uninitialized in this function [-Werror=maybe-uninitialized] > drivers/staging/fsl-mc/bus/fsl-mc-bus.c:643:6: note: 'paddr_cells' was declared here > > To avoid the warnings, I'm simplifying the argument handling to pass > the number of valid ranges in the property as the function return code > rather than passing it by reference. With this change, gcc can see that > we don't evaluate the cell numbers for an missing ranges property. > > Signed-off-by: Arnd Bergmann <arnd@arndb.de> Looks good to me, i've tested it and did not see any issues, so here's an: Acked-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> --- Thanks & Best Regards, Laurentiu
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] staging: fsl-mc: fix warning in DT ranges parser Arnd Bergmann <arnd@arndb.de> - 2017-02-27 22:30 +0100 Re: [PATCH] staging: fsl-mc: fix warning in DT ranges parser Laurentiu Tudor <laurentiu.tudor@nxp.com> - 2017-02-28 11:40 +0100
csiph-web