Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755146Ab3EaVFN (ORCPT ); Fri, 31 May 2013 17:05:13 -0400 Received: from mail-ob0-f176.google.com ([209.85.214.176]:33913 "EHLO mail-ob0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753294Ab3EaVFI (ORCPT ); Fri, 31 May 2013 17:05:08 -0400 MIME-Version: 1.0 In-Reply-To: <51A6EBC5.7040601@asianux.com> References: <51A6EBC5.7040601@asianux.com> Date: Sat, 1 Jun 2013 00:05:07 +0300 Message-ID: Subject: Re: [PATCH] include/linux/skbuff.h: using '0xffff' instead of '~0U' From: Andy Shevchenko To: Chen Gang Cc: edumazet@google.com, Pravin Shelar , mgorman@suse.de, David Miller , Andrew Morton , "linux-kernel@vger.kernel.org" , netdev Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 589 Lines: 20 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. -- With Best Regards, Andy Shevchenko -- 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/