dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] drm: amdgpu: Fix includes of <linux/export.h>
@ 2025-06-13 18:26 André Almeida
  2025-06-13 18:26 ` [PATCH 1/2] drm/amd: Do not include <linux/export.h> when unused André Almeida
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: André Almeida @ 2025-06-13 18:26 UTC (permalink / raw)
  To: Alex Deucher, Christian König, Thomas Zimmermann
  Cc: dri-devel, linux-kernel, kernel-dev, amd-gfx, André Almeida

Commit 7d95680d64ac ("scripts/misc-check: check unnecessary #include
<linux/export.h> when W=1") and commit a934a57a42f6 ("scripts/misc-check:
check missing #include <linux/export.h> when W=1") added new checks for when the
include <linux/export.h> is missued by drivers. This patchset make drm/amd code
compliant to this new commits.

See also: https://lore.kernel.org/dri-devel/20250612121633.229222-1-tzimmermann@suse.de/

André Almeida (2):
  drm/amd: Do not include <linux/export.h> when unused
  drm/amd: Include <linux/export.h> when needed

 drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c      | 1 -
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c   | 1 +
 drivers/gpu/drm/amd/amdkfd/kfd_chardev.c     | 1 -
 drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c | 1 -
 drivers/gpu/drm/amd/amdxcp/amdgpu_xcp_drv.c  | 1 +
 5 files changed, 2 insertions(+), 3 deletions(-)

-- 
2.49.0


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

* [PATCH 1/2] drm/amd: Do not include <linux/export.h> when unused
  2025-06-13 18:26 [PATCH 0/2] drm: amdgpu: Fix includes of <linux/export.h> André Almeida
@ 2025-06-13 18:26 ` André Almeida
  2025-06-13 18:26 ` [PATCH 2/2] drm/amd: Include <linux/export.h> when needed André Almeida
  2025-06-16  6:59 ` [PATCH 0/2] drm: amdgpu: Fix includes of <linux/export.h> Christian König
  2 siblings, 0 replies; 6+ messages in thread
From: André Almeida @ 2025-06-13 18:26 UTC (permalink / raw)
  To: Alex Deucher, Christian König, Thomas Zimmermann
  Cc: dri-devel, linux-kernel, kernel-dev, amd-gfx, André Almeida

Fix the following compile time warning when building with W=1:

warning: EXPORT_SYMBOL() is not used, but #include <linux/export.h> is present

Signed-off-by: André Almeida <andrealmeid@igalia.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c      | 1 -
 drivers/gpu/drm/amd/amdkfd/kfd_chardev.c     | 1 -
 drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c | 1 -
 3 files changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c
index 8179d0814db9..57101d24422f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c
@@ -24,7 +24,6 @@
  *          Alex Deucher
  */
 
-#include <linux/export.h>
 #include <linux/pci.h>
 
 #include <drm/drm_edid.h>
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
index a2149afa5803..828a9ceef1e7 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
@@ -22,7 +22,6 @@
  */
 
 #include <linux/device.h>
-#include <linux/export.h>
 #include <linux/err.h>
 #include <linux/fs.h>
 #include <linux/file.h>
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c b/drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c
index dbcb60eb54b2..1d170dc50df3 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c
@@ -23,7 +23,6 @@
  */
 
 #include <linux/device.h>
-#include <linux/export.h>
 #include <linux/err.h>
 #include <linux/fs.h>
 #include <linux/sched.h>
-- 
2.49.0


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

* [PATCH 2/2] drm/amd: Include <linux/export.h> when needed
  2025-06-13 18:26 [PATCH 0/2] drm: amdgpu: Fix includes of <linux/export.h> André Almeida
  2025-06-13 18:26 ` [PATCH 1/2] drm/amd: Do not include <linux/export.h> when unused André Almeida
@ 2025-06-13 18:26 ` André Almeida
  2025-06-16  6:59 ` [PATCH 0/2] drm: amdgpu: Fix includes of <linux/export.h> Christian König
  2 siblings, 0 replies; 6+ messages in thread
From: André Almeida @ 2025-06-13 18:26 UTC (permalink / raw)
  To: Alex Deucher, Christian König, Thomas Zimmermann
  Cc: dri-devel, linux-kernel, kernel-dev, amd-gfx, André Almeida

Fix the following compile time warning when building with W=1:

warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing

Signed-off-by: André Almeida <andrealmeid@igalia.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c  | 1 +
 drivers/gpu/drm/amd/amdxcp/amdgpu_xcp_drv.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
index 73403744331a..e9530ed6ad43 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
@@ -32,6 +32,7 @@
 #include <linux/list.h>
 #include <linux/slab.h>
 #include <linux/dma-buf.h>
+#include <linux/export.h>
 
 #include <drm/drm_drv.h>
 #include <drm/amdgpu_drm.h>
diff --git a/drivers/gpu/drm/amd/amdxcp/amdgpu_xcp_drv.c b/drivers/gpu/drm/amd/amdxcp/amdgpu_xcp_drv.c
index faed84172dd4..8bc36f04b1b7 100644
--- a/drivers/gpu/drm/amd/amdxcp/amdgpu_xcp_drv.c
+++ b/drivers/gpu/drm/amd/amdxcp/amdgpu_xcp_drv.c
@@ -21,6 +21,7 @@
  *
  */
 
+#include <linux/export.h>
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
-- 
2.49.0


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

* Re: [PATCH 0/2] drm: amdgpu: Fix includes of <linux/export.h>
  2025-06-13 18:26 [PATCH 0/2] drm: amdgpu: Fix includes of <linux/export.h> André Almeida
  2025-06-13 18:26 ` [PATCH 1/2] drm/amd: Do not include <linux/export.h> when unused André Almeida
  2025-06-13 18:26 ` [PATCH 2/2] drm/amd: Include <linux/export.h> when needed André Almeida
@ 2025-06-16  6:59 ` Christian König
  2025-06-24 15:27   ` André Almeida
  2 siblings, 1 reply; 6+ messages in thread
From: Christian König @ 2025-06-16  6:59 UTC (permalink / raw)
  To: André Almeida, Alex Deucher, Thomas Zimmermann
  Cc: dri-devel, linux-kernel, kernel-dev, amd-gfx

Acked-by: Christian König <christian.koenig@amd.com> for the series.

On 6/13/25 20:26, André Almeida wrote:
> Commit 7d95680d64ac ("scripts/misc-check: check unnecessary #include
> <linux/export.h> when W=1") and commit a934a57a42f6 ("scripts/misc-check:
> check missing #include <linux/export.h> when W=1") added new checks for when the
> include <linux/export.h> is missued by drivers. This patchset make drm/amd code
> compliant to this new commits.
> 
> See also: https://lore.kernel.org/dri-devel/20250612121633.229222-1-tzimmermann@suse.de/
> 
> André Almeida (2):
>   drm/amd: Do not include <linux/export.h> when unused
>   drm/amd: Include <linux/export.h> when needed
> 
>  drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c      | 1 -
>  drivers/gpu/drm/amd/amdgpu/amdgpu_object.c   | 1 +
>  drivers/gpu/drm/amd/amdkfd/kfd_chardev.c     | 1 -
>  drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c | 1 -
>  drivers/gpu/drm/amd/amdxcp/amdgpu_xcp_drv.c  | 1 +
>  5 files changed, 2 insertions(+), 3 deletions(-)
> 


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

* Re: [PATCH 0/2] drm: amdgpu: Fix includes of <linux/export.h>
  2025-06-16  6:59 ` [PATCH 0/2] drm: amdgpu: Fix includes of <linux/export.h> Christian König
@ 2025-06-24 15:27   ` André Almeida
  2025-06-24 16:06     ` Alex Deucher
  0 siblings, 1 reply; 6+ messages in thread
From: André Almeida @ 2025-06-24 15:27 UTC (permalink / raw)
  To: Alex Deucher
  Cc: dri-devel, Thomas Zimmermann, Christian König, linux-kernel,
	kernel-dev, amd-gfx

Hi Alex,

Em 16/06/2025 03:59, Christian König escreveu:
> Acked-by: Christian König <christian.koenig@amd.com> for the series.
> 

Can you add this series to amd-staging-drm-next? Thanks!

> On 6/13/25 20:26, André Almeida wrote:
>> Commit 7d95680d64ac ("scripts/misc-check: check unnecessary #include
>> <linux/export.h> when W=1") and commit a934a57a42f6 ("scripts/misc-check:
>> check missing #include <linux/export.h> when W=1") added new checks for when the
>> include <linux/export.h> is missued by drivers. This patchset make drm/amd code
>> compliant to this new commits.
>>
>> See also: https://lore.kernel.org/dri-devel/20250612121633.229222-1-tzimmermann@suse.de/
>>
>> André Almeida (2):
>>    drm/amd: Do not include <linux/export.h> when unused
>>    drm/amd: Include <linux/export.h> when needed
>>
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c      | 1 -
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_object.c   | 1 +
>>   drivers/gpu/drm/amd/amdkfd/kfd_chardev.c     | 1 -
>>   drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c | 1 -
>>   drivers/gpu/drm/amd/amdxcp/amdgpu_xcp_drv.c  | 1 +
>>   5 files changed, 2 insertions(+), 3 deletions(-)
>>
> 


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

* Re: [PATCH 0/2] drm: amdgpu: Fix includes of <linux/export.h>
  2025-06-24 15:27   ` André Almeida
@ 2025-06-24 16:06     ` Alex Deucher
  0 siblings, 0 replies; 6+ messages in thread
From: Alex Deucher @ 2025-06-24 16:06 UTC (permalink / raw)
  To: André Almeida
  Cc: Alex Deucher, dri-devel, Thomas Zimmermann, Christian König,
	linux-kernel, kernel-dev, amd-gfx

Applied.  Thanks!

On Tue, Jun 24, 2025 at 11:27 AM André Almeida <andrealmeid@igalia.com> wrote:
>
> Hi Alex,
>
> Em 16/06/2025 03:59, Christian König escreveu:
> > Acked-by: Christian König <christian.koenig@amd.com> for the series.
> >
>
> Can you add this series to amd-staging-drm-next? Thanks!
>
> > On 6/13/25 20:26, André Almeida wrote:
> >> Commit 7d95680d64ac ("scripts/misc-check: check unnecessary #include
> >> <linux/export.h> when W=1") and commit a934a57a42f6 ("scripts/misc-check:
> >> check missing #include <linux/export.h> when W=1") added new checks for when the
> >> include <linux/export.h> is missued by drivers. This patchset make drm/amd code
> >> compliant to this new commits.
> >>
> >> See also: https://lore.kernel.org/dri-devel/20250612121633.229222-1-tzimmermann@suse.de/
> >>
> >> André Almeida (2):
> >>    drm/amd: Do not include <linux/export.h> when unused
> >>    drm/amd: Include <linux/export.h> when needed
> >>
> >>   drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c      | 1 -
> >>   drivers/gpu/drm/amd/amdgpu/amdgpu_object.c   | 1 +
> >>   drivers/gpu/drm/amd/amdkfd/kfd_chardev.c     | 1 -
> >>   drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c | 1 -
> >>   drivers/gpu/drm/amd/amdxcp/amdgpu_xcp_drv.c  | 1 +
> >>   5 files changed, 2 insertions(+), 3 deletions(-)
> >>
> >
>

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

end of thread, other threads:[~2025-06-24 16:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-13 18:26 [PATCH 0/2] drm: amdgpu: Fix includes of <linux/export.h> André Almeida
2025-06-13 18:26 ` [PATCH 1/2] drm/amd: Do not include <linux/export.h> when unused André Almeida
2025-06-13 18:26 ` [PATCH 2/2] drm/amd: Include <linux/export.h> when needed André Almeida
2025-06-16  6:59 ` [PATCH 0/2] drm: amdgpu: Fix includes of <linux/export.h> Christian König
2025-06-24 15:27   ` André Almeida
2025-06-24 16:06     ` Alex Deucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).