[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4F39467D.9070409@intel.com>
Date: Mon, 13 Feb 2012 09:21:01 -0800
From: Alexander Duyck <alexander.h.duyck@...el.com>
To: Ben Hutchings <bhutchings@...arflare.com>
CC: Jeff Kirsher <jeffrey.t.kirsher@...el.com>, davem@...emloft.net,
netdev@...r.kernel.org, gospo@...hat.com, sassmann@...hat.com
Subject: Re: [net-next 4/7] ixgbe: Add function for testing status bits in
Rx descriptor
On 02/11/2012 11:06 AM, Ben Hutchings wrote:
> On Fri, 2012-02-10 at 16:08 -0800, Jeff Kirsher wrote:
>> From: Alexander Duyck <alexander.h.duyck@...el.com>
>>
>> This change adds a small function for testing Rx status bits in the
>> descriptor. The advantage to this is that we can avoid unnecessary
>> byte swaps on big endian systems.
> [...]
>> + /* unmap the sg list when FCPRSP is received */
>> + case __constant_cpu_to_le32(IXGBE_RXDADV_STAT_FCSTAT_FCPRSP):
> [...]
>
> cpu_to_le32() works as a compile-time constant when given a constant
> argument. You shouldn't need this ugly __constant_ prefix.
>
> Ben.
>
If that is the case then what is the point of even having the
__constant_ prefixed version of these macros anyway? I ask because I
know we have had people submit patches in the past replacing htons calls
with __constant_htons and the like and nobody has ever spoken up before
to indicate that these were unnecessary.
Why don't you submit patches to get rid of these calls from the kernel
all together and just replace references to them with their non-prefixed
counterparts? Then you wouldn't have to worry about changes like this
being submitted in the future.
Alex
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists