linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Manavendra Nath Manav <mnm.kernel@gmail.com>
Cc: kernelnewbies@kernelnewbies.org, linux-kernel@vger.kernel.org
Subject: Re: Why exported const value modified by another driver not updated in original driver
Date: Tue, 4 Sep 2012 11:46:18 +0100	[thread overview]
Message-ID: <20120904114618.62a1d89e@pyramind.ukuu.org.uk> (raw)
In-Reply-To: <CAJKgH8Ah-aq=LfOWs2SBZnndzugNGxJbqYS11YVQLXJy6FZxkw@mail.gmail.com>

On Tue, 4 Sep 2012 15:00:16 +0530
Manavendra Nath Manav <mnm.kernel@gmail.com> wrote:

> Hi,
> 
> I have declared a static const int variable in one driver and exported
> that variable symbol. In another driver i am modifying that variable.
> The other driver prints the modified value but the original driver
> retains the original value. When both virtual and physical addresses
> of the variable as seen by both drivers are same, how is this even
> possible. Is it a kernel bug?

It's const, why is it even a surprise. If you don't understand what is
going on then I suggest you disassemble the code. That will I think let
you understand what is going on.

Alan

  parent reply	other threads:[~2012-09-04 10:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-04  9:30 Why exported const value modified by another driver not updated in original driver Manavendra Nath Manav
2012-09-04 10:28 ` Manavendra Nath Manav
2012-09-04 10:39   ` Julian Andres Klode
2012-09-04 10:59     ` Manavendra Nath Manav
2012-09-04 11:49       ` Chinmay V S
2012-09-04 12:25   ` Dan Carpenter
2012-09-05  8:27     ` Manavendra Nath Manav
2012-09-04 10:46 ` Alan Cox [this message]
2012-09-04 12:06 ` Bernd Petrovitsch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120904114618.62a1d89e@pyramind.ukuu.org.uk \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mnm.kernel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).