Re: Why exported const value modified by another driver not updated in original driver

2012-09-05 Thread Manavendra Nath Manav
On Tue, Sep 4, 2012 at 5:55 PM, Dan Carpenter wrote: > 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

Re: Why exported const value modified by another driver not updated in original driver

2012-09-05 Thread Manavendra Nath Manav
On Tue, Sep 4, 2012 at 5:55 PM, Dan Carpenter dan.carpen...@oracle.com wrote: 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

Re: Why exported const value modified by another driver not updated in original driver

2012-09-04 Thread Dan Carpenter
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

Re: Why exported const value modified by another driver not updated in original driver

2012-09-04 Thread Bernd Petrovitsch
Hi! On Die, 2012-09-04 at 15:00 +0530, Manavendra Nath Manav wrote: [] > I have declared a static const int variable in one driver and exported > that variable symbol. Exporting a "static" variable makes conceptually no sense whatsoever - either you want it exported (so you should remove the

Re: Why exported const value modified by another driver not updated in original driver

2012-09-04 Thread Manavendra Nath Manav
On Tue, Sep 4, 2012 at 4:09 PM, Julian Andres Klode wrote: > On Tue, Sep 04, 2012 at 03:58:20PM +0530, Manavendra Nath Manav wrote: >> On Tue, Sep 4, 2012 at 3:00 PM, Manavendra Nath Manav >> wrote: >> > Hi, >> > >> > I have declared a static const int variable in one driver and exported >> >

Re: Why exported const value modified by another driver not updated in original driver

2012-09-04 Thread Alan Cox
On Tue, 4 Sep 2012 15:00:16 +0530 Manavendra Nath Manav 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

Re: Why exported const value modified by another driver not updated in original driver

2012-09-04 Thread Julian Andres Klode
On Tue, Sep 04, 2012 at 03:58:20PM +0530, Manavendra Nath Manav wrote: > On Tue, Sep 4, 2012 at 3:00 PM, Manavendra Nath Manav > 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.

Re: Why exported const value modified by another driver not updated in original driver

2012-09-04 Thread Manavendra Nath Manav
On Tue, Sep 4, 2012 at 3:00 PM, Manavendra Nath Manav 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

Why exported const value modified by another driver not updated in original driver

2012-09-04 Thread Manavendra Nath Manav
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

Why exported const value modified by another driver not updated in original driver

2012-09-04 Thread Manavendra Nath Manav
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

Re: Why exported const value modified by another driver not updated in original driver

2012-09-04 Thread Manavendra Nath Manav
On Tue, Sep 4, 2012 at 3:00 PM, Manavendra Nath Manav mnm.ker...@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

Re: Why exported const value modified by another driver not updated in original driver

2012-09-04 Thread Julian Andres Klode
On Tue, Sep 04, 2012 at 03:58:20PM +0530, Manavendra Nath Manav wrote: On Tue, Sep 4, 2012 at 3:00 PM, Manavendra Nath Manav mnm.ker...@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

Re: Why exported const value modified by another driver not updated in original driver

2012-09-04 Thread Alan Cox
On Tue, 4 Sep 2012 15:00:16 +0530 Manavendra Nath Manav mnm.ker...@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

Re: Why exported const value modified by another driver not updated in original driver

2012-09-04 Thread Manavendra Nath Manav
On Tue, Sep 4, 2012 at 4:09 PM, Julian Andres Klode j...@jak-linux.org wrote: On Tue, Sep 04, 2012 at 03:58:20PM +0530, Manavendra Nath Manav wrote: On Tue, Sep 4, 2012 at 3:00 PM, Manavendra Nath Manav mnm.ker...@gmail.com wrote: Hi, I have declared a static const int variable in one

Re: Why exported const value modified by another driver not updated in original driver

2012-09-04 Thread Bernd Petrovitsch
Hi! On Die, 2012-09-04 at 15:00 +0530, Manavendra Nath Manav wrote: [] I have declared a static const int variable in one driver and exported that variable symbol. Exporting a static variable makes conceptually no sense whatsoever - either you want it exported (so you should remove the

Re: Why exported const value modified by another driver not updated in original driver

2012-09-04 Thread Dan Carpenter
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