Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936934AbWLKQGJ (ORCPT ); Mon, 11 Dec 2006 11:06:09 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S936935AbWLKQGJ (ORCPT ); Mon, 11 Dec 2006 11:06:09 -0500 Received: from smtp.osdl.org ([65.172.181.25]:39020 "EHLO smtp.osdl.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936934AbWLKQGH (ORCPT ); Mon, 11 Dec 2006 11:06:07 -0500 Date: Mon, 11 Dec 2006 08:05:56 -0800 (PST) From: Linus Torvalds To: David Howells cc: Akinobu Mita , akpm@osdl.org, linux-kernel@vger.kernel.org Subject: Re: Mark bitrevX() functions as const In-Reply-To: <29447.1165840536@redhat.com> Message-ID: References: <29447.1165840536@redhat.com> 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: 742 Lines: 20 On Mon, 11 Dec 2006, David Howells wrote: > > Mark the bit reversal functions as being const as they always return the same > output for any given input. Well, we should mark the argument const too, no? Does anythign actually improve from this? Also, we should actually use "__attribute_const__" instead (which works with other compilers), not the gcc'ism. That "__attribute__((const))" thing is a horrible syntax anyway (and has apparently slipped into too - Damn. Linus - 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/