public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/client: remove the exporting of drm_client_close
@ 2019-07-03 17:01 Denis Efremov
  2019-07-04 14:07 ` Emil Velikov
  0 siblings, 1 reply; 4+ messages in thread
From: Denis Efremov @ 2019-07-03 17:01 UTC (permalink / raw)
  To: Noralf Trønnes; +Cc: Denis Efremov, Daniel Vetter, dri-devel, linux-kernel

The function drm_client_close is declared as static and marked as
EXPORT_SYMBOL. It's a bit confusing for an internal function to be
exported. The area of visibility for such function is its .c file
and all other modules. Other *.c files of the same module can't use it,
despite all other modules can. Relying on the fact that this is the
internal function and it's not a crucial part of the API, the patch
removes the EXPORT_SYMBOL marking of drm_client_close.

Signed-off-by: Denis Efremov <efremov@linux.com>
---
 drivers/gpu/drm/drm_client.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_client.c b/drivers/gpu/drm/drm_client.c
index f20d1dda3961..bffc87ac21c7 100644
--- a/drivers/gpu/drm/drm_client.c
+++ b/drivers/gpu/drm/drm_client.c
@@ -60,7 +60,6 @@ static void drm_client_close(struct drm_client_dev *client)
 
 	drm_file_free(client->file);
 }
-EXPORT_SYMBOL(drm_client_close);
 
 /**
  * drm_client_init - Initialise a DRM client
-- 
2.21.0


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

* Re: [PATCH] drm/client: remove the exporting of drm_client_close
  2019-07-03 17:01 [PATCH] drm/client: remove the exporting of drm_client_close Denis Efremov
@ 2019-07-04 14:07 ` Emil Velikov
  2019-07-04 16:31   ` Denis Efremov
  2019-07-09  9:42   ` Noralf Trønnes
  0 siblings, 2 replies; 4+ messages in thread
From: Emil Velikov @ 2019-07-04 14:07 UTC (permalink / raw)
  To: Denis Efremov
  Cc: Noralf Trønnes, ML dri-devel, Linux-Kernel@Vger. Kernel. Org

On Thu, 4 Jul 2019 at 08:27, Denis Efremov <efremov@linux.com> wrote:
>
> The function drm_client_close is declared as static and marked as
> EXPORT_SYMBOL. It's a bit confusing for an internal function to be
> exported. The area of visibility for such function is its .c file
> and all other modules. Other *.c files of the same module can't use it,
> despite all other modules can. Relying on the fact that this is the
> internal function and it's not a crucial part of the API, the patch
> removes the EXPORT_SYMBOL marking of drm_client_close.
>
> Signed-off-by: Denis Efremov <efremov@linux.com>

Nice one:
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>

Out of curiosity: Did you use some tool to spot this?

-Emil

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

* Re: [PATCH] drm/client: remove the exporting of drm_client_close
  2019-07-04 14:07 ` Emil Velikov
@ 2019-07-04 16:31   ` Denis Efremov
  2019-07-09  9:42   ` Noralf Trønnes
  1 sibling, 0 replies; 4+ messages in thread
From: Denis Efremov @ 2019-07-04 16:31 UTC (permalink / raw)
  To: Emil Velikov
  Cc: Noralf Trønnes, ML dri-devel, Linux-Kernel@Vger. Kernel. Org

> 
> Out of curiosity: Did you use some tool to spot this?
> 

Just regular expressions:
https://github.com/evdenis/export_checking

But it's not very reliable because of false positives. I think I can try
to implement this kind of check as a part of modpost in addition to
CONFIG_DEBUG_SECTION_MISMATCH.

Denis

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

* Re: [PATCH] drm/client: remove the exporting of drm_client_close
  2019-07-04 14:07 ` Emil Velikov
  2019-07-04 16:31   ` Denis Efremov
@ 2019-07-09  9:42   ` Noralf Trønnes
  1 sibling, 0 replies; 4+ messages in thread
From: Noralf Trønnes @ 2019-07-09  9:42 UTC (permalink / raw)
  To: Emil Velikov, Denis Efremov; +Cc: ML dri-devel, Linux-Kernel@Vger. Kernel. Org



Den 04.07.2019 16.07, skrev Emil Velikov:
> On Thu, 4 Jul 2019 at 08:27, Denis Efremov <efremov@linux.com> wrote:
>>
>> The function drm_client_close is declared as static and marked as
>> EXPORT_SYMBOL. It's a bit confusing for an internal function to be
>> exported. The area of visibility for such function is its .c file
>> and all other modules. Other *.c files of the same module can't use it,
>> despite all other modules can. Relying on the fact that this is the
>> internal function and it's not a crucial part of the API, the patch
>> removes the EXPORT_SYMBOL marking of drm_client_close.
>>
>> Signed-off-by: Denis Efremov <efremov@linux.com>
> 
> Nice one:
> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>

Thanks, applied.

Noralf.

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

end of thread, other threads:[~2019-07-09  9:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-03 17:01 [PATCH] drm/client: remove the exporting of drm_client_close Denis Efremov
2019-07-04 14:07 ` Emil Velikov
2019-07-04 16:31   ` Denis Efremov
2019-07-09  9:42   ` Noralf Trønnes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox