From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756973Ab2IDM1D (ORCPT ); Tue, 4 Sep 2012 08:27:03 -0400 Received: from acsinet15.oracle.com ([141.146.126.227]:18519 "EHLO acsinet15.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756925Ab2IDM1C (ORCPT ); Tue, 4 Sep 2012 08:27:02 -0400 Date: Tue, 4 Sep 2012 05:25:44 -0700 From: Dan Carpenter To: Manavendra Nath Manav Cc: kernelnewbies@kernelnewbies.org, devel@driverdev.osuosl.org, Greg KH , linux-kernel@vger.kernel.org Subject: Re: Why exported const value modified by another driver not updated in original driver Message-ID: <20120904122544.GC19396@mwanda> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: ucsinet21.oracle.com [156.151.31.93] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 04, 2012 at 03:58:20PM +0530, Manavendra Nath Manav wrote: > Is the above a genuine kernel bug, or i am missing something out here. Pls help. > When you declare something as const then the compiler assumes it really is const and uses a literal instead of reading from memory. I'm surprised the compiler doesn't print a warning message. It has to do with compilers, nothing to do with kernels. regards, dan carpenter