[Mjpeg-users] [PATCH v3 1/4] staging: media: zoran: add logging macros

2022-05-06 Thread Ian Cowan
This adds the zrdev_dbg() (pointing to pci_dbg()), zrdev_err() (pointing to pci_err()), and zrdev_info() (pointing to pci_info()) macros to the zoran drivers. These are the preferred method for debugging and this will allow to extract the device from the zoran struct to make the call. Signed-off-b

Re: [Mjpeg-users] [PATCH v2 4/4] staging: media: zoran: replace dprintk with new debugging macros

2022-05-06 Thread Ian Cowan
On Thu, Apr 28, 2022 at 10:15:03AM +0200, Hans Verkuil wrote: > Hi Ian, > > When I compiled this patch series with smatch I got these warnings: > > zoran/videocodec.c:45 videocodec_attach() warn: variable dereferenced before > check 'master' (see line 40) > zoran/videocodec.c:115 videocodec_deta

[Mjpeg-users] [PATCH v3 4/4] staging: media: zoran: replace dprintk with new debugging macros

2022-05-06 Thread Ian Cowan
This replaces all of the dprintk macro calls with the zrdev_dbg, zrdev_info, or zrdev_err calls as appropriate. This allows for the removal of the dprintk macro from each file it is defined in, along with the removal of module params that track the debugging level. In the case that the debugging l

[Mjpeg-users] [PATCH v3 3/4] staging: media: zoran: replace all pr_err with zrdev_err as appropriate

2022-05-06 Thread Ian Cowan
This replaces all of the pr_err calls to the preferred zrdev_err macro that calls the dev_err macro. There are a few locations where the pr_err is left because a zoran struct cannot be created. This is the result of error handling for another struct's existence that is required to create a zoran st

[Mjpeg-users] [PATCH v3 2/4] staging: media: zoran: setup videocodec header for debugging macros

2022-05-06 Thread Ian Cowan
This adds inline functions in the videocodec header file to convert the videocodec and videocodec_master structs to their respective contained zoran struct. This will be used to pass the zoran struct to the zrdev_XXX() macros defined in the zoran header. In the zoran header, the new include is add

Re: [Mjpeg-users] [PATCH v2 4/4] staging: media: zoran: replace dprintk with new debugging macros

2022-05-06 Thread Dan Carpenter
On Fri, May 06, 2022 at 01:30:12AM -0400, Ian Cowan wrote: > On Thu, Apr 28, 2022 at 10:15:03AM +0200, Hans Verkuil wrote: > > Hi Ian, > > > > When I compiled this patch series with smatch I got these warnings: > > > > zoran/videocodec.c:45 videocodec_attach() warn: variable dereferenced > > bef

Re: [Mjpeg-users] [PATCH v2 4/4] staging: media: zoran: replace dprintk with new debugging macros

2022-05-06 Thread Ian Cowan
On Fri, May 06, 2022 at 10:14:55AM +0300, Dan Carpenter wrote: > On Fri, May 06, 2022 at 01:30:12AM -0400, Ian Cowan wrote: > > On Thu, Apr 28, 2022 at 10:15:03AM +0200, Hans Verkuil wrote: > > > Hi Ian, > > > > > > When I compiled this patch series with smatch I got these warnings: > > > > > > z