From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932586AbcLHTnh (ORCPT ); Thu, 8 Dec 2016 14:43:37 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:34308 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932178AbcLHTnf (ORCPT ); Thu, 8 Dec 2016 14:43:35 -0500 MIME-Version: 1.0 In-Reply-To: <81146f25-05fa-70f9-e8ff-49c17aede8f2@ozlabs.org> References: <1481076574-54711-1-git-send-email-christopher.lee.bostic@gmail.com> <1481076574-54711-2-git-send-email-christopher.lee.bostic@gmail.com> <20161207090219.GA14742@kroah.com> <81146f25-05fa-70f9-e8ff-49c17aede8f2@ozlabs.org> From: Christopher Bostic Date: Thu, 8 Dec 2016 13:43:33 -0600 Message-ID: Subject: Re: [PATCH 08/16] drivers/fsi: Add crc4 helpers To: Jeremy Kerr Cc: Greg KH , Rob Herring , Mark Rutland , linux@armlinux.org.uk, sre@kernel.org, Michael Turquette , geert+renesas@glider.be, Open List OF Flattened dev tree bindings , "Moderated list: ARM PORT" , Joel Stanley , Linux open list , Andrew Jeffery , Alistair Popple , Benjamin Herrenschmidt , Chris Bostic Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 7, 2016 at 5:33 PM, Jeremy Kerr wrote: > Hi Greg, > >> Why not just create lib/crc4.c with these functions, like the other crc >> functions in the kernel? > > Two (bad) reasons: > > - The crc4 implementation here is pretty specific to the FSI > usage (only supporting 4-bit-sized chunks), to keep the math & lookup > table simple > > - I'm lazy > > So yes, we should spend the effort now to make this generic enough for > a lib/crc4.c. Would we want to support different values for the > polynomial? > > Chris: do you want me to to that, or will you? Hi Jeremy, I'll take this one. Will implement as per Greg's suggestions. Thanks, Chris > > Cheers, > > > Jeremy