Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964843AbXBLKff (ORCPT ); Mon, 12 Feb 2007 05:35:35 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S964849AbXBLKff (ORCPT ); Mon, 12 Feb 2007 05:35:35 -0500 Received: from ns2.suse.de ([195.135.220.15]:58953 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964843AbXBLKfe (ORCPT ); Mon, 12 Feb 2007 05:35:34 -0500 To: Mathieu Desnoyers Cc: linux-kernel@vger.kernel.org, Andrew Morton Subject: Re: [PATCH 10/10] atomic.h : Add atomic64 cmpxchg, xchg and add_unless to x86_64 References: <11712214684187-git-send-email-mathieu.desnoyers@polymtl.ca> <11712214703522-git-send-email-mathieu.desnoyers@polymtl.ca> From: Andi Kleen Date: 12 Feb 2007 12:35:47 +0100 In-Reply-To: <11712214703522-git-send-email-mathieu.desnoyers@polymtl.ca> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 796 Lines: 19 Mathieu Desnoyers writes: > > /** > @@ -402,7 +405,7 @@ static __inline__ long atomic64_sub_return(long i, atomic64_t *v) > */ > #define atomic_add_unless(v, a, u) \ > ({ \ > - int c, old; \ > + __typeof__((v)->counter) c, old; \ This change seems useless. Please drop. In general you should enforce atomic_t vs atomic64_t types on x86, otherwise people will write code that won't compile on other architectures that have truly different implementations. I would suggest using inlines. -Andi - 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/