All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Dave Airlie <airlied@redhat.com>
Cc: DRI <dri-devel@lists.freedesktop.org>,
	Andrzej Hajda <andrzej.hajda@intel.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: Re: linux-next: build warning after merge of the drm tree
Date: Wed, 3 Jan 2024 12:19:11 +1100	[thread overview]
Message-ID: <20240103121911.4ec8f237@canb.auug.org.au> (raw)
In-Reply-To: <20240102111222.2db11208@canb.auug.org.au>

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

Hi all,

On Tue, 2 Jan 2024 11:12:22 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
> produced this warning:
> 
> In file included from include/drm/drm_mm.h:51,
>                  from drivers/gpu/drm/xe/xe_bo_types.h:11,
>                  from drivers/gpu/drm/xe/xe_bo.h:11,
>                  from drivers/gpu/drm/xe/compat-i915-headers/gem/i915_gem_object.h:11,
>                  from drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h:15,
>                  from drivers/gpu/drm/i915/display/intel_display_power.c:8:
> drivers/gpu/drm/i915/display/intel_display_power.c: In function 'print_async_put_domains_state':
> drivers/gpu/drm/i915/display/intel_display_power.c:408:29: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'int' [-Wformat=]
>   408 |         drm_dbg(&i915->drm, "async_put_wakeref %lu\n",
>       |                             ^~~~~~~~~~~~~~~~~~~~~~~~~
>   409 |                 power_domains->async_put_wakeref);
>       |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>       |                              |
>       |                              int
> 
> Introduced by commit
> 
>   b49e894c3fd8 ("drm/i915: Replace custom intel runtime_pm tracker with ref_tracker library")
> 
> This would be an error except that I am building with CONFIG_WERROR=n

OK, so I have turned off CONFIG_WERROR=n in the run up to the merge
window opening and so this is now a build failure.  I have tried
applying the following patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 3 Jan 2024 11:40:26 +1100
Subject: [PATCH] fix up for "drm/i915: Replace custom intel runtime_pm tracker
 with ref_tracker library"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/gpu/drm/i915/display/intel_display_power.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c b/drivers/gpu/drm/i915/display/intel_display_power.c
index 5f091502719b..f23080a4368d 100644
--- a/drivers/gpu/drm/i915/display/intel_display_power.c
+++ b/drivers/gpu/drm/i915/display/intel_display_power.c
@@ -405,7 +405,7 @@ print_async_put_domains_state(struct i915_power_domains *power_domains)
 						     struct drm_i915_private,
 						     display.power.domains);
 
-	drm_dbg(&i915->drm, "async_put_wakeref %lu\n",
+	drm_dbg(&i915->drm, "async_put_wakeref %u\n",
 		power_domains->async_put_wakeref);
 
 	print_power_domains(power_domains, "async_put_domains[0]",
-- 
2.43.0

but that produces this failure:

In file included from include/drm/ttm/ttm_resource.h:34,
                 from include/drm/ttm/ttm_device.h:30,
                 from drivers/gpu/drm/i915/i915_drv.h:37,
                 from drivers/gpu/drm/i915/display/intel_display_power.c:8:  
drivers/gpu/drm/i915/display/intel_display_power.c: In function 'print_async_put_domains_state':
drivers/gpu/drm/i915/display/intel_display_power.c:408:29: error: format '%u' expects argument of type 'unsigned int', but argument 5 has type 'intel_wakeref_t' {aka 'long unsigned int'} [-Werror=format=]
  408 |         drm_dbg(&i915->drm, "async_put_wakeref %u\n",
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~
  409 |                 power_domains->async_put_wakeref);
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                              |
      |                              intel_wakeref_t {aka long unsigned int}

I don't understand how the above patch can change the compilation like
that.  I must be missing something obvious.  Maybe my compiler is
strangely broken?  I have applied the following instead (which at least
builds):

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 3 Jan 2024 11:40:26 +1100
Subject: [PATCH] fix up for "drm/i915: Replace custom intel runtime_pm tracker
 with ref_tracker library"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/gpu/drm/i915/display/intel_display_power.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c b/drivers/gpu/drm/i915/display/intel_display_power.c
index 5f091502719b..6253ce061d20 100644
--- a/drivers/gpu/drm/i915/display/intel_display_power.c
+++ b/drivers/gpu/drm/i915/display/intel_display_power.c
@@ -406,7 +406,7 @@ print_async_put_domains_state(struct i915_power_domains *power_domains)
 						     display.power.domains);
 
 	drm_dbg(&i915->drm, "async_put_wakeref %lu\n",
-		power_domains->async_put_wakeref);
+		(unsigned long int)power_domains->async_put_wakeref);
 
 	print_power_domains(power_domains, "async_put_domains[0]",
 			    &power_domains->async_put_domains[0]);
-- 
2.43.0

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Dave Airlie <airlied@redhat.com>
Cc: Linux Next Mailing List <linux-next@vger.kernel.org>,
	Andrzej Hajda <andrzej.hajda@intel.com>,
	DRI <dri-devel@lists.freedesktop.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: linux-next: build warning after merge of the drm tree
Date: Wed, 3 Jan 2024 12:19:11 +1100	[thread overview]
Message-ID: <20240103121911.4ec8f237@canb.auug.org.au> (raw)
In-Reply-To: <20240102111222.2db11208@canb.auug.org.au>

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

Hi all,

On Tue, 2 Jan 2024 11:12:22 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
> produced this warning:
> 
> In file included from include/drm/drm_mm.h:51,
>                  from drivers/gpu/drm/xe/xe_bo_types.h:11,
>                  from drivers/gpu/drm/xe/xe_bo.h:11,
>                  from drivers/gpu/drm/xe/compat-i915-headers/gem/i915_gem_object.h:11,
>                  from drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h:15,
>                  from drivers/gpu/drm/i915/display/intel_display_power.c:8:
> drivers/gpu/drm/i915/display/intel_display_power.c: In function 'print_async_put_domains_state':
> drivers/gpu/drm/i915/display/intel_display_power.c:408:29: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'int' [-Wformat=]
>   408 |         drm_dbg(&i915->drm, "async_put_wakeref %lu\n",
>       |                             ^~~~~~~~~~~~~~~~~~~~~~~~~
>   409 |                 power_domains->async_put_wakeref);
>       |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>       |                              |
>       |                              int
> 
> Introduced by commit
> 
>   b49e894c3fd8 ("drm/i915: Replace custom intel runtime_pm tracker with ref_tracker library")
> 
> This would be an error except that I am building with CONFIG_WERROR=n

OK, so I have turned off CONFIG_WERROR=n in the run up to the merge
window opening and so this is now a build failure.  I have tried
applying the following patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 3 Jan 2024 11:40:26 +1100
Subject: [PATCH] fix up for "drm/i915: Replace custom intel runtime_pm tracker
 with ref_tracker library"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/gpu/drm/i915/display/intel_display_power.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c b/drivers/gpu/drm/i915/display/intel_display_power.c
index 5f091502719b..f23080a4368d 100644
--- a/drivers/gpu/drm/i915/display/intel_display_power.c
+++ b/drivers/gpu/drm/i915/display/intel_display_power.c
@@ -405,7 +405,7 @@ print_async_put_domains_state(struct i915_power_domains *power_domains)
 						     struct drm_i915_private,
 						     display.power.domains);
 
-	drm_dbg(&i915->drm, "async_put_wakeref %lu\n",
+	drm_dbg(&i915->drm, "async_put_wakeref %u\n",
 		power_domains->async_put_wakeref);
 
 	print_power_domains(power_domains, "async_put_domains[0]",
-- 
2.43.0

but that produces this failure:

In file included from include/drm/ttm/ttm_resource.h:34,
                 from include/drm/ttm/ttm_device.h:30,
                 from drivers/gpu/drm/i915/i915_drv.h:37,
                 from drivers/gpu/drm/i915/display/intel_display_power.c:8:  
drivers/gpu/drm/i915/display/intel_display_power.c: In function 'print_async_put_domains_state':
drivers/gpu/drm/i915/display/intel_display_power.c:408:29: error: format '%u' expects argument of type 'unsigned int', but argument 5 has type 'intel_wakeref_t' {aka 'long unsigned int'} [-Werror=format=]
  408 |         drm_dbg(&i915->drm, "async_put_wakeref %u\n",
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~
  409 |                 power_domains->async_put_wakeref);
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                              |
      |                              intel_wakeref_t {aka long unsigned int}

I don't understand how the above patch can change the compilation like
that.  I must be missing something obvious.  Maybe my compiler is
strangely broken?  I have applied the following instead (which at least
builds):

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 3 Jan 2024 11:40:26 +1100
Subject: [PATCH] fix up for "drm/i915: Replace custom intel runtime_pm tracker
 with ref_tracker library"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/gpu/drm/i915/display/intel_display_power.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c b/drivers/gpu/drm/i915/display/intel_display_power.c
index 5f091502719b..6253ce061d20 100644
--- a/drivers/gpu/drm/i915/display/intel_display_power.c
+++ b/drivers/gpu/drm/i915/display/intel_display_power.c
@@ -406,7 +406,7 @@ print_async_put_domains_state(struct i915_power_domains *power_domains)
 						     display.power.domains);
 
 	drm_dbg(&i915->drm, "async_put_wakeref %lu\n",
-		power_domains->async_put_wakeref);
+		(unsigned long int)power_domains->async_put_wakeref);
 
 	print_power_domains(power_domains, "async_put_domains[0]",
 			    &power_domains->async_put_domains[0]);
-- 
2.43.0

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2024-01-03  1:19 UTC|newest]

Thread overview: 137+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-02  0:12 linux-next: build warning after merge of the drm tree Stephen Rothwell
2024-01-02  0:12 ` Stephen Rothwell
2024-01-03  1:19 ` Stephen Rothwell [this message]
2024-01-03  1:19   ` Stephen Rothwell
2024-01-03  1:27   ` Stephen Rothwell
2024-01-03  1:27     ` Stephen Rothwell
2024-01-04 16:52     ` Jani Nikula
2024-01-04 16:52       ` Jani Nikula
  -- strict thread matches above, loose matches on Subject: below --
2024-02-07  6:17 Stephen Rothwell
2024-02-07 14:19 ` Rodrigo Vivi
2024-01-05  6:47 Stephen Rothwell
2024-01-05  6:47 ` Stephen Rothwell
2024-01-25  0:33 ` Stephen Rothwell
2024-01-25  0:33   ` Stephen Rothwell
2024-01-26  8:48   ` Thomas Hellström
2024-01-26  8:48     ` Thomas Hellström
2023-11-24  2:25 Stephen Rothwell
2023-11-24  2:25 ` Stephen Rothwell
2023-11-24 12:35 ` Donald Robson
2023-11-24 12:35   ` Donald Robson
2023-11-24  2:23 Stephen Rothwell
2023-11-24  2:23 ` Stephen Rothwell
2023-11-24  2:17 Stephen Rothwell
2023-11-24  2:17 ` Stephen Rothwell
2023-04-11  6:02 Stephen Rothwell
2023-04-11  6:02 ` Stephen Rothwell
2023-04-11  9:48 ` Andi Shyti
2023-04-11  9:48   ` Andi Shyti
2023-04-11  6:01 Stephen Rothwell
2023-04-11  6:01 ` Stephen Rothwell
2023-03-30  3:28 Stephen Rothwell
2023-03-30  3:28 ` Stephen Rothwell
2023-03-30 14:28 ` Rob Clark
2023-03-30 14:28   ` Rob Clark
2023-07-11 23:17   ` Stephen Rothwell
2023-07-11 23:17     ` Stephen Rothwell
2023-07-24  3:50     ` Stephen Rothwell
2023-07-24  3:50       ` Stephen Rothwell
2023-02-03  2:46 Stephen Rothwell
2023-02-03  2:46 ` Stephen Rothwell
2023-02-03 12:32 ` Gustavo Sousa
2023-02-03 12:32   ` Gustavo Sousa
2023-01-05  3:43 Stephen Rothwell
2023-01-05  3:43 ` Stephen Rothwell
2023-01-05  3:21 Stephen Rothwell
2023-01-05  3:21 ` Stephen Rothwell
2023-01-05  3:17 Stephen Rothwell
2023-01-05  3:17 ` Stephen Rothwell
2022-11-07  3:29 Stephen Rothwell
2022-11-07  3:29 ` Stephen Rothwell
2022-11-07 20:31 ` John Harrison
2022-11-07 20:31   ` John Harrison
2022-02-02  4:10 Stephen Rothwell
2022-02-02  4:10 ` Stephen Rothwell
2022-03-02  1:32 ` Stephen Rothwell
2022-03-02  1:32   ` Stephen Rothwell
2022-02-02  4:02 Stephen Rothwell
2022-02-02  4:02 ` Stephen Rothwell
2022-02-02  4:03 ` Stephen Rothwell
2022-02-02  4:03   ` Stephen Rothwell
2022-02-02  8:38   ` Hans de Goede
2022-02-02  8:38     ` Hans de Goede
2022-02-04 19:29     ` Rajat Jain
2022-02-04 19:29       ` Rajat Jain
2022-03-02  1:34     ` Stephen Rothwell
2022-03-02  1:34       ` Stephen Rothwell
2022-03-02 10:32       ` Hans de Goede
2022-03-02 10:32         ` Hans de Goede
2022-03-02 11:38         ` Stephen Rothwell
2022-03-02 11:38           ` Stephen Rothwell
2021-04-01  7:19 Stephen Rothwell
2021-04-01  7:19 ` Stephen Rothwell
2021-04-21  6:28 ` Stephen Rothwell
2021-04-21  6:28   ` Stephen Rothwell
2021-03-17  7:42 Stephen Rothwell
2021-03-17  7:42 ` Stephen Rothwell
2021-03-17  2:53 Stephen Rothwell
2021-03-17  2:53 ` Stephen Rothwell
2021-01-22  0:59 Stephen Rothwell
2021-01-22  0:59 ` Stephen Rothwell
2021-01-22  7:17 ` Daniel Vetter
2021-01-22  7:17   ` Daniel Vetter
2021-01-22  7:29   ` Stephen Rothwell
2021-01-22  7:29     ` Stephen Rothwell
2021-01-22  8:40     ` Daniel Vetter
2021-01-22  8:40       ` Daniel Vetter
2021-10-27 12:12       ` Joonas Lahtinen
2021-10-27 20:51         ` Stephen Rothwell
2021-10-28  9:16           ` Joonas Lahtinen
2021-02-01  1:55 ` Stephen Rothwell
2021-02-01  1:55   ` Stephen Rothwell
2020-11-05  7:02 Stephen Rothwell
2020-11-05  7:02 ` Stephen Rothwell
2020-11-16  0:01 ` Stephen Rothwell
2020-11-16  0:01   ` Stephen Rothwell
2020-09-23  3:36 Stephen Rothwell
2020-09-23  3:36 ` Stephen Rothwell
2020-09-23  6:27 ` Tomi Valkeinen
2020-09-23  6:27   ` Tomi Valkeinen
2020-10-01  9:47 ` Stephen Rothwell
2020-10-01  9:47   ` Stephen Rothwell
2020-05-11  3:47 Stephen Rothwell
2020-05-11  3:47 ` Stephen Rothwell
2020-05-11  4:04 ` Randy Dunlap
2020-05-11  4:04   ` Randy Dunlap
2019-02-01  0:53 Stephen Rothwell
2018-06-25  4:22 Stephen Rothwell
2018-06-25  4:22 ` Stephen Rothwell
2018-06-25  4:22 ` Stephen Rothwell
2018-06-25  4:22   ` Stephen Rothwell
2018-02-18 23:18 Stephen Rothwell
2018-02-18 23:18 ` Stephen Rothwell
2018-03-02  1:49 ` Stephen Rothwell
2018-03-02  1:49   ` Stephen Rothwell
2017-12-04  0:30 Stephen Rothwell
2017-12-04  0:57 ` Dave Airlie
2017-12-04  0:57   ` Dave Airlie
2017-06-19  1:40 Stephen Rothwell
2017-05-19  2:10 Stephen Rothwell
2017-05-03 22:33 Stephen Rothwell
2017-05-03 22:33 ` Stephen Rothwell
     [not found] ` <tencent_62AF37B85899E2EA593CCE3B@qq.com>
2017-05-04  1:42   ` Stephen Rothwell
2017-05-04  1:42     ` Stephen Rothwell
2017-05-04  1:42     ` Stephen Rothwell
2015-06-04 12:31 Stephen Rothwell
2015-05-20  6:54 Stephen Rothwell
2015-05-20 11:49 ` Sergey Senozhatsky
2015-05-20  6:31 Stephen Rothwell
2015-05-20 19:51 ` Russell King - ARM Linux
2013-06-28  3:30 Stephen Rothwell
2013-06-28  3:33 ` Dave Airlie
2013-04-19  5:50 Stephen Rothwell
2012-05-08  5:08 Stephen Rothwell
2011-11-28  2:41 Stephen Rothwell
2011-11-28  2:36 Stephen Rothwell
2011-05-12  2:14 Stephen Rothwell
2010-03-01  7:14 Stephen Rothwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240103121911.4ec8f237@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=airlied@redhat.com \
    --cc=andrzej.hajda@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.