This message generated a parse failure. Raw output follows here. Please use 'back' to navigate. From devnull@lkml.org Sat Apr 27 06:08:17 2024 Delivery-date: Mon, 13 Feb 2006 21:04:33 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S964840AbWBMUEE (ORCPT ); Mon, 13 Feb 2006 15:04:04 -0500 Received: from odyssey.analogic.com ([204.178.40.5]:14603 "EHLO odyssey.analogic.com") by vger.kernel.org with ESMTP id S964839AbWBMUEC convert rfc822-to-8bit (ORCPT ); Mon, 13 Feb 2006 15:04:02 -0500 Received: from chaos.analogic.com ([10.112.50.11]) by phoenix.analogic.com with Microsoft SMTPSVC(6.0.3790.211); Mon, 13 Feb 2006 15:03:46 -0500 Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Received: from chaos.analogic.com (localhost [127.0.0.1]) by chaos.analogic.com (8.12.11/8.12.11) with ESMTP id k1DK3k9Z017398; Mon, 13 Feb 2006 15:03:46 -0500 Received: (from linux-os@localhost) by chaos.analogic.com (8.12.11/8.12.11/Submit) id k1DK3kDZ017397; Mon, 13 Feb 2006 15:03:46 -0500 In-Reply-To: <20060213115248.2f6445f4.akpm@osdl.org> X-OriginalArrivalTime: 13 Feb 2006 20:03:47.0158 (UTC) FILETIME=[996A2F60:01C630D8] content-class: urn:content-classes:message Subject: Re: [PATCH 02/13] hrtimer: remove useless const Date: Mon, 13 Feb 2006 15:03:46 -0500 Message-Id: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH 02/13] hrtimer: remove useless const Thread-Index: AcYw2JlzC4LxccubSZeEwgPVGLBvDw== References: <1139830116.2480.464.camel@localhost.localdomain><20060213114612.GA30500@elte.hu><20060213035354.65b04c15.akpm@osdl.org> To: "Andrew Morton" Cc: "Roman Zippel" , , , Reply-To: "linux-os \(Dick Johnson\)" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 13 Feb 2006, Andrew Morton wrote: > Roman Zippel wrote: >> >> On Mon, 13 Feb 2006, Andrew Morton wrote: >> >> > const arguments to functions are pretty useful for code readability and >> > maintainability too, if you use them consistently. >> >> I could understand that argument, if gcc would warn about it in any way. > > It does. If a function tries to modify a formal argument which was marked > const you'll get a warning. > > We're talking about different things here. My point is that it is > perverted and evil for a function to modify its own args (unless it's very > small and simple), and a const declaration is a useful way for a > maintenance programmer to be assured that nobody has done perverted and > evil things to a function. > - This is evil???? void foo(int len) { while(len--) do_something(); } I don't think so. The function already owns "len". Why should it create another copy? Cheers, Dick Johnson Penguin : Linux version 2.6.13.4 on an i686 machine (5589.66 BogoMips). Warning : 98.36% of all statistics are fiction. _  **************************************************************** The information transmitted in this message is confidential and may be privileged. Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to DeliveryErrors@analogic.com - and destroy all copies of this information, including any attachments, without reading or disclosing them. Thank you. - 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/