Re: [PATCH v2 1/3] lib/crc7: Shift crc7() output left 1 bit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Seems to me to make the code easier to read, not harder. That was the whole point.

On May 14, 2014 6:15:51 PM PDT, George Spelvin <linux@xxxxxxxxxxx> wrote:
>H. Peter Anvin wrote:
>> If the whole point of this is to use it for MMC/SD cards, why not
>just
>> also subsume the OR 1 and call it crc7_mmc() or something like that.
>>
>> (Which I'm all for doing... I don't know of any other crc7 users.)
>
>You'll find all users in my patch series.  2/3 updates the MMC
>card, while 3/3 hits drivers/net/wireless/ti/wl1251/spi.c and
>drivers/net/wireless/ti/wlcore/spi.c (which I'm pretty sure aren't
>MMC/SPI cards).
>
>Now, it turns out that they *also* set the lsbit (calling it
>WSPI_INIT_CMD_END).  However, it's not possible to put that into the
>CRC
>table (it would mess up all bytes but the last), so an explicitly coded
>"| 1" is required at the end.  Thic ends up being no saving at all to
>execution path length, and only moves one instruction from three
>drivers
>to shared code.  While making it harder to read the drivers.
>
>A microscopic space saving (if and only if you have more than one of
>these
>drivers loaded) and no performance improvement didn't seem worth it to
>me.

-- 
Sent from my mobile phone.  Please pardon brevity and lack of formatting.
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux