Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754160AbYGYS6y (ORCPT ); Fri, 25 Jul 2008 14:58:54 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751408AbYGYS6q (ORCPT ); Fri, 25 Jul 2008 14:58:46 -0400 Received: from terminus.zytor.com ([198.137.202.10]:50874 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751309AbYGYS6p (ORCPT ); Fri, 25 Jul 2008 14:58:45 -0400 Message-ID: <488A223F.80709@zytor.com> Date: Fri, 25 Jul 2008 14:58:07 -0400 From: "H. Peter Anvin" User-Agent: Thunderbird 2.0.0.14 (X11/20080501) MIME-Version: 1.0 To: Harvey Harrison CC: Linus Torvalds , David Miller , Andrew Morton , LKML Subject: Re: [PATCH] byteorder: force in-place endian conversion to always evaluate args References: <1217003621.5971.4.camel@brick> <488A17EC.2000107@zytor.com> <1217009975.5971.21.camel@brick> In-Reply-To: <1217009975.5971.21.camel@brick> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 789 Lines: 23 Harvey Harrison wrote: >> For what it's worth, the way to write a macro like this: >> >> #define __cpu_to_be64s(x) ((void)(x)) > > If you've looked at the byteorder rework I've done in -mm, these get > unified in a single include/linux/byteorder.h and look like: [inline functions] What I meant with the above, was that it seems poorly understood how to write an empty "function-like" macro. Obviously, inline functions don't have this problem, and is generally better anyway (type-safe even in the empty condition, for example.) -hpa -- 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/