Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3327388imm; Tue, 17 Jul 2018 02:58:56 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcGZocf1RVx2HvOUhDgdyrhD2d7lgS25lCTcrW8et5/41niUqgn/cYQkc0dQxwZYirAuzBl X-Received: by 2002:a63:704f:: with SMTP id a15-v6mr906504pgn.443.1531821536625; Tue, 17 Jul 2018 02:58:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531821536; cv=none; d=google.com; s=arc-20160816; b=NSqPiGqmjnVaXpui9qGqjQHmFFhoQ602QrUlHRUQHjQNAgIRvjC5jbGUrbN+kEzqnJ Lao7KxD/POjCbt1gAeYRAS1jEjDv3R0VEy0qIRSY1hUbBiQXNzgBJc6GA4ROP0/Rip95 Sa6x/OozVr/wKfSJd4bJ5lXPF4Nkw0zB6K5r9nCqj0rOFdGVyQhn6sPf55WWmM2N/Nfu pbM7YnDBpwI0t0TRE4vjEpS5j0UaRe/IppC5UmibVemTT7CJuHhle9Kprxs3ZhiyjjxD Y9VlS0aQ6JBq63JRXAF3JROP2FzCIiwvv8oaIuqnje9oQ3/n3f5r2lfCaYGDEOFFSlYU wxyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:date:cc:to:from:subject :message-id:arc-authentication-results; bh=fakMBwFYHMD6n9L3A5SKtmz/coopeOnYiXRhAeqwKQA=; b=eLdn5O1OkHqxDlbk0Fdxfo1k59fA2f0CAaEg8R4v9354xws1C/OcgP1ymZDnwg47oc VpjqQ2EwOGHlvPtZn4ttXTackvntmiHfI+wdiiWTaFyuIXndIwkTZmtA19JvWmTno0lV WXiaeGO3mxz03w1KvALIfjWWwFncXu5Visnv8RqouOEpcsMz+k6ooYRp9W8ukojgw0u6 1G8acS9n4ozoC3013QiWSmPVhAxZrZcCZq0Cwx0deyTsqiwdjVjcieKnqn5jvMxu5lOg 9Pjuvc9Tus1f8huAYHOTrFDaerndH3McNtHm2o1AIvpPVMwzCZ/fB7qyftGuHtUr/roO 7yMA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q16-v6si510147pgg.619.2018.07.17.02.58.41; Tue, 17 Jul 2018 02:58:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730137AbeGQK3Q (ORCPT + 99 others); Tue, 17 Jul 2018 06:29:16 -0400 Received: from mga05.intel.com ([192.55.52.43]:50190 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729684AbeGQK3Q (ORCPT ); Tue, 17 Jul 2018 06:29:16 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jul 2018 02:57:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,365,1526367600"; d="scan'208";a="54965934" Received: from smile.fi.intel.com (HELO smile) ([10.237.72.86]) by fmsmga007.fm.intel.com with ESMTP; 17 Jul 2018 02:57:25 -0700 Message-ID: <4a25d281a0e7f622872f1e9fe3abf44288ec87e4.camel@linux.intel.com> Subject: Re: [PATCH v2 1/3] lib: add crc64 calculation routines From: Andy Shevchenko To: Coly Li , linux-kernel@vger.kernel.org Cc: linux-bcache@vger.kernel.org, linux-block@vger.kernel.org, Greg Kroah-Hartman , Michael Lyle , Kent Overstreet , Linus Torvalds , Thomas Gleixner , Kate Stewart Date: Tue, 17 Jul 2018 12:57:24 +0300 In-Reply-To: <20180717065711.28281-2-colyli@suse.de> References: <20180717065711.28281-1-colyli@suse.de> <20180717065711.28281-2-colyli@suse.de> Organization: Intel Finland Oy Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.1-2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2018-07-17 at 14:57 +0800, Coly Li wrote: > This patch adds the re-write crc64 calculation routines for Linux > kernel. > The CRC64 polynomical arithmetic follows ECMA-182 specification, > inspired > by CRC paper of Dr. Ross N. Williams > (see http://www.ross.net/crc/download/crc_v3.txt) and other public > domain > implementations. > > All the changes work in this way, > - When Linux kernel is built, host program lib/gen_crc64table.c will > be > compiled to lib/gen_crc64table and executed. > - The output of gen_crc64table execution is an array called as lookup > table (a.k.a POLY 0x42f0e1eba9ea369) which contain 256 64bits-long > numbers, this talbe is dumped into header file lib/crc64table.h. > - Then the header file is included by lib/crc64.c for normal 64bit crc > calculation. > - Function declaration of the crc64 calculation routines is placed in > include/linux/crc64.h > + * crc64.h > + * Do we need file name in the file? > + * See lib/crc64.c for the related specification and polynomical > arithmetic. > + */ > +// SPDX-License-Identifier: GPL-2.0 > +#include > +#include Why not simple linux/types.h ? > +#include "crc64table.h" > + > +MODULE_DESCRIPTION("CRC64 calculations"); > +MODULE_LICENSE("GPL"); License mismatch with SPDX. > +#include > +#include > +#include I would follow the common grouping of the headers, like more generic first, more particular last: inttupes stdio linux/foo asm/bar > +#include "../usr/include/asm/byteorder.h" Hmm... -- Andy Shevchenko Intel Finland Oy