Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933799AbZLFOWX (ORCPT ); Sun, 6 Dec 2009 09:22:23 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933637AbZLFOWW (ORCPT ); Sun, 6 Dec 2009 09:22:22 -0500 Received: from mx3.mail.elte.hu ([157.181.1.138]:50999 "EHLO mx3.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933736AbZLFOWV (ORCPT ); Sun, 6 Dec 2009 09:22:21 -0500 Message-ID: <4B1BBE71.70305@gmail.com> Date: Sun, 06 Dec 2009 15:23:45 +0100 From: Emese Revfy User-Agent: Thunderbird 2.0.0.23 (X11/20090812) MIME-Version: 1.0 To: Alexey Dobriyan CC: linux-kernel@vger.kernel.org Subject: Re: [PATCH 28/31] Constify struct super_operations for 2.6.32 v1 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-ELTE-SpamScore: 0.0 X-ELTE-SpamLevel: X-ELTE-SpamCheck: no X-ELTE-SpamVersion: ELTE 2.0 X-ELTE-SpamCheck-Details: score=0.0 required=5.9 tests=none autolearn=no SpamAssassin version=3.2.5 _SUMMARY_ Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1044 Lines: 23 Alexey Dobriyan wrote: >> - struct inode *(*alloc_inode)(struct super_block *sb); >> + struct inode *(* const alloc_inode)(struct super_block *sb); > > Good rule is if adding const doesn't move object from one section > to another, it isn't worth it. > > I suggest we stick to it or risk another wave of jumbo patches. > If all instances of a given ops structure are const and we would like to preserve this policy for the future as well, then it is very useful to give future programmers a strong hint about this policy by making the compiler complain about any violation attempts. Otherwise they may very well write code that modifies such structures and we will have to work extra to undo that (or change the policy but in that case it is good to know why we have to do that). -- Emese -- 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/