Skip to contentSkip to conversation

clean up exports in fs/{open,read_write}.c

PATCH In review Eugene Teo 4 participants 5 messages Aug 24, 2007 – Aug 28, 2007 VFS

lore
Share & tools
lore

Eugene Teo

author
#0 lore raw

PATCH 1/1 clean up exports in fs/{open,read_write}.c

Takashi-san fixed sound/isa/wavefront/wavefront_synth.c to use request_firmware instead of sys_*. Since that is the last driver in the kernel that uses sys_{read,close}, this patch kills these exports. sys_open is left exported for sparc64 only.

Cc Takashi Iwai <[email protected]>
Cc Christoph Hellwig <[email protected]>
Cc Arjan van de Ven <[email protected]>
---
 fs/open.c       |    4 ++--
 fs/read_write.c |    1 -
 2 files changed, 2 insertions(+), 3 deletions(-)
fs/open.c +2 -2
index 1d9e5e9..dc121ce 100644
@@ -1056,7 +1056,9 @@ asmlinkage long sys_open(const char __user *filename, int flags, int mode)
 	prevent_tail_call(ret);
 	return ret;
 }
+#ifdef CONFIG_SPARC64
 EXPORT_SYMBOL_GPL(sys_open);
+#endif
 
 asmlinkage long sys_openat(int dfd, const char __user *filename, int flags,
 			   int mode)
@@ -1148,8 +1150,6 @@ out_unlock:
 	return -EBADF;
 }
 
-EXPORT_SYMBOL(sys_close);
-
 /*
  * This routine simulates a hangup on the tty, to arrange that users
  * are given clean terminals at login time.
fs/read_write.c +0 -1
index 507ddff..d913d1e 100644
@@ -370,7 +370,6 @@ asmlinkage ssize_t sys_read(unsigned int fd, char __user * buf, size_t count)
 
 	return ret;
 }
-EXPORT_SYMBOL_GPL(sys_read);
 
 asmlinkage ssize_t sys_write(unsigned int fd, const char __user * buf, size_t count)
 {
#1 lore raw
Quoted 4 lines · Eugene Teo

Takashi-san fixed sound/isa/wavefront/wavefront_synth.c to use request_firmware instead of sys_*. Since that is the last driver in the kernel that uses sys_{read,close}, this patch kills these exports. sys_open is left exported for sparc64 only.

I can't find any spar user of it, so please kill it. In the case a symbol is needed only for a particular architecture it's better to do it in the architecture-specific ksyms file than with an ifdef, btw.

#2 lore raw
Quoted 7 lines · Christoph Hellwig
Quoted 4 lines · Eugene Teo

Takashi-san fixed sound/isa/wavefront/wavefront_synth.c to use request_firmware instead of sys_*. Since that is the last driver in the kernel that uses sys_{read,close}, this patch kills these exports. sys_open is left exported for sparc64 only.

I can't find any spar user of it, so please kill it.

it's in the solaris compat code which is modular

Quoted 3 lines

In the case a symbol
is needed only for a particular architecture it's better to do it in the architecture-specific ksyms file than with an ifdef, btw.

agreed.
(well if it's only 1 or 2, if it's "half of them" it's obviously a different story)

#3 lore raw
Quoted 11 lines · Arjan van de Ven
Quoted 8 lines · Christoph Hellwig
Quoted 5 lines · Eugene Teo

Takashi-san fixed sound/isa/wavefront/wavefront_synth.c to use request_firmware instead of sys_*. Since that is the last driver in the kernel that uses sys_{read,close}, this patch kills these exports. sys_open
is left exported for sparc64 only.

I can't find any spar user of it, so please kill it.

it's in the solaris compat code which is modular

While it does use some sys_ symbols, I can't find it use sys_open.

#4 lore raw
In reply to Eugene Teo
Quoted 5 lines · Eugene Teo

Takashi-san fixed sound/isa/wavefront/wavefront_synth.c to use request_firmware instead of sys_*. Since that is the last driver in the kernel that uses sys_{read,close}, this patch kills these exports. sys_open is left exported for sparc64 only.
...

fs/binfmt_misc.c still uses sys_close.

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed