linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [MIPS] Malta: Remove unneeded function protos from malta-reset.c
@ 2009-06-26 16:59 Dmitri Vorobiev
  2009-06-28 18:17 ` Ralf Baechle
  0 siblings, 1 reply; 5+ messages in thread
From: Dmitri Vorobiev @ 2009-06-26 16:59 UTC (permalink / raw)
  To: linux-mips, ralf; +Cc: Dmitri Vorobiev

Two prototypes of statically defined functions aren't needed
in arch/mips/mti-malta/malta-reset.c, so remove them.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.com>
---
 arch/mips/mti-malta/malta-reset.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/arch/mips/mti-malta/malta-reset.c b/arch/mips/mti-malta/malta-reset.c
index 42dee4d..f48d60e 100644
--- a/arch/mips/mti-malta/malta-reset.c
+++ b/arch/mips/mti-malta/malta-reset.c
@@ -28,9 +28,6 @@
 #include <asm/reboot.h>
 #include <asm/mips-boards/generic.h>
 
-static void mips_machine_restart(char *command);
-static void mips_machine_halt(void);
-
 static void mips_machine_restart(char *command)
 {
 	unsigned int __iomem *softres_reg =
-- 
1.6.0.4

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

* Re: [PATCH] [MIPS] Malta: Remove unneeded function protos from malta-reset.c
  2009-06-26 16:59 [PATCH] [MIPS] Malta: Remove unneeded function protos from malta-reset.c Dmitri Vorobiev
@ 2009-06-28 18:17 ` Ralf Baechle
  2009-07-01  0:17   ` Maciej W. Rozycki
  0 siblings, 1 reply; 5+ messages in thread
From: Ralf Baechle @ 2009-06-28 18:17 UTC (permalink / raw)
  To: Dmitri Vorobiev; +Cc: linux-mips

On Fri, Jun 26, 2009 at 07:59:25PM +0300, Dmitri Vorobiev wrote:

There should be a tax on useless prototypes and also excessive parentheses ;-)

Thanks, applied.

  Ralf

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

* Re: [PATCH] [MIPS] Malta: Remove unneeded function protos from malta-reset.c
  2009-06-28 18:17 ` Ralf Baechle
@ 2009-07-01  0:17   ` Maciej W. Rozycki
  2009-07-01  6:31     ` Ralf Baechle
  0 siblings, 1 reply; 5+ messages in thread
From: Maciej W. Rozycki @ 2009-07-01  0:17 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: Dmitri Vorobiev, linux-mips

On Sun, 28 Jun 2009, Ralf Baechle wrote:

> There should be a tax on useless prototypes and also excessive parentheses ;-)

 And insufficient parentheses causing the average reader to refer to the 
language spec for the operator priority list. ;)

  Maciej

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

* Re: [PATCH] [MIPS] Malta: Remove unneeded function protos from malta-reset.c
  2009-07-01  0:17   ` Maciej W. Rozycki
@ 2009-07-01  6:31     ` Ralf Baechle
  2009-07-01 15:46       ` Maciej W. Rozycki
  0 siblings, 1 reply; 5+ messages in thread
From: Ralf Baechle @ 2009-07-01  6:31 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: Dmitri Vorobiev, linux-mips

On Wed, Jul 01, 2009 at 01:17:22AM +0100, Maciej W. Rozycki wrote:

> > There should be a tax on useless prototypes and also excessive parentheses ;-)
> 
>  And insufficient parentheses causing the average reader to refer to the 
> language spec for the operator priority list. ;)

Code written to require intimate knowledge of all operator priorities is
probably as bad as overuse.  Here a few examples:

	return (1);
#define FOO	(42)
	a = (b + c);
	a = (b + c) + d;
	a = (b * c) + (d * e);
	if ((a > b) && (a < c))

  Ralf

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

* Re: [PATCH] [MIPS] Malta: Remove unneeded function protos from malta-reset.c
  2009-07-01  6:31     ` Ralf Baechle
@ 2009-07-01 15:46       ` Maciej W. Rozycki
  0 siblings, 0 replies; 5+ messages in thread
From: Maciej W. Rozycki @ 2009-07-01 15:46 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: Dmitri Vorobiev, linux-mips

On Wed, 1 Jul 2009, Ralf Baechle wrote:

> Code written to require intimate knowledge of all operator priorities is
> probably as bad as overuse.  Here a few examples:
> 
> 	return (1);
> #define FOO	(42)
> 	a = (b + c);
> 	a = (b + c) + d;
> 	a = (b * c) + (d * e);
> 	if ((a > b) && (a < c))

 Sometimes additional brackets are useful to emphasise some logical 
grouping of entities used, so I would accept even such a construct as:

	a = (b + c + d) + (e + f);

to bring attention of the reader that a, b and c refer to something other 
than e and f, but yes, it would require explicit justification and I 
wouldn't consider it a blanket accept statement for such kinds of 
expressions.

 The #define case makes my eyes hurt.  OTOH we require unnecessary 
brackets in the context of sizeof. ;)

  Maciej

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

end of thread, other threads:[~2009-07-01 15:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-26 16:59 [PATCH] [MIPS] Malta: Remove unneeded function protos from malta-reset.c Dmitri Vorobiev
2009-06-28 18:17 ` Ralf Baechle
2009-07-01  0:17   ` Maciej W. Rozycki
2009-07-01  6:31     ` Ralf Baechle
2009-07-01 15:46       ` 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).