Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753946AbcDYJOW (ORCPT ); Mon, 25 Apr 2016 05:14:22 -0400 Received: from mail-pa0-f66.google.com ([209.85.220.66]:33521 "EHLO mail-pa0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753533AbcDYJOT (ORCPT ); Mon, 25 Apr 2016 05:14:19 -0400 Subject: Re: [PATCH V3 01/29] bitops: add parity functions To: George Spelvin , linux-kernel@vger.kernel.org, zengzhaoxiu@163.com References: <20160419184501.13069.qmail@ns.horizon.com> Cc: akpm@linux-foundation.org, arnd@arndb.de, dvlasenk@redhat.com, linux-arch@vger.kernel.org, martink@posteo.de, mingo@kernel.org, sasha.levin@oracle.com, yury.norov@gmail.com From: Zeng Zhaoxiu Message-ID: <571DDFE3.9010407@gmail.com> Date: Mon, 25 Apr 2016 17:14:11 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <20160419184501.13069.qmail@ns.horizon.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 506 Lines: 11 在 2016年04月20日 02:45, George Spelvin 写道: >> Add generic odd parity functions, adapted from >> "https://graphics.stanford.edu/~seander/bithacks.html#ParityParallel" > Given a PARITY_MAGIC of 0x6996, this is even parity, not odd. > > (Which it should be; an XOR of all bits is the "natural" form.) From "http://www.encyclopedia.com/doc/1O11-oddparity.html", we can get the definition of "odd parity": odd parity A property that holds when a group of binary values contains an odd number of 1s.