All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] This patch replaces all the instances of dev_info with drm_info macro
@ 2021-06-22  6:07 ` Aman Jain
  0 siblings, 0 replies; 10+ messages in thread
From: Aman Jain @ 2021-06-22  6:07 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig, airlied, daniel, amd-gfx,
	linux-kernel

When a driver has multiple instances it is necessary to differentiate
between them in the logs. This was done with dev_info/warn/err since
DRM_INFO/WARN/ERROR don't do this. We now have drm_info/warn/err for
printing the relevant debug messages. Hence, this patch uses
drm_* macros to achieve drm-formatted logging

Signed-off-by: Aman Jain <ahjain2706@gmail.com>
---
 drivers/gpu/drm/radeon/radeon_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
index efeb115ae70e..75e84914c29b 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -308,7 +308,7 @@ static int radeon_pci_probe(struct pci_dev *pdev,
 		case CHIP_VERDE:
 		case CHIP_OLAND:
 		case CHIP_HAINAN:
-			dev_info(&pdev->dev,
+			drm_info(&pdev->dev,
 				 "SI support disabled by module param\n");
 			return -ENODEV;
 		}
@@ -320,7 +320,7 @@ static int radeon_pci_probe(struct pci_dev *pdev,
 		case CHIP_HAWAII:
 		case CHIP_KABINI:
 		case CHIP_MULLINS:
-			dev_info(&pdev->dev,
+			drm_info(&pdev->dev,
 				 "CIK support disabled by module param\n");
 			return -ENODEV;
 		}
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH] This patch replaces all the instances of dev_info with drm_info macro
@ 2021-06-22  6:07 ` Aman Jain
  0 siblings, 0 replies; 10+ messages in thread
From: Aman Jain @ 2021-06-22  6:07 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig, airlied, daniel, amd-gfx,
	linux-kernel

When a driver has multiple instances it is necessary to differentiate
between them in the logs. This was done with dev_info/warn/err since
DRM_INFO/WARN/ERROR don't do this. We now have drm_info/warn/err for
printing the relevant debug messages. Hence, this patch uses
drm_* macros to achieve drm-formatted logging

Signed-off-by: Aman Jain <ahjain2706@gmail.com>
---
 drivers/gpu/drm/radeon/radeon_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
index efeb115ae70e..75e84914c29b 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -308,7 +308,7 @@ static int radeon_pci_probe(struct pci_dev *pdev,
 		case CHIP_VERDE:
 		case CHIP_OLAND:
 		case CHIP_HAINAN:
-			dev_info(&pdev->dev,
+			drm_info(&pdev->dev,
 				 "SI support disabled by module param\n");
 			return -ENODEV;
 		}
@@ -320,7 +320,7 @@ static int radeon_pci_probe(struct pci_dev *pdev,
 		case CHIP_HAWAII:
 		case CHIP_KABINI:
 		case CHIP_MULLINS:
-			dev_info(&pdev->dev,
+			drm_info(&pdev->dev,
 				 "CIK support disabled by module param\n");
 			return -ENODEV;
 		}
-- 
2.30.2

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] This patch replaces all the instances of dev_info with drm_info macro
  2021-06-22  6:07 ` Aman Jain
@ 2021-06-22  6:40   ` Christian König
  -1 siblings, 0 replies; 10+ messages in thread
From: Christian König @ 2021-06-22  6:40 UTC (permalink / raw)
  To: Aman Jain, alexander.deucher, airlied, daniel, amd-gfx, linux-kernel

Am 22.06.21 um 08:07 schrieb Aman Jain:
> When a driver has multiple instances it is necessary to differentiate
> between them in the logs. This was done with dev_info/warn/err since
> DRM_INFO/WARN/ERROR don't do this. We now have drm_info/warn/err for
> printing the relevant debug messages. Hence, this patch uses
> drm_* macros to achieve drm-formatted logging

Well first of all patches for radeon should have a drm/radeon prefix in 
its subject line.

Then I don't think this patch makes sense since this is about the 
hardware support of the module and not even remotely drm related.

So we most likely don't want the drm-formating here in the first place.

Regards,
Christian.

>
> Signed-off-by: Aman Jain <ahjain2706@gmail.com>
> ---
>   drivers/gpu/drm/radeon/radeon_drv.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
> index efeb115ae70e..75e84914c29b 100644
> --- a/drivers/gpu/drm/radeon/radeon_drv.c
> +++ b/drivers/gpu/drm/radeon/radeon_drv.c
> @@ -308,7 +308,7 @@ static int radeon_pci_probe(struct pci_dev *pdev,
>   		case CHIP_VERDE:
>   		case CHIP_OLAND:
>   		case CHIP_HAINAN:
> -			dev_info(&pdev->dev,
> +			drm_info(&pdev->dev,
>   				 "SI support disabled by module param\n");
>   			return -ENODEV;
>   		}
> @@ -320,7 +320,7 @@ static int radeon_pci_probe(struct pci_dev *pdev,
>   		case CHIP_HAWAII:
>   		case CHIP_KABINI:
>   		case CHIP_MULLINS:
> -			dev_info(&pdev->dev,
> +			drm_info(&pdev->dev,
>   				 "CIK support disabled by module param\n");
>   			return -ENODEV;
>   		}


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] This patch replaces all the instances of dev_info with drm_info macro
@ 2021-06-22  6:40   ` Christian König
  0 siblings, 0 replies; 10+ messages in thread
From: Christian König @ 2021-06-22  6:40 UTC (permalink / raw)
  To: Aman Jain, alexander.deucher, airlied, daniel, amd-gfx, linux-kernel

Am 22.06.21 um 08:07 schrieb Aman Jain:
> When a driver has multiple instances it is necessary to differentiate
> between them in the logs. This was done with dev_info/warn/err since
> DRM_INFO/WARN/ERROR don't do this. We now have drm_info/warn/err for
> printing the relevant debug messages. Hence, this patch uses
> drm_* macros to achieve drm-formatted logging

Well first of all patches for radeon should have a drm/radeon prefix in 
its subject line.

Then I don't think this patch makes sense since this is about the 
hardware support of the module and not even remotely drm related.

So we most likely don't want the drm-formating here in the first place.

Regards,
Christian.

>
> Signed-off-by: Aman Jain <ahjain2706@gmail.com>
> ---
>   drivers/gpu/drm/radeon/radeon_drv.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
> index efeb115ae70e..75e84914c29b 100644
> --- a/drivers/gpu/drm/radeon/radeon_drv.c
> +++ b/drivers/gpu/drm/radeon/radeon_drv.c
> @@ -308,7 +308,7 @@ static int radeon_pci_probe(struct pci_dev *pdev,
>   		case CHIP_VERDE:
>   		case CHIP_OLAND:
>   		case CHIP_HAINAN:
> -			dev_info(&pdev->dev,
> +			drm_info(&pdev->dev,
>   				 "SI support disabled by module param\n");
>   			return -ENODEV;
>   		}
> @@ -320,7 +320,7 @@ static int radeon_pci_probe(struct pci_dev *pdev,
>   		case CHIP_HAWAII:
>   		case CHIP_KABINI:
>   		case CHIP_MULLINS:
> -			dev_info(&pdev->dev,
> +			drm_info(&pdev->dev,
>   				 "CIK support disabled by module param\n");
>   			return -ENODEV;
>   		}

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] This patch replaces all the instances of dev_info with drm_info macro
  2021-06-22  6:07 ` Aman Jain
  (?)
@ 2021-06-22 11:22   ` kernel test robot
  -1 siblings, 0 replies; 10+ messages in thread
From: kernel test robot @ 2021-06-22 11:22 UTC (permalink / raw)
  To: Aman Jain, alexander.deucher, christian.koenig, airlied, daniel,
	amd-gfx, linux-kernel
  Cc: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 6264 bytes --]

Hi Aman,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.13-rc7 next-20210621]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Aman-Jain/This-patch-replaces-all-the-instances-of-dev_info-with-drm_info-macro/20210622-140850
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git a96bfed64c8986d6404e553f18203cae1f5ac7e6
config: ia64-randconfig-r005-20210622 (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/aa0d692308d703f641f19def814f7c8d59468671
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Aman-Jain/This-patch-replaces-all-the-instances-of-dev_info-with-drm_info-macro/20210622-140850
        git checkout aa0d692308d703f641f19def814f7c8d59468671
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from include/linux/device.h:15,
                    from include/linux/pm_runtime.h:11,
                    from drivers/gpu/drm/radeon/radeon_drv.c:36:
   drivers/gpu/drm/radeon/radeon_drv.c: In function 'radeon_pci_probe':
>> include/drm/drm_print.h:412:27: error: 'struct device' has no member named 'dev'; did you mean 'devt'?
     412 |  dev_##level##type((drm)->dev, "[drm] " fmt, ##__VA_ARGS__)
         |                           ^~~
   include/linux/dev_printk.h:118:12: note: in definition of macro 'dev_info'
     118 |  _dev_info(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |            ^~~
   include/drm/drm_print.h:416:2: note: in expansion of macro '__drm_printk'
     416 |  __drm_printk((drm), info,, fmt, ##__VA_ARGS__)
         |  ^~~~~~~~~~~~
   drivers/gpu/drm/radeon/radeon_drv.c:311:4: note: in expansion of macro 'drm_info'
     311 |    drm_info(&pdev->dev,
         |    ^~~~~~~~
>> include/drm/drm_print.h:412:27: error: 'struct device' has no member named 'dev'; did you mean 'devt'?
     412 |  dev_##level##type((drm)->dev, "[drm] " fmt, ##__VA_ARGS__)
         |                           ^~~
   include/linux/dev_printk.h:118:12: note: in definition of macro 'dev_info'
     118 |  _dev_info(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |            ^~~
   include/drm/drm_print.h:416:2: note: in expansion of macro '__drm_printk'
     416 |  __drm_printk((drm), info,, fmt, ##__VA_ARGS__)
         |  ^~~~~~~~~~~~
   drivers/gpu/drm/radeon/radeon_drv.c:323:4: note: in expansion of macro 'drm_info'
     323 |    drm_info(&pdev->dev,
         |    ^~~~~~~~


vim +412 include/drm/drm_print.h

02c9656b2f0d69 Haneen Mohammed       2017-10-17  378  
02c9656b2f0d69 Haneen Mohammed       2017-10-17  379  /**
b52817e9de06a3 Mauro Carvalho Chehab 2020-10-27  380   * DRM_DEV_DEBUG() - Debug output for generic drm code
02c9656b2f0d69 Haneen Mohammed       2017-10-17  381   *
091756bbb1a961 Haneen Mohammed       2017-10-17  382   * @dev: device pointer
091756bbb1a961 Haneen Mohammed       2017-10-17  383   * @fmt: printf() like format string.
02c9656b2f0d69 Haneen Mohammed       2017-10-17  384   */
db87086492581c Joe Perches           2018-03-16  385  #define DRM_DEV_DEBUG(dev, fmt, ...)					\
db87086492581c Joe Perches           2018-03-16  386  	drm_dev_dbg(dev, DRM_UT_CORE, fmt, ##__VA_ARGS__)
b52817e9de06a3 Mauro Carvalho Chehab 2020-10-27  387  /**
b52817e9de06a3 Mauro Carvalho Chehab 2020-10-27  388   * DRM_DEV_DEBUG_DRIVER() - Debug output for vendor specific part of the driver
b52817e9de06a3 Mauro Carvalho Chehab 2020-10-27  389   *
b52817e9de06a3 Mauro Carvalho Chehab 2020-10-27  390   * @dev: device pointer
b52817e9de06a3 Mauro Carvalho Chehab 2020-10-27  391   * @fmt: printf() like format string.
b52817e9de06a3 Mauro Carvalho Chehab 2020-10-27  392   */
db87086492581c Joe Perches           2018-03-16  393  #define DRM_DEV_DEBUG_DRIVER(dev, fmt, ...)				\
db87086492581c Joe Perches           2018-03-16  394  	drm_dev_dbg(dev, DRM_UT_DRIVER,	fmt, ##__VA_ARGS__)
b52817e9de06a3 Mauro Carvalho Chehab 2020-10-27  395  /**
b52817e9de06a3 Mauro Carvalho Chehab 2020-10-27  396   * DRM_DEV_DEBUG_KMS() - Debug output for modesetting code
b52817e9de06a3 Mauro Carvalho Chehab 2020-10-27  397   *
b52817e9de06a3 Mauro Carvalho Chehab 2020-10-27  398   * @dev: device pointer
b52817e9de06a3 Mauro Carvalho Chehab 2020-10-27  399   * @fmt: printf() like format string.
b52817e9de06a3 Mauro Carvalho Chehab 2020-10-27  400   */
db87086492581c Joe Perches           2018-03-16  401  #define DRM_DEV_DEBUG_KMS(dev, fmt, ...)				\
db87086492581c Joe Perches           2018-03-16  402  	drm_dev_dbg(dev, DRM_UT_KMS, fmt, ##__VA_ARGS__)
a18b21929453af Lyude Paul            2018-07-16  403  
fb6c7ab8718eb2 Jani Nikula           2019-12-10  404  /*
fb6c7ab8718eb2 Jani Nikula           2019-12-10  405   * struct drm_device based logging
fb6c7ab8718eb2 Jani Nikula           2019-12-10  406   *
fb6c7ab8718eb2 Jani Nikula           2019-12-10  407   * Prefer drm_device based logging over device or prink based logging.
fb6c7ab8718eb2 Jani Nikula           2019-12-10  408   */
fb6c7ab8718eb2 Jani Nikula           2019-12-10  409  
fb6c7ab8718eb2 Jani Nikula           2019-12-10  410  /* Helper for struct drm_device based logging. */
fb6c7ab8718eb2 Jani Nikula           2019-12-10  411  #define __drm_printk(drm, level, type, fmt, ...)			\
fb6c7ab8718eb2 Jani Nikula           2019-12-10 @412  	dev_##level##type((drm)->dev, "[drm] " fmt, ##__VA_ARGS__)
fb6c7ab8718eb2 Jani Nikula           2019-12-10  413  
fb6c7ab8718eb2 Jani Nikula           2019-12-10  414  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 31220 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] This patch replaces all the instances of dev_info with drm_info macro
@ 2021-06-22 11:22   ` kernel test robot
  0 siblings, 0 replies; 10+ messages in thread
From: kernel test robot @ 2021-06-22 11:22 UTC (permalink / raw)
  To: Aman Jain, alexander.deucher, christian.koenig, airlied, daniel,
	amd-gfx, linux-kernel
  Cc: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 6264 bytes --]

Hi Aman,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.13-rc7 next-20210621]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Aman-Jain/This-patch-replaces-all-the-instances-of-dev_info-with-drm_info-macro/20210622-140850
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git a96bfed64c8986d6404e553f18203cae1f5ac7e6
config: ia64-randconfig-r005-20210622 (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/aa0d692308d703f641f19def814f7c8d59468671
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Aman-Jain/This-patch-replaces-all-the-instances-of-dev_info-with-drm_info-macro/20210622-140850
        git checkout aa0d692308d703f641f19def814f7c8d59468671
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from include/linux/device.h:15,
                    from include/linux/pm_runtime.h:11,
                    from drivers/gpu/drm/radeon/radeon_drv.c:36:
   drivers/gpu/drm/radeon/radeon_drv.c: In function 'radeon_pci_probe':
>> include/drm/drm_print.h:412:27: error: 'struct device' has no member named 'dev'; did you mean 'devt'?
     412 |  dev_##level##type((drm)->dev, "[drm] " fmt, ##__VA_ARGS__)
         |                           ^~~
   include/linux/dev_printk.h:118:12: note: in definition of macro 'dev_info'
     118 |  _dev_info(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |            ^~~
   include/drm/drm_print.h:416:2: note: in expansion of macro '__drm_printk'
     416 |  __drm_printk((drm), info,, fmt, ##__VA_ARGS__)
         |  ^~~~~~~~~~~~
   drivers/gpu/drm/radeon/radeon_drv.c:311:4: note: in expansion of macro 'drm_info'
     311 |    drm_info(&pdev->dev,
         |    ^~~~~~~~
>> include/drm/drm_print.h:412:27: error: 'struct device' has no member named 'dev'; did you mean 'devt'?
     412 |  dev_##level##type((drm)->dev, "[drm] " fmt, ##__VA_ARGS__)
         |                           ^~~
   include/linux/dev_printk.h:118:12: note: in definition of macro 'dev_info'
     118 |  _dev_info(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |            ^~~
   include/drm/drm_print.h:416:2: note: in expansion of macro '__drm_printk'
     416 |  __drm_printk((drm), info,, fmt, ##__VA_ARGS__)
         |  ^~~~~~~~~~~~
   drivers/gpu/drm/radeon/radeon_drv.c:323:4: note: in expansion of macro 'drm_info'
     323 |    drm_info(&pdev->dev,
         |    ^~~~~~~~


vim +412 include/drm/drm_print.h

02c9656b2f0d69 Haneen Mohammed       2017-10-17  378  
02c9656b2f0d69 Haneen Mohammed       2017-10-17  379  /**
b52817e9de06a3 Mauro Carvalho Chehab 2020-10-27  380   * DRM_DEV_DEBUG() - Debug output for generic drm code
02c9656b2f0d69 Haneen Mohammed       2017-10-17  381   *
091756bbb1a961 Haneen Mohammed       2017-10-17  382   * @dev: device pointer
091756bbb1a961 Haneen Mohammed       2017-10-17  383   * @fmt: printf() like format string.
02c9656b2f0d69 Haneen Mohammed       2017-10-17  384   */
db87086492581c Joe Perches           2018-03-16  385  #define DRM_DEV_DEBUG(dev, fmt, ...)					\
db87086492581c Joe Perches           2018-03-16  386  	drm_dev_dbg(dev, DRM_UT_CORE, fmt, ##__VA_ARGS__)
b52817e9de06a3 Mauro Carvalho Chehab 2020-10-27  387  /**
b52817e9de06a3 Mauro Carvalho Chehab 2020-10-27  388   * DRM_DEV_DEBUG_DRIVER() - Debug output for vendor specific part of the driver
b52817e9de06a3 Mauro Carvalho Chehab 2020-10-27  389   *
b52817e9de06a3 Mauro Carvalho Chehab 2020-10-27  390   * @dev: device pointer
b52817e9de06a3 Mauro Carvalho Chehab 2020-10-27  391   * @fmt: printf() like format string.
b52817e9de06a3 Mauro Carvalho Chehab 2020-10-27  392   */
db87086492581c Joe Perches           2018-03-16  393  #define DRM_DEV_DEBUG_DRIVER(dev, fmt, ...)				\
db87086492581c Joe Perches           2018-03-16  394  	drm_dev_dbg(dev, DRM_UT_DRIVER,	fmt, ##__VA_ARGS__)
b52817e9de06a3 Mauro Carvalho Chehab 2020-10-27  395  /**
b52817e9de06a3 Mauro Carvalho Chehab 2020-10-27  396   * DRM_DEV_DEBUG_KMS() - Debug output for modesetting code
b52817e9de06a3 Mauro Carvalho Chehab 2020-10-27  397   *
b52817e9de06a3 Mauro Carvalho Chehab 2020-10-27  398   * @dev: device pointer
b52817e9de06a3 Mauro Carvalho Chehab 2020-10-27  399   * @fmt: printf() like format string.
b52817e9de06a3 Mauro Carvalho Chehab 2020-10-27  400   */
db87086492581c Joe Perches           2018-03-16  401  #define DRM_DEV_DEBUG_KMS(dev, fmt, ...)				\
db87086492581c Joe Perches           2018-03-16  402  	drm_dev_dbg(dev, DRM_UT_KMS, fmt, ##__VA_ARGS__)
a18b21929453af Lyude Paul            2018-07-16  403  
fb6c7ab8718eb2 Jani Nikula           2019-12-10  404  /*
fb6c7ab8718eb2 Jani Nikula           2019-12-10  405   * struct drm_device based logging
fb6c7ab8718eb2 Jani Nikula           2019-12-10  406   *
fb6c7ab8718eb2 Jani Nikula           2019-12-10  407   * Prefer drm_device based logging over device or prink based logging.
fb6c7ab8718eb2 Jani Nikula           2019-12-10  408   */
fb6c7ab8718eb2 Jani Nikula           2019-12-10  409  
fb6c7ab8718eb2 Jani Nikula           2019-12-10  410  /* Helper for struct drm_device based logging. */
fb6c7ab8718eb2 Jani Nikula           2019-12-10  411  #define __drm_printk(drm, level, type, fmt, ...)			\
fb6c7ab8718eb2 Jani Nikula           2019-12-10 @412  	dev_##level##type((drm)->dev, "[drm] " fmt, ##__VA_ARGS__)
fb6c7ab8718eb2 Jani Nikula           2019-12-10  413  
fb6c7ab8718eb2 Jani Nikula           2019-12-10  414  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 31220 bytes --]

[-- Attachment #3: Type: text/plain, Size: 154 bytes --]

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] This patch replaces all the instances of dev_info with drm_info macro
@ 2021-06-22 11:22   ` kernel test robot
  0 siblings, 0 replies; 10+ messages in thread
From: kernel test robot @ 2021-06-22 11:22 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 6368 bytes --]

Hi Aman,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.13-rc7 next-20210621]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Aman-Jain/This-patch-replaces-all-the-instances-of-dev_info-with-drm_info-macro/20210622-140850
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git a96bfed64c8986d6404e553f18203cae1f5ac7e6
config: ia64-randconfig-r005-20210622 (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/aa0d692308d703f641f19def814f7c8d59468671
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Aman-Jain/This-patch-replaces-all-the-instances-of-dev_info-with-drm_info-macro/20210622-140850
        git checkout aa0d692308d703f641f19def814f7c8d59468671
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from include/linux/device.h:15,
                    from include/linux/pm_runtime.h:11,
                    from drivers/gpu/drm/radeon/radeon_drv.c:36:
   drivers/gpu/drm/radeon/radeon_drv.c: In function 'radeon_pci_probe':
>> include/drm/drm_print.h:412:27: error: 'struct device' has no member named 'dev'; did you mean 'devt'?
     412 |  dev_##level##type((drm)->dev, "[drm] " fmt, ##__VA_ARGS__)
         |                           ^~~
   include/linux/dev_printk.h:118:12: note: in definition of macro 'dev_info'
     118 |  _dev_info(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |            ^~~
   include/drm/drm_print.h:416:2: note: in expansion of macro '__drm_printk'
     416 |  __drm_printk((drm), info,, fmt, ##__VA_ARGS__)
         |  ^~~~~~~~~~~~
   drivers/gpu/drm/radeon/radeon_drv.c:311:4: note: in expansion of macro 'drm_info'
     311 |    drm_info(&pdev->dev,
         |    ^~~~~~~~
>> include/drm/drm_print.h:412:27: error: 'struct device' has no member named 'dev'; did you mean 'devt'?
     412 |  dev_##level##type((drm)->dev, "[drm] " fmt, ##__VA_ARGS__)
         |                           ^~~
   include/linux/dev_printk.h:118:12: note: in definition of macro 'dev_info'
     118 |  _dev_info(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |            ^~~
   include/drm/drm_print.h:416:2: note: in expansion of macro '__drm_printk'
     416 |  __drm_printk((drm), info,, fmt, ##__VA_ARGS__)
         |  ^~~~~~~~~~~~
   drivers/gpu/drm/radeon/radeon_drv.c:323:4: note: in expansion of macro 'drm_info'
     323 |    drm_info(&pdev->dev,
         |    ^~~~~~~~


vim +412 include/drm/drm_print.h

02c9656b2f0d69 Haneen Mohammed       2017-10-17  378  
02c9656b2f0d69 Haneen Mohammed       2017-10-17  379  /**
b52817e9de06a3 Mauro Carvalho Chehab 2020-10-27  380   * DRM_DEV_DEBUG() - Debug output for generic drm code
02c9656b2f0d69 Haneen Mohammed       2017-10-17  381   *
091756bbb1a961 Haneen Mohammed       2017-10-17  382   * @dev: device pointer
091756bbb1a961 Haneen Mohammed       2017-10-17  383   * @fmt: printf() like format string.
02c9656b2f0d69 Haneen Mohammed       2017-10-17  384   */
db87086492581c Joe Perches           2018-03-16  385  #define DRM_DEV_DEBUG(dev, fmt, ...)					\
db87086492581c Joe Perches           2018-03-16  386  	drm_dev_dbg(dev, DRM_UT_CORE, fmt, ##__VA_ARGS__)
b52817e9de06a3 Mauro Carvalho Chehab 2020-10-27  387  /**
b52817e9de06a3 Mauro Carvalho Chehab 2020-10-27  388   * DRM_DEV_DEBUG_DRIVER() - Debug output for vendor specific part of the driver
b52817e9de06a3 Mauro Carvalho Chehab 2020-10-27  389   *
b52817e9de06a3 Mauro Carvalho Chehab 2020-10-27  390   * @dev: device pointer
b52817e9de06a3 Mauro Carvalho Chehab 2020-10-27  391   * @fmt: printf() like format string.
b52817e9de06a3 Mauro Carvalho Chehab 2020-10-27  392   */
db87086492581c Joe Perches           2018-03-16  393  #define DRM_DEV_DEBUG_DRIVER(dev, fmt, ...)				\
db87086492581c Joe Perches           2018-03-16  394  	drm_dev_dbg(dev, DRM_UT_DRIVER,	fmt, ##__VA_ARGS__)
b52817e9de06a3 Mauro Carvalho Chehab 2020-10-27  395  /**
b52817e9de06a3 Mauro Carvalho Chehab 2020-10-27  396   * DRM_DEV_DEBUG_KMS() - Debug output for modesetting code
b52817e9de06a3 Mauro Carvalho Chehab 2020-10-27  397   *
b52817e9de06a3 Mauro Carvalho Chehab 2020-10-27  398   * @dev: device pointer
b52817e9de06a3 Mauro Carvalho Chehab 2020-10-27  399   * @fmt: printf() like format string.
b52817e9de06a3 Mauro Carvalho Chehab 2020-10-27  400   */
db87086492581c Joe Perches           2018-03-16  401  #define DRM_DEV_DEBUG_KMS(dev, fmt, ...)				\
db87086492581c Joe Perches           2018-03-16  402  	drm_dev_dbg(dev, DRM_UT_KMS, fmt, ##__VA_ARGS__)
a18b21929453af Lyude Paul            2018-07-16  403  
fb6c7ab8718eb2 Jani Nikula           2019-12-10  404  /*
fb6c7ab8718eb2 Jani Nikula           2019-12-10  405   * struct drm_device based logging
fb6c7ab8718eb2 Jani Nikula           2019-12-10  406   *
fb6c7ab8718eb2 Jani Nikula           2019-12-10  407   * Prefer drm_device based logging over device or prink based logging.
fb6c7ab8718eb2 Jani Nikula           2019-12-10  408   */
fb6c7ab8718eb2 Jani Nikula           2019-12-10  409  
fb6c7ab8718eb2 Jani Nikula           2019-12-10  410  /* Helper for struct drm_device based logging. */
fb6c7ab8718eb2 Jani Nikula           2019-12-10  411  #define __drm_printk(drm, level, type, fmt, ...)			\
fb6c7ab8718eb2 Jani Nikula           2019-12-10 @412  	dev_##level##type((drm)->dev, "[drm] " fmt, ##__VA_ARGS__)
fb6c7ab8718eb2 Jani Nikula           2019-12-10  413  
fb6c7ab8718eb2 Jani Nikula           2019-12-10  414  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 31220 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] This patch replaces all the instances of dev_info with drm_info macro
  2021-06-22  6:07 ` Aman Jain
  (?)
@ 2021-06-22 11:47   ` kernel test robot
  -1 siblings, 0 replies; 10+ messages in thread
From: kernel test robot @ 2021-06-22 11:47 UTC (permalink / raw)
  To: Aman Jain, alexander.deucher, christian.koenig, airlied, daniel,
	amd-gfx, linux-kernel
  Cc: kbuild-all, clang-built-linux

[-- Attachment #1: Type: text/plain, Size: 5602 bytes --]

Hi Aman,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.13-rc7 next-20210621]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Aman-Jain/This-patch-replaces-all-the-instances-of-dev_info-with-drm_info-macro/20210622-140850
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git a96bfed64c8986d6404e553f18203cae1f5ac7e6
config: x86_64-randconfig-a002-20210622 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project b3634d3e88b7f26534a5057bff182b7dced584fc)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://github.com/0day-ci/linux/commit/aa0d692308d703f641f19def814f7c8d59468671
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Aman-Jain/This-patch-replaces-all-the-instances-of-dev_info-with-drm_info-macro/20210622-140850
        git checkout aa0d692308d703f641f19def814f7c8d59468671
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/radeon/radeon_drv.c:311:4: error: no member named 'dev' in 'struct device'
                           drm_info(&pdev->dev,
                           ^~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:416:2: note: expanded from macro 'drm_info'
           __drm_printk((drm), info,, fmt, ##__VA_ARGS__)
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:412:27: note: expanded from macro '__drm_printk'
           dev_##level##type((drm)->dev, "[drm] " fmt, ##__VA_ARGS__)
           ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:118:12: note: expanded from macro 'dev_info'
           _dev_info(dev, dev_fmt(fmt), ##__VA_ARGS__)
                     ^~~
   drivers/gpu/drm/radeon/radeon_drv.c:323:4: error: no member named 'dev' in 'struct device'
                           drm_info(&pdev->dev,
                           ^~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:416:2: note: expanded from macro 'drm_info'
           __drm_printk((drm), info,, fmt, ##__VA_ARGS__)
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:412:27: note: expanded from macro '__drm_printk'
           dev_##level##type((drm)->dev, "[drm] " fmt, ##__VA_ARGS__)
           ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:118:12: note: expanded from macro 'dev_info'
           _dev_info(dev, dev_fmt(fmt), ##__VA_ARGS__)
                     ^~~
   2 errors generated.


vim +311 drivers/gpu/drm/radeon/radeon_drv.c

   291	
   292	static int radeon_pci_probe(struct pci_dev *pdev,
   293				    const struct pci_device_id *ent)
   294	{
   295		unsigned long flags = 0;
   296		struct drm_device *dev;
   297		int ret;
   298	
   299		if (!ent)
   300			return -ENODEV; /* Avoid NULL-ptr deref in drm_get_pci_dev */
   301	
   302		flags = ent->driver_data;
   303	
   304		if (!radeon_si_support) {
   305			switch (flags & RADEON_FAMILY_MASK) {
   306			case CHIP_TAHITI:
   307			case CHIP_PITCAIRN:
   308			case CHIP_VERDE:
   309			case CHIP_OLAND:
   310			case CHIP_HAINAN:
 > 311				drm_info(&pdev->dev,
   312					 "SI support disabled by module param\n");
   313				return -ENODEV;
   314			}
   315		}
   316		if (!radeon_cik_support) {
   317			switch (flags & RADEON_FAMILY_MASK) {
   318			case CHIP_KAVERI:
   319			case CHIP_BONAIRE:
   320			case CHIP_HAWAII:
   321			case CHIP_KABINI:
   322			case CHIP_MULLINS:
   323				drm_info(&pdev->dev,
   324					 "CIK support disabled by module param\n");
   325				return -ENODEV;
   326			}
   327		}
   328	
   329		if (vga_switcheroo_client_probe_defer(pdev))
   330			return -EPROBE_DEFER;
   331	
   332		/* Get rid of things like offb */
   333		ret = drm_fb_helper_remove_conflicting_pci_framebuffers(pdev, "radeondrmfb");
   334		if (ret)
   335			return ret;
   336	
   337		dev = drm_dev_alloc(&kms_driver, &pdev->dev);
   338		if (IS_ERR(dev))
   339			return PTR_ERR(dev);
   340	
   341		ret = pci_enable_device(pdev);
   342		if (ret)
   343			goto err_free;
   344	
   345		pci_set_drvdata(pdev, dev);
   346	
   347		if (pci_find_capability(pdev, PCI_CAP_ID_AGP))
   348			dev->agp = drm_agp_init(dev);
   349		if (dev->agp) {
   350			dev->agp->agp_mtrr = arch_phys_wc_add(
   351				dev->agp->agp_info.aper_base,
   352				dev->agp->agp_info.aper_size *
   353				1024 * 1024);
   354		}
   355	
   356		ret = drm_dev_register(dev, ent->driver_data);
   357		if (ret)
   358			goto err_agp;
   359	
   360		return 0;
   361	
   362	err_agp:
   363		if (dev->agp)
   364			arch_phys_wc_del(dev->agp->agp_mtrr);
   365		kfree(dev->agp);
   366		pci_disable_device(pdev);
   367	err_free:
   368		drm_dev_put(dev);
   369		return ret;
   370	}
   371	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 43085 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] This patch replaces all the instances of dev_info with drm_info macro
@ 2021-06-22 11:47   ` kernel test robot
  0 siblings, 0 replies; 10+ messages in thread
From: kernel test robot @ 2021-06-22 11:47 UTC (permalink / raw)
  To: Aman Jain, alexander.deucher, christian.koenig, airlied, daniel,
	amd-gfx, linux-kernel
  Cc: clang-built-linux, kbuild-all

[-- Attachment #1: Type: text/plain, Size: 5602 bytes --]

Hi Aman,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.13-rc7 next-20210621]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Aman-Jain/This-patch-replaces-all-the-instances-of-dev_info-with-drm_info-macro/20210622-140850
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git a96bfed64c8986d6404e553f18203cae1f5ac7e6
config: x86_64-randconfig-a002-20210622 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project b3634d3e88b7f26534a5057bff182b7dced584fc)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://github.com/0day-ci/linux/commit/aa0d692308d703f641f19def814f7c8d59468671
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Aman-Jain/This-patch-replaces-all-the-instances-of-dev_info-with-drm_info-macro/20210622-140850
        git checkout aa0d692308d703f641f19def814f7c8d59468671
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/radeon/radeon_drv.c:311:4: error: no member named 'dev' in 'struct device'
                           drm_info(&pdev->dev,
                           ^~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:416:2: note: expanded from macro 'drm_info'
           __drm_printk((drm), info,, fmt, ##__VA_ARGS__)
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:412:27: note: expanded from macro '__drm_printk'
           dev_##level##type((drm)->dev, "[drm] " fmt, ##__VA_ARGS__)
           ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:118:12: note: expanded from macro 'dev_info'
           _dev_info(dev, dev_fmt(fmt), ##__VA_ARGS__)
                     ^~~
   drivers/gpu/drm/radeon/radeon_drv.c:323:4: error: no member named 'dev' in 'struct device'
                           drm_info(&pdev->dev,
                           ^~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:416:2: note: expanded from macro 'drm_info'
           __drm_printk((drm), info,, fmt, ##__VA_ARGS__)
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:412:27: note: expanded from macro '__drm_printk'
           dev_##level##type((drm)->dev, "[drm] " fmt, ##__VA_ARGS__)
           ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:118:12: note: expanded from macro 'dev_info'
           _dev_info(dev, dev_fmt(fmt), ##__VA_ARGS__)
                     ^~~
   2 errors generated.


vim +311 drivers/gpu/drm/radeon/radeon_drv.c

   291	
   292	static int radeon_pci_probe(struct pci_dev *pdev,
   293				    const struct pci_device_id *ent)
   294	{
   295		unsigned long flags = 0;
   296		struct drm_device *dev;
   297		int ret;
   298	
   299		if (!ent)
   300			return -ENODEV; /* Avoid NULL-ptr deref in drm_get_pci_dev */
   301	
   302		flags = ent->driver_data;
   303	
   304		if (!radeon_si_support) {
   305			switch (flags & RADEON_FAMILY_MASK) {
   306			case CHIP_TAHITI:
   307			case CHIP_PITCAIRN:
   308			case CHIP_VERDE:
   309			case CHIP_OLAND:
   310			case CHIP_HAINAN:
 > 311				drm_info(&pdev->dev,
   312					 "SI support disabled by module param\n");
   313				return -ENODEV;
   314			}
   315		}
   316		if (!radeon_cik_support) {
   317			switch (flags & RADEON_FAMILY_MASK) {
   318			case CHIP_KAVERI:
   319			case CHIP_BONAIRE:
   320			case CHIP_HAWAII:
   321			case CHIP_KABINI:
   322			case CHIP_MULLINS:
   323				drm_info(&pdev->dev,
   324					 "CIK support disabled by module param\n");
   325				return -ENODEV;
   326			}
   327		}
   328	
   329		if (vga_switcheroo_client_probe_defer(pdev))
   330			return -EPROBE_DEFER;
   331	
   332		/* Get rid of things like offb */
   333		ret = drm_fb_helper_remove_conflicting_pci_framebuffers(pdev, "radeondrmfb");
   334		if (ret)
   335			return ret;
   336	
   337		dev = drm_dev_alloc(&kms_driver, &pdev->dev);
   338		if (IS_ERR(dev))
   339			return PTR_ERR(dev);
   340	
   341		ret = pci_enable_device(pdev);
   342		if (ret)
   343			goto err_free;
   344	
   345		pci_set_drvdata(pdev, dev);
   346	
   347		if (pci_find_capability(pdev, PCI_CAP_ID_AGP))
   348			dev->agp = drm_agp_init(dev);
   349		if (dev->agp) {
   350			dev->agp->agp_mtrr = arch_phys_wc_add(
   351				dev->agp->agp_info.aper_base,
   352				dev->agp->agp_info.aper_size *
   353				1024 * 1024);
   354		}
   355	
   356		ret = drm_dev_register(dev, ent->driver_data);
   357		if (ret)
   358			goto err_agp;
   359	
   360		return 0;
   361	
   362	err_agp:
   363		if (dev->agp)
   364			arch_phys_wc_del(dev->agp->agp_mtrr);
   365		kfree(dev->agp);
   366		pci_disable_device(pdev);
   367	err_free:
   368		drm_dev_put(dev);
   369		return ret;
   370	}
   371	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 43085 bytes --]

[-- Attachment #3: Type: text/plain, Size: 154 bytes --]

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] This patch replaces all the instances of dev_info with drm_info macro
@ 2021-06-22 11:47   ` kernel test robot
  0 siblings, 0 replies; 10+ messages in thread
From: kernel test robot @ 2021-06-22 11:47 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 5749 bytes --]

Hi Aman,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.13-rc7 next-20210621]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Aman-Jain/This-patch-replaces-all-the-instances-of-dev_info-with-drm_info-macro/20210622-140850
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git a96bfed64c8986d6404e553f18203cae1f5ac7e6
config: x86_64-randconfig-a002-20210622 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project b3634d3e88b7f26534a5057bff182b7dced584fc)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://github.com/0day-ci/linux/commit/aa0d692308d703f641f19def814f7c8d59468671
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Aman-Jain/This-patch-replaces-all-the-instances-of-dev_info-with-drm_info-macro/20210622-140850
        git checkout aa0d692308d703f641f19def814f7c8d59468671
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/radeon/radeon_drv.c:311:4: error: no member named 'dev' in 'struct device'
                           drm_info(&pdev->dev,
                           ^~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:416:2: note: expanded from macro 'drm_info'
           __drm_printk((drm), info,, fmt, ##__VA_ARGS__)
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:412:27: note: expanded from macro '__drm_printk'
           dev_##level##type((drm)->dev, "[drm] " fmt, ##__VA_ARGS__)
           ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:118:12: note: expanded from macro 'dev_info'
           _dev_info(dev, dev_fmt(fmt), ##__VA_ARGS__)
                     ^~~
   drivers/gpu/drm/radeon/radeon_drv.c:323:4: error: no member named 'dev' in 'struct device'
                           drm_info(&pdev->dev,
                           ^~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:416:2: note: expanded from macro 'drm_info'
           __drm_printk((drm), info,, fmt, ##__VA_ARGS__)
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:412:27: note: expanded from macro '__drm_printk'
           dev_##level##type((drm)->dev, "[drm] " fmt, ##__VA_ARGS__)
           ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:118:12: note: expanded from macro 'dev_info'
           _dev_info(dev, dev_fmt(fmt), ##__VA_ARGS__)
                     ^~~
   2 errors generated.


vim +311 drivers/gpu/drm/radeon/radeon_drv.c

   291	
   292	static int radeon_pci_probe(struct pci_dev *pdev,
   293				    const struct pci_device_id *ent)
   294	{
   295		unsigned long flags = 0;
   296		struct drm_device *dev;
   297		int ret;
   298	
   299		if (!ent)
   300			return -ENODEV; /* Avoid NULL-ptr deref in drm_get_pci_dev */
   301	
   302		flags = ent->driver_data;
   303	
   304		if (!radeon_si_support) {
   305			switch (flags & RADEON_FAMILY_MASK) {
   306			case CHIP_TAHITI:
   307			case CHIP_PITCAIRN:
   308			case CHIP_VERDE:
   309			case CHIP_OLAND:
   310			case CHIP_HAINAN:
 > 311				drm_info(&pdev->dev,
   312					 "SI support disabled by module param\n");
   313				return -ENODEV;
   314			}
   315		}
   316		if (!radeon_cik_support) {
   317			switch (flags & RADEON_FAMILY_MASK) {
   318			case CHIP_KAVERI:
   319			case CHIP_BONAIRE:
   320			case CHIP_HAWAII:
   321			case CHIP_KABINI:
   322			case CHIP_MULLINS:
   323				drm_info(&pdev->dev,
   324					 "CIK support disabled by module param\n");
   325				return -ENODEV;
   326			}
   327		}
   328	
   329		if (vga_switcheroo_client_probe_defer(pdev))
   330			return -EPROBE_DEFER;
   331	
   332		/* Get rid of things like offb */
   333		ret = drm_fb_helper_remove_conflicting_pci_framebuffers(pdev, "radeondrmfb");
   334		if (ret)
   335			return ret;
   336	
   337		dev = drm_dev_alloc(&kms_driver, &pdev->dev);
   338		if (IS_ERR(dev))
   339			return PTR_ERR(dev);
   340	
   341		ret = pci_enable_device(pdev);
   342		if (ret)
   343			goto err_free;
   344	
   345		pci_set_drvdata(pdev, dev);
   346	
   347		if (pci_find_capability(pdev, PCI_CAP_ID_AGP))
   348			dev->agp = drm_agp_init(dev);
   349		if (dev->agp) {
   350			dev->agp->agp_mtrr = arch_phys_wc_add(
   351				dev->agp->agp_info.aper_base,
   352				dev->agp->agp_info.aper_size *
   353				1024 * 1024);
   354		}
   355	
   356		ret = drm_dev_register(dev, ent->driver_data);
   357		if (ret)
   358			goto err_agp;
   359	
   360		return 0;
   361	
   362	err_agp:
   363		if (dev->agp)
   364			arch_phys_wc_del(dev->agp->agp_mtrr);
   365		kfree(dev->agp);
   366		pci_disable_device(pdev);
   367	err_free:
   368		drm_dev_put(dev);
   369		return ret;
   370	}
   371	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 43085 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-06-22 11:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-22  6:07 [PATCH] This patch replaces all the instances of dev_info with drm_info macro Aman Jain
2021-06-22  6:07 ` Aman Jain
2021-06-22  6:40 ` Christian König
2021-06-22  6:40   ` Christian König
2021-06-22 11:22 ` kernel test robot
2021-06-22 11:22   ` kernel test robot
2021-06-22 11:22   ` kernel test robot
2021-06-22 11:47 ` kernel test robot
2021-06-22 11:47   ` kernel test robot
2021-06-22 11:47   ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.