Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756299Ab3FCJYp (ORCPT ); Mon, 3 Jun 2013 05:24:45 -0400 Received: from intranet.asianux.com ([58.214.24.6]:40741 "EHLO intranet.asianux.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755312Ab3FCJYn (ORCPT ); Mon, 3 Jun 2013 05:24:43 -0400 X-Spam-Score: -100.8 Message-ID: <51AC60AA.8010107@asianux.com> Date: Mon, 03 Jun 2013 17:23:54 +0800 From: Chen Gang User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Andy Shevchenko CC: edumazet@google.com, Pravin Shelar , mgorman@suse.de, David Miller , Andrew Morton , "linux-kernel@vger.kernel.org" , netdev , Ben Hutchings Subject: Re: [PATCH] include/linux/skbuff.h: using '0xffff' instead of '~0U' References: <51A6EBC5.7040601@asianux.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 802 Lines: 27 On 06/01/2013 05:05 AM, Andy Shevchenko wrote: > On Thu, May 30, 2013 at 9:03 AM, Chen Gang wrote: >> > >> > Both 'transport_header' and 'mac_header' are u16, which are never equal >> > to '~0U'. >> > >> > So need use '0xffff' instead of '~0U'. > Why not "(u16)~0" ? > Or even better "!= USHORT_MAX"? > > Or mac_header + 1 == 0, though it less clear. It seems they are just the same as '0xffff' (are all 'magic' number). We'd better to give a meaningful name to it just like Ben said. Thanks. -- Chen Gang Asianux Corporation -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/