linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] agp: Misc fix
@ 2017-09-01 12:13 Corentin Labbe
  2017-09-01 12:13 ` [PATCH 1/3] agp: move AGPGART_MINOR to include/linux/miscdevice.h Corentin Labbe
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Corentin Labbe @ 2017-09-01 12:13 UTC (permalink / raw)
  To: airlied, arnd, gregkh; +Cc: linux-kernel, Corentin Labbe

Hello

The first patch goal is to regroup all miscdevice number in the same place.
The two subsequent patch are build warning fix found when working on the first.

Corentin Labbe (3):
  agp: move AGPGART_MINOR to include/linux/miscdevice.h
  agp: add compat_ioctl.h to frontend.c
  agp: remove unused variable num_segments

 drivers/char/agp/frontend.c | 4 ++--
 include/linux/agpgart.h     | 2 --
 include/linux/miscdevice.h  | 1 +
 3 files changed, 3 insertions(+), 4 deletions(-)

-- 
2.13.5

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

* [PATCH 1/3] agp: move AGPGART_MINOR to include/linux/miscdevice.h
  2017-09-01 12:13 [PATCH 0/3] agp: Misc fix Corentin Labbe
@ 2017-09-01 12:13 ` Corentin Labbe
  2017-09-01 12:13 ` [PATCH 2/3] agp: add compat_ioctl.h to frontend.c Corentin Labbe
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Corentin Labbe @ 2017-09-01 12:13 UTC (permalink / raw)
  To: airlied, arnd, gregkh; +Cc: linux-kernel, Corentin Labbe

This patch move the define for AGPGART_MINOR to include/linux/miscdevice.h.
It is better that all minor number definitions are in the same place.

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
---
 include/linux/agpgart.h    | 2 --
 include/linux/miscdevice.h | 1 +
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/include/linux/agpgart.h b/include/linux/agpgart.h
index c6b61ca97053..21b34a96cfd8 100644
--- a/include/linux/agpgart.h
+++ b/include/linux/agpgart.h
@@ -30,8 +30,6 @@
 #include <linux/agp_backend.h>
 #include <uapi/linux/agpgart.h>
 
-#define AGPGART_MINOR 175
-
 struct agp_info {
 	struct agp_version version;	/* version of the driver        */
 	u32 bridge_id;		/* bridge vendor/device         */
diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h
index 05c3892b3e92..c6936d1546bd 100644
--- a/include/linux/miscdevice.h
+++ b/include/linux/miscdevice.h
@@ -32,6 +32,7 @@
 #define SGI_MMTIMER		153
 #define STORE_QUEUE_MINOR	155	/* unused */
 #define I2O_MINOR		166
+#define AGPGART_MINOR		175
 #define HWRNG_MINOR		183
 #define MICROCODE_MINOR		184
 #define IRNET_MINOR		187
-- 
2.13.5

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

* [PATCH 2/3] agp: add compat_ioctl.h to frontend.c
  2017-09-01 12:13 [PATCH 0/3] agp: Misc fix Corentin Labbe
  2017-09-01 12:13 ` [PATCH 1/3] agp: move AGPGART_MINOR to include/linux/miscdevice.h Corentin Labbe
@ 2017-09-01 12:13 ` Corentin Labbe
  2017-09-01 12:13 ` [PATCH 3/3] agp: remove unused variable num_segments Corentin Labbe
  2019-04-20 18:04 ` [PATCH 0/3] agp: Misc fix Corentin Labbe
  3 siblings, 0 replies; 5+ messages in thread
From: Corentin Labbe @ 2017-09-01 12:13 UTC (permalink / raw)
  To: airlied, arnd, gregkh; +Cc: linux-kernel, Corentin Labbe

When building I got the following warnings:
drivers/char/agp/frontend.c:163:5: warning: no previous prototype for 'agp_create_segment' [-Wmissing-prototypes]
drivers/char/agp/frontend.c:215:26: warning: no previous prototype for 'agp_find_private' [-Wmissing-prototypes]
drivers/char/agp/frontend.c:270:6: warning: no previous prototype for 'agp_free_memory_wrap' [-Wmissing-prototypes]
drivers/char/agp/frontend.c:276:20: warning: no previous prototype for 'agp_allocate_memory_wrap' [-Wmissing-prototypes]
drivers/char/agp/frontend.c:488:20: warning: no previous prototype for 'agp_find_client_by_pid' [-Wmissing-prototypes]
drivers/char/agp/frontend.c:513:20: warning: no previous prototype for 'agp_create_client' [-Wmissing-prototypes]
drivers/char/agp/frontend.c:526:5: warning: no previous prototype for 'agp_remove_client' [-Wmissing-prototypes]
drivers/char/agp/frontend.c:737:5: warning: no previous prototype for 'agpioc_acquire_wrap' [-Wmissing-prototypes]
drivers/char/agp/frontend.c:780:5: warning: no previous prototype for 'agpioc_release_wrap' [-Wmissing-prototypes]
drivers/char/agp/frontend.c:787:5: warning: no previous prototype for 'agpioc_setup_wrap' [-Wmissing-prototypes]
drivers/char/agp/frontend.c:867:5: warning: no previous prototype for 'agpioc_protect_wrap' [-Wmissing-prototypes]
drivers/char/agp/frontend.c:901:5: warning: no previous prototype for 'agpioc_deallocate_wrap' [-Wmissing-prototypes]

Since theses functions prototypes are in compat_ioctl.h and "users" of
compat_ioctl.h use them, frontend.c need to include compat_ioctl.h.

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
---
 drivers/char/agp/frontend.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/char/agp/frontend.c b/drivers/char/agp/frontend.c
index f6955888e676..68376eb54af4 100644
--- a/drivers/char/agp/frontend.c
+++ b/drivers/char/agp/frontend.c
@@ -41,6 +41,7 @@
 #include <linux/uaccess.h>
 #include <asm/pgtable.h>
 #include "agp.h"
+#include "compat_ioctl.h"
 
 struct agp_front_data agp_fe;
 
-- 
2.13.5

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

* [PATCH 3/3] agp: remove unused variable num_segments
  2017-09-01 12:13 [PATCH 0/3] agp: Misc fix Corentin Labbe
  2017-09-01 12:13 ` [PATCH 1/3] agp: move AGPGART_MINOR to include/linux/miscdevice.h Corentin Labbe
  2017-09-01 12:13 ` [PATCH 2/3] agp: add compat_ioctl.h to frontend.c Corentin Labbe
@ 2017-09-01 12:13 ` Corentin Labbe
  2019-04-20 18:04 ` [PATCH 0/3] agp: Misc fix Corentin Labbe
  3 siblings, 0 replies; 5+ messages in thread
From: Corentin Labbe @ 2017-09-01 12:13 UTC (permalink / raw)
  To: airlied, arnd, gregkh; +Cc: linux-kernel, Corentin Labbe

This patch fix the following build warning:
warning: variable 'num_segments' set but not used [-Wunused-but-set-variable]

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
---
 drivers/char/agp/frontend.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/char/agp/frontend.c b/drivers/char/agp/frontend.c
index 68376eb54af4..f91975cee665 100644
--- a/drivers/char/agp/frontend.c
+++ b/drivers/char/agp/frontend.c
@@ -103,14 +103,13 @@ agp_segment_priv *agp_find_seg_in_client(const struct agp_client *client,
 					    int size, pgprot_t page_prot)
 {
 	struct agp_segment_priv *seg;
-	int num_segments, i;
+	int i;
 	off_t pg_start;
 	size_t pg_count;
 
 	pg_start = offset / 4096;
 	pg_count = size / 4096;
 	seg = *(client->segments);
-	num_segments = client->num_segments;
 
 	for (i = 0; i < client->num_segments; i++) {
 		if ((seg[i].pg_start == pg_start) &&
-- 
2.13.5

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

* Re: [PATCH 0/3] agp: Misc fix
  2017-09-01 12:13 [PATCH 0/3] agp: Misc fix Corentin Labbe
                   ` (2 preceding siblings ...)
  2017-09-01 12:13 ` [PATCH 3/3] agp: remove unused variable num_segments Corentin Labbe
@ 2019-04-20 18:04 ` Corentin Labbe
  3 siblings, 0 replies; 5+ messages in thread
From: Corentin Labbe @ 2019-04-20 18:04 UTC (permalink / raw)
  To: airlied, arnd, gregkh; +Cc: linux-kernel

On Fri, Sep 01, 2017 at 02:13:29PM +0200, Corentin Labbe wrote:
> Hello
> 
> The first patch goal is to regroup all miscdevice number in the same place.
> The two subsequent patch are build warning fix found when working on the first.
> 
> Corentin Labbe (3):
>   agp: move AGPGART_MINOR to include/linux/miscdevice.h
>   agp: add compat_ioctl.h to frontend.c
>   agp: remove unused variable num_segments
> 
>  drivers/char/agp/frontend.c | 4 ++--
>  include/linux/agpgart.h     | 2 --
>  include/linux/miscdevice.h  | 1 +
>  3 files changed, 3 insertions(+), 4 deletions(-)
> 
> -- 
> 2.13.5
> 

Hello

Gentle ping

Regards

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

end of thread, other threads:[~2019-04-20 18:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-01 12:13 [PATCH 0/3] agp: Misc fix Corentin Labbe
2017-09-01 12:13 ` [PATCH 1/3] agp: move AGPGART_MINOR to include/linux/miscdevice.h Corentin Labbe
2017-09-01 12:13 ` [PATCH 2/3] agp: add compat_ioctl.h to frontend.c Corentin Labbe
2017-09-01 12:13 ` [PATCH 3/3] agp: remove unused variable num_segments Corentin Labbe
2019-04-20 18:04 ` [PATCH 0/3] agp: Misc fix Corentin Labbe

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).