linux-mips
[Top] [All Lists]

Re: [PATCH] MIPS: cleanup switches with cases that can be merged

To: linux-mips@linux-mips.org
Subject: Re: [PATCH] MIPS: cleanup switches with cases that can be merged
From: Alexander Clouter <alex@digriz.org.uk>
Date: Wed, 20 Jan 2010 11:47:29 +0000
Cc: linux-kernel@vger.kernel.org
References: <4B56475F.8070608@gmail.com> <4B56641E.1030803@caviumnetworks.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: tin/1.9.3-20080506 ("Dalintober") (UNIX) (Linux/2.6.26-2-sparc64-smp (sparc64))
In gmane.linux.ports.mips.general David Daney <ddaney@caviumnetworks.com> wrote:
>
> [snipped]
> 
> This brings us to the larger question:  This is just code churn.  Is it 
> even worthwhile?
> 
Anything which reduces the line count and remove duplication whilst 
sticking to CodingStyle I would always argue for, but "who am I" :)

It at a glance, this type of code churn, shows there are no differences 
between two classes of <whatever> and the effect is it makes the chunk 
of code a mental NOOP for the person reading the code. :)

To me this is a natural extension of running with Chapter 14 of 
CodingStyle where you kmalloc using 'sizeof(*p)' rather than 
'sizeof(struct *foo)' so reducing the chance of errors later on.

Just my thoughts.

Cheers

-- 
Alexander Clouter
.sigmonster says: Snoopy: No problem is so big that it can't be run away from.


<Prev in Thread] Current Thread [Next in Thread>