Re: [PATCH v9 2/8] drm/print: Fix and add support for NULL as first argument in drm_* macros

2023-06-07 Thread Siddh Raman Pant
On Tue, 06 Jun 2023 19:35:12 +0530, Laurent Pinchart wrote: > Hi Siddh, > > Thank you for the patch. Anytime :) > On Tue, Jun 06, 2023 at 04:15:16PM +0530, Siddh Raman Pant wrote: > > Comments say macros DRM_DEBUG_* are deprecated in favor of > > drm_dbg_*(NULL, ...), but they have broken suppor

[PATCH v9 2/8] drm/print: Fix and add support for NULL as first argument in drm_* macros

2023-06-07 Thread Siddh Raman Pant
Comments say macros DRM_DEBUG_* are deprecated in favor of drm_dbg_*(NULL, ...), but they have broken support for it, as the macro will result in `(NULL) ? (NULL)->dev : NULL`. Thus, fix them by separating logic to get dev ptr in a new function, which will return the dev ptr if arg is not NULL. Us

Re: [PATCH v9 2/8] drm/print: Fix and add support for NULL as first argument in drm_* macros

2023-06-06 Thread Laurent Pinchart
On Tue, Jun 06, 2023 at 08:04:39PM +0530, Siddh Raman Pant wrote: > On Tue, 06 Jun 2023 19:35:12 +0530, Laurent Pinchart wrote: > > Hi Siddh, > > > > Thank you for the patch. > > Anytime :) > > > On Tue, Jun 06, 2023 at 04:15:16PM +0530, Siddh Raman Pant wrote: > > > Comments say macros DRM_DEBU

Re: [PATCH v9 2/8] drm/print: Fix and add support for NULL as first argument in drm_* macros

2023-06-06 Thread Laurent Pinchart
Hi Siddh, Thank you for the patch. On Tue, Jun 06, 2023 at 04:15:16PM +0530, Siddh Raman Pant wrote: > Comments say macros DRM_DEBUG_* are deprecated in favor of > drm_dbg_*(NULL, ...), but they have broken support for it, > as the macro will result in `(NULL) ? (NULL)->dev : NULL`. What's the p