linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mips: namespace pollution: dump_regs() -> elf_dump_regs()
@ 2005-12-16 22:40 Al Viro
  2005-12-17 22:20 ` Ralf Baechle
  2005-12-19 12:07 ` Maciej W. Rozycki
  0 siblings, 2 replies; 5+ messages in thread
From: Al Viro @ 2005-12-16 22:40 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: ralf, linux-kernel

dump_regs() is used by a bunch of drivers for their internal stuff;
renamed mips instance (one that is seen in system-wide headers)
to elf_dump_regs()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---

 arch/mips/kernel/process.c |    4 ++--
 include/asm-mips/elf.h     |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

7cb0f5ab7ecf09fc83483f3f2b0d2005d789dba5
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c
index dd72577..0476a4d 100644
--- a/arch/mips/kernel/process.c
+++ b/arch/mips/kernel/process.c
@@ -205,7 +205,7 @@ int dump_fpu(struct pt_regs *regs, elf_f
 	return 1;
 }
 
-void dump_regs(elf_greg_t *gp, struct pt_regs *regs)
+void elf_dump_regs(elf_greg_t *gp, struct pt_regs *regs)
 {
 	int i;
 
@@ -231,7 +231,7 @@ int dump_task_regs (struct task_struct *
 {
 	struct thread_info *ti = tsk->thread_info;
 	long ksp = (unsigned long)ti + THREAD_SIZE - 32;
-	dump_regs(&(*regs)[0], (struct pt_regs *) ksp - 1);
+	elf_dump_regs(&(*regs)[0], (struct pt_regs *) ksp - 1);
 	return 1;
 }
 
diff --git a/include/asm-mips/elf.h b/include/asm-mips/elf.h
index d2c9a25..851f013 100644
--- a/include/asm-mips/elf.h
+++ b/include/asm-mips/elf.h
@@ -277,12 +277,12 @@ do {									\
 
 struct task_struct;
 
-extern void dump_regs(elf_greg_t *, struct pt_regs *regs);
+extern void elf_dump_regs(elf_greg_t *, struct pt_regs *regs);
 extern int dump_task_regs (struct task_struct *, elf_gregset_t *);
 extern int dump_task_fpu(struct task_struct *, elf_fpregset_t *);
 
 #define ELF_CORE_COPY_REGS(elf_regs, regs)			\
-	dump_regs((elf_greg_t *)&(elf_regs), regs);
+	elf_dump_regs((elf_greg_t *)&(elf_regs), regs);
 #define ELF_CORE_COPY_TASK_REGS(tsk, elf_regs) dump_task_regs(tsk, elf_regs)
 #define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs)			\
 	dump_task_fpu(tsk, elf_fpregs)
-- 
0.99.9.GIT

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

* Re: [PATCH] mips: namespace pollution: dump_regs() -> elf_dump_regs()
  2005-12-16 22:40 [PATCH] mips: namespace pollution: dump_regs() -> elf_dump_regs() Al Viro
@ 2005-12-17 22:20 ` Ralf Baechle
  2005-12-19 12:07 ` Maciej W. Rozycki
  1 sibling, 0 replies; 5+ messages in thread
From: Ralf Baechle @ 2005-12-17 22:20 UTC (permalink / raw)
  To: Al Viro; +Cc: Linus Torvalds, linux-kernel

On Fri, Dec 16, 2005 at 10:40:47PM +0000, Al Viro wrote:

> dump_regs() is used by a bunch of drivers for their internal stuff;
> renamed mips instance (one that is seen in system-wide headers)
> to elf_dump_regs()

Applied.

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

* Re: [PATCH] mips: namespace pollution: dump_regs() -> elf_dump_regs()
  2005-12-16 22:40 [PATCH] mips: namespace pollution: dump_regs() -> elf_dump_regs() Al Viro
  2005-12-17 22:20 ` Ralf Baechle
@ 2005-12-19 12:07 ` Maciej W. Rozycki
  2005-12-19 16:07   ` Al Viro
  1 sibling, 1 reply; 5+ messages in thread
From: Maciej W. Rozycki @ 2005-12-19 12:07 UTC (permalink / raw)
  To: Al Viro; +Cc: Linus Torvalds, ralf, linux-kernel

On Fri, 16 Dec 2005, Al Viro wrote:

> dump_regs() is used by a bunch of drivers for their internal stuff;
> renamed mips instance (one that is seen in system-wide headers)
> to elf_dump_regs()

 I guess drivers should be fixed not to use generic names in the first 
place -> s/dump_regs/frobnicator_dump_regs/, etc.

  Maciej

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

* Re: [PATCH] mips: namespace pollution: dump_regs() -> elf_dump_regs()
  2005-12-19 12:07 ` Maciej W. Rozycki
@ 2005-12-19 16:07   ` Al Viro
  2005-12-20 12:16     ` Maciej W. Rozycki
  0 siblings, 1 reply; 5+ messages in thread
From: Al Viro @ 2005-12-19 16:07 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: Linus Torvalds, ralf, linux-kernel

On Mon, Dec 19, 2005 at 12:07:09PM +0000, Maciej W. Rozycki wrote:
> On Fri, 16 Dec 2005, Al Viro wrote:
> 
> > dump_regs() is used by a bunch of drivers for their internal stuff;
> > renamed mips instance (one that is seen in system-wide headers)
> > to elf_dump_regs()
> 
>  I guess drivers should be fixed not to use generic names in the first 
> place -> s/dump_regs/frobnicator_dump_regs/, etc.

No.  If nothing else, it's far less work to keep the headers reasonably
clean than to slap prefices on every damn static-in-file function
out there.  Leads to more readable code in drivers, too...

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

* Re: [PATCH] mips: namespace pollution: dump_regs() -> elf_dump_regs()
  2005-12-19 16:07   ` Al Viro
@ 2005-12-20 12:16     ` Maciej W. Rozycki
  0 siblings, 0 replies; 5+ messages in thread
From: Maciej W. Rozycki @ 2005-12-20 12:16 UTC (permalink / raw)
  To: Al Viro; +Cc: Linus Torvalds, ralf, linux-kernel

On Mon, 19 Dec 2005, Al Viro wrote:

> >  I guess drivers should be fixed not to use generic names in the first 
> > place -> s/dump_regs/frobnicator_dump_regs/, etc.
> 
> No.  If nothing else, it's far less work to keep the headers reasonably
> clean than to slap prefices on every damn static-in-file function

 That's the duty of the respective maintainers.  You don't expect one to 
have a private printk() (or whatever -- pick your favourite) function in a 
driver and demand the global one to be renamed so that their own one keeps 
working.

> out there.  Leads to more readable code in drivers, too...

 Well, that's just a reason to keep namespace prefixes short...

  Maciej

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

end of thread, other threads:[~2005-12-20 12:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-16 22:40 [PATCH] mips: namespace pollution: dump_regs() -> elf_dump_regs() Al Viro
2005-12-17 22:20 ` Ralf Baechle
2005-12-19 12:07 ` Maciej W. Rozycki
2005-12-19 16:07   ` Al Viro
2005-12-20 12:16     ` Maciej W. Rozycki

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