From: David Daney <ddaney@avtrex.com>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: Dominic Sweetman <dom@mips.com>, Nigel Stephens <nigel@mips.com>,
Atsushi Nemoto <anemo@mba.ocn.ne.jp>,
linux-mips@linux-mips.org
Subject: Re: c-r4k.c cleanup
Date: Fri, 04 Feb 2005 09:51:50 -0800 [thread overview]
Message-ID: <4203B636.6060606@avtrex.com> (raw)
In-Reply-To: <20050204155340.GB22217@linux-mips.org>
Ralf Baechle wrote:
> This is what I've checked in.
>
> Ralf
>
> Index: arch/mips/mm/c-r4k.c
> ===================================================================
> RCS file: /home/cvs/linux/arch/mips/mm/c-r4k.c,v
> retrieving revision 1.97
> diff -u -r1.97 c-r4k.c
> --- arch/mips/mm/c-r4k.c 4 Feb 2005 15:19:01 -0000 1.97
> +++ arch/mips/mm/c-r4k.c 4 Feb 2005 15:48:38 -0000
> @@ -1012,9 +1012,17 @@
> * normally they'd suffer from aliases but magic in the hardware deals
> * with that for us so we don't need to take care ourselves.
> */
> - if (c->cputype != CPU_R10000 && c->cputype != CPU_R12000)
> + switch (c->cputype) {
> if (c->dcache.waysize > PAGE_SIZE)
> - c->dcache.flags |= MIPS_CACHE_ALIASES;
> +
> + case CPU_R10000:
> + case CPU_R12000:
> + break;
> + case CPU_24K:
> + if (!(read_c0_config7() & (1 << 16)))
> + default:
> + c->dcache.flags |= MIPS_CACHE_ALIASES;
> + }
>
> switch (c->cputype) {
> case CPU_20KC:
That may be legal C, but I have a difficult time figuring out exactly
what it is supposed to do as case labels in the middle of statements
confuses me.
Does the first if in the switch do anything? My reading of the spec
indicates that it is unreachable code.
Just my $0.02
David Daney.
next prev parent reply other threads:[~2005-02-04 17:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-04 14:12 c-r4k.c cleanup Atsushi Nemoto
2005-02-04 14:39 ` Nigel Stephens
2005-02-04 14:58 ` Ralf Baechle
2005-02-04 15:19 ` Dominic Sweetman
2005-02-04 15:45 ` Ralf Baechle
2005-02-04 15:53 ` Ralf Baechle
2005-02-04 17:51 ` David Daney [this message]
2005-02-04 17:49 ` Jun Sun
2005-02-07 10:24 ` Atsushi Nemoto
2005-02-07 12:32 ` Yoichi Yuasa
2005-02-07 14:04 ` Yoichi Yuasa
2005-02-07 12:36 ` Dominic Sweetman
2005-02-07 13:52 ` Dominic Sweetman
2005-02-07 21:49 ` Ralf Baechle
2005-02-07 21:36 ` Ralf Baechle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4203B636.6060606@avtrex.com \
--to=ddaney@avtrex.com \
--cc=anemo@mba.ocn.ne.jp \
--cc=dom@mips.com \
--cc=linux-mips@linux-mips.org \
--cc=nigel@mips.com \
--cc=ralf@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox