[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] [PATCH] Change name of kentry member XHNewCookie



Patch fixed.

2012/3/28 David Gálvez <dgalvez75@gmail.com>:
> Please, don't apply the patch yet I have problems to compile the
> kernel after the changes.
>
> 2012/3/28 David Gálvez <dgalvez75@gmail.com>:
>> Some time ago I added the function XHNewCookie to kentry struct to
>> allow the installation of XHDI drivers.
>> Now while rewriting part of the USB mass storage driver from assembly
>> to C I see I must have chosen another name for the struct member.
>> Drivers are going to use the names given by the XHDI specification and
>> XHNewCookie will conflict with the function name in kentry.
>> So to allow drivers to have their function names consistent I'd like
>> to change the name in kentry.
>> I think only USB mass storage driver has been using it so I think
>> there will be no problem.
>> I've been thinking in sending this patch or not because I find it a
>> little bit ridiculous but I think is the thing to do.
>>
>> Comment:
>>
>> Change struct member name XHNewCookie to xhnewcookie to avoid possible
>> conflicts with drivers code.
Index: libkern/kernel_module.h
===================================================================
RCS file: /mint/freemint/sys/libkern/kernel_module.h,v
retrieving revision 1.45
diff -u -8 -r1.45 kernel_module.h
--- libkern/kernel_module.h	10 Mar 2012 10:39:51 -0000	1.45
+++ libkern/kernel_module.h	28 Mar 2012 17:28:46 -0000
@@ -946,17 +946,17 @@
 
 # define trap_1_emu		(*KENTRY->vec.misc.trap_1_emu)
 # define trap_13_emu		(*KENTRY->vec.misc.trap_13_emu)
 # define trap_14_emu		(*KENTRY->vec.misc.trap_14_emu)
 
 # define ROM_Setexc(vnum,vptr)	(void (*)(void))trap_13_emu(0x05,(short)(vnum),(long)(vptr))
 
 #ifdef XHDI_MASS_STORAGE_SUPPORT
-# define XHNewCookie		(*KENTRY->vec_misc.XHNewCookie)
+# define xhnewcookie		(*KENTRY->vec_misc.XHNewCookie)
 #endif
 
 /*
  * kentry_debug
  */
 # define DEBUG_LEVEL		(*KENTRY->vec_debug.debug_level)
 # define KERNEL_TRACE		(*KENTRY->vec_debug.trace)
 # define KERNEL_DEBUG		(*KENTRY->vec_debug.debug)
Index: usb/src.km/udd/storage/usb_storage.c
===================================================================
RCS file: /mint/freemint/sys/usb/src.km/udd/storage/usb_storage.c,v
retrieving revision 1.2
diff -u -8 -r1.2 usb_storage.c
--- usb/src.km/udd/storage/usb_storage.c	30 Jul 2011 19:21:00 -0000	1.2
+++ usb/src.km/udd/storage/usb_storage.c	28 Mar 2012 17:28:49 -0000
@@ -390,17 +390,17 @@
 	
 	b_ubconout(dev, c);
 }
 
 long
 XHDINewCookie_from_S(void *newcookie)
 {
 	long r;
-	r = XHNewCookie(newcookie);
+	r = xhnewcookie(newcookie);
 	DEBUG((" XHNewCookie %d", r));
 	return r;
 }
 
 /* --- Inteface functions -------------------------------------------------- */
 
 static long _cdecl
 storage_open (struct uddif *u)