* [PATCH] drmOpenByName: remove redundant drmAvailable check
@ 2014-04-17 4:08 Daniel Kurtz
2014-05-13 3:46 ` Daniel Kurtz
2014-05-13 10:16 ` Thierry Reding
0 siblings, 2 replies; 5+ messages in thread
From: Daniel Kurtz @ 2014-04-17 4:08 UTC (permalink / raw)
To: Dave Airlie, dri-devel
drmOpenByName() is a static function that is only called by drmOpen().
drmOpen() already checks drmAvailable(), so the checki in
drmOpenByName() is redundant.
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
---
xf86drm.c | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/xf86drm.c b/xf86drm.c
index 720952f..118022c 100644
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -537,19 +537,6 @@ static int drmOpenByName(const char *name)
int fd;
drmVersionPtr version;
char * id;
-
- if (!drmAvailable()) {
- if (!drm_server_info) {
- return -1;
- }
- else {
- /* try to load the kernel module now */
- if (!drm_server_info->load_module(name)) {
- drmMsg("[drm] failed to load kernel module \"%s\"\n", name);
- return -1;
- }
- }
- }
/*
* Open the first minor number that matches the driver name and isn't
--
1.9.1.423.g4596e3a
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] drmOpenByName: remove redundant drmAvailable check
2014-04-17 4:08 [PATCH] drmOpenByName: remove redundant drmAvailable check Daniel Kurtz
@ 2014-05-13 3:46 ` Daniel Kurtz
2014-05-13 11:49 ` Thierry Reding
2014-05-13 10:16 ` Thierry Reding
1 sibling, 1 reply; 5+ messages in thread
From: Daniel Kurtz @ 2014-05-13 3:46 UTC (permalink / raw)
To: Dave Airlie, dri-devel, robdclark
Rob,
Can you take a look at this one too, now that I have your attention :-).
-djk
On Thu, Apr 17, 2014 at 12:08 PM, Daniel Kurtz <djkurtz@chromium.org> wrote:
> drmOpenByName() is a static function that is only called by drmOpen().
> drmOpen() already checks drmAvailable(), so the checki in
> drmOpenByName() is redundant.
>
> Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
> ---
> xf86drm.c | 13 -------------
> 1 file changed, 13 deletions(-)
>
> diff --git a/xf86drm.c b/xf86drm.c
> index 720952f..118022c 100644
> --- a/xf86drm.c
> +++ b/xf86drm.c
> @@ -537,19 +537,6 @@ static int drmOpenByName(const char *name)
> int fd;
> drmVersionPtr version;
> char * id;
> -
> - if (!drmAvailable()) {
> - if (!drm_server_info) {
> - return -1;
> - }
> - else {
> - /* try to load the kernel module now */
> - if (!drm_server_info->load_module(name)) {
> - drmMsg("[drm] failed to load kernel module \"%s\"\n", name);
> - return -1;
> - }
> - }
> - }
>
> /*
> * Open the first minor number that matches the driver name and isn't
> --
> 1.9.1.423.g4596e3a
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drmOpenByName: remove redundant drmAvailable check
2014-04-17 4:08 [PATCH] drmOpenByName: remove redundant drmAvailable check Daniel Kurtz
2014-05-13 3:46 ` Daniel Kurtz
@ 2014-05-13 10:16 ` Thierry Reding
1 sibling, 0 replies; 5+ messages in thread
From: Thierry Reding @ 2014-05-13 10:16 UTC (permalink / raw)
To: Daniel Kurtz; +Cc: Dave Airlie, dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 478 bytes --]
On Thu, Apr 17, 2014 at 12:08:01PM +0800, Daniel Kurtz wrote:
> drmOpenByName() is a static function that is only called by drmOpen().
> drmOpen() already checks drmAvailable(), so the checki in
> drmOpenByName() is redundant.
>
> Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
> ---
> xf86drm.c | 13 -------------
> 1 file changed, 13 deletions(-)
Looks good to me. I've fixed up the typo (checki -> check) in the commit
message and pushed this.
Thierry
[-- Attachment #1.2: Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drmOpenByName: remove redundant drmAvailable check
2014-05-13 3:46 ` Daniel Kurtz
@ 2014-05-13 11:49 ` Thierry Reding
2014-05-13 12:46 ` Rob Clark
0 siblings, 1 reply; 5+ messages in thread
From: Thierry Reding @ 2014-05-13 11:49 UTC (permalink / raw)
To: Daniel Kurtz; +Cc: Dave Airlie, dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 259 bytes --]
On Tue, May 13, 2014 at 11:46:54AM +0800, Daniel Kurtz wrote:
> Rob,
> Can you take a look at this one too, now that I have your attention :-).
Oh, and now I read that you wanted Rob to look at this. Rob, I hope you
don't mind me jumping the queue.
Thierry
[-- Attachment #1.2: Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drmOpenByName: remove redundant drmAvailable check
2014-05-13 11:49 ` Thierry Reding
@ 2014-05-13 12:46 ` Rob Clark
0 siblings, 0 replies; 5+ messages in thread
From: Rob Clark @ 2014-05-13 12:46 UTC (permalink / raw)
To: Thierry Reding; +Cc: Dave Airlie, dri-devel
On Tue, May 13, 2014 at 7:49 AM, Thierry Reding
<thierry.reding@gmail.com> wrote:
> On Tue, May 13, 2014 at 11:46:54AM +0800, Daniel Kurtz wrote:
>> Rob,
>> Can you take a look at this one too, now that I have your attention :-).
>
> Oh, and now I read that you wanted Rob to look at this. Rob, I hope you
> don't mind me jumping the queue.
thx Thierry, I'm not going to argue about someone doing my work for me
before I have a chance to :-P
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-05-13 12:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-17 4:08 [PATCH] drmOpenByName: remove redundant drmAvailable check Daniel Kurtz
2014-05-13 3:46 ` Daniel Kurtz
2014-05-13 11:49 ` Thierry Reding
2014-05-13 12:46 ` Rob Clark
2014-05-13 10:16 ` Thierry Reding
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.