[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] FDC: simplify code [v2]
From: |
Blue Swirl |
Subject: |
Re: [Qemu-devel] [PATCH] FDC: simplify code [v2] |
Date: |
Mon, 7 Apr 2008 20:38:20 +0300 |
On 4/6/08, Hervé Poussineau <address@hidden> wrote:
> Hi,
>
> Attached patch prevents duplication of quite similar code in fdc.c, and so,
> removes 300 lines and 8KB of code.
> It first extracts implementation of FDC commands to separate methods, and
> then uses a table to know which method to execute instead of a big switch.
>
> This patch takes cares of Blue Swirl's comments, and replaces linear search
> by a direct table lookup.
I hate myself saying this, but the search version looked better. The
table is ugly. I didn't notice the different masks in the original or
the previous version, sorry.