Re: [PATCH] fpga: fpga-mgr: remove unnecessary code in __fpga_mgr_get

2017-10-27 Thread Gustavo A. R. Silva
Quoting Alan Tull : On Fri, Oct 27, 2017 at 2:09 PM, Gustavo A. R. Silva wrote: Hi Alan, Quoting Alan Tull : On Thu, Oct 26, 2017 at 6:02 PM, Gustavo A. R. Silva wrote: Hi Gustavo, Thanks for pointing that out. There's also a similar thing in fpga-bridge.c that I need to fix. Can yo

Re: [PATCH] fpga: fpga-mgr: remove unnecessary code in __fpga_mgr_get

2017-10-27 Thread Alan Tull
On Fri, Oct 27, 2017 at 2:09 PM, Gustavo A. R. Silva wrote: > Hi Alan, > > Quoting Alan Tull : > >> On Thu, Oct 26, 2017 at 6:02 PM, Gustavo A. R. Silva >> wrote: >> >> Hi Gustavo, >> >> Thanks for pointing that out. There's also a similar thing in >> fpga-bridge.c that I need to fix. >> > > Can

Re: [PATCH] fpga: fpga-mgr: remove unnecessary code in __fpga_mgr_get

2017-10-27 Thread Gustavo A. R. Silva
Hi Alan, Quoting Alan Tull : On Thu, Oct 26, 2017 at 6:02 PM, Gustavo A. R. Silva wrote: Hi Gustavo, Thanks for pointing that out. There's also a similar thing in fpga-bridge.c that I need to fix. Can you share with me what exactly are you trying to fix? If the issue is similar I might

Re: [PATCH] fpga: fpga-mgr: remove unnecessary code in __fpga_mgr_get

2017-10-27 Thread Alan Tull
On Thu, Oct 26, 2017 at 6:02 PM, Gustavo A. R. Silva wrote: Hi Gustavo, Thanks for pointing that out. There's also a similar thing in fpga-bridge.c that I need to fix. Alan > Notice that mgr = to_fpga_manager(dev); expands to: > > mgr = container_of(dev, struct fpga_manager, dev); > > and con

[PATCH] fpga: fpga-mgr: remove unnecessary code in __fpga_mgr_get

2017-10-26 Thread Gustavo A. R. Silva
Notice that mgr = to_fpga_manager(dev); expands to: mgr = container_of(dev, struct fpga_manager, dev); and container_of is never null, so this null check is unnecessary. Addresses-Coverity-ID: 1397916 Signed-off-by: Gustavo A. R. Silva --- drivers/fpga/fpga-mgr.c | 2 -- 1 file changed, 2 dele