diff for duplicates of <20100916061514.GD2463@linux.vnet.ibm.com> diff --git a/a/1.txt b/N1/1.txt index c792360..aa39c35 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -27,14 +27,17 @@ Agreed in principle, but please see below. > > CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \ > > - -Wbitwise -Wno-return-void $(CF) > > + -Wbitwise -Wno-return-void -DKBUILD_CHECKSRC $(CF) -> > CFLAGS_MODULE > > AFLAGS_MODULE > > LDFLAGS_MODULE > +> > CFLAGS_MODULE = +> > AFLAGS_MODULE = +> > LDFLAGS_MODULE = +> > sparse already define __CHECKER__ itself, no need to define another symbol. Good point, will fix if we are in fact sticking with this solution. > > +#ifdef KBUILD_CHECKSRC > > +#define rcu_dereference_sparse(p, space) \ -> > + ((void)(((typeof(*p) space *)p) = p)) +> > + ((void)(((typeof(*p) space *)p) == p)) > > +#else /* #ifdef KBUILD_CHECKSRC */ > > +#define rcu_dereference_sparse(p, space) > > +#endif /* #else #ifdef KBUILD_CHECKSRC */ @@ -42,7 +45,7 @@ Good point, will fix if we are in fact sticking with this solution. > Did you see a problem with my macro? > > #define rcu_dereference_sparse(p, space) \ -> ((void)(((typeof(*p) space *)NULL) = ((typeof(p))NULL))) +> ((void)(((typeof(*p) space *)NULL) == ((typeof(p))NULL))) I don't see a specific problem with it. However, I am not sure that it really does what we want, and you indicated some doubts when you @@ -57,7 +60,7 @@ I still note a tone of uncertainty in the above sentence. ;-) > > #define __rcu_access_pointer(p, space) \ > > ({ \ > > typeof(*p) *_________p1 = (typeof(*p)*__force )ACCESS_ONCE(p); \ -> > - (void) (((typeof (*p) space *)p) = p); \ +> > - (void) (((typeof (*p) space *)p) == p); \ > > + rcu_dereference_sparse(p, space); \ > > ((typeof(*p) __force __kernel *)(_________p1)); \ > > }) @@ -65,7 +68,7 @@ I still note a tone of uncertainty in the above sentence. ;-) > > ({ \ > > typeof(*p) *_________p1 = (typeof(*p)*__force )ACCESS_ONCE(p); \ > > rcu_lockdep_assert(c); \ -> > - (void) (((typeof (*p) space *)p) = p); \ +> > - (void) (((typeof (*p) space *)p) == p); \ > > + rcu_dereference_sparse(p, space); \ > > smp_read_barrier_depends(); \ > > ((typeof(*p) __force __kernel *)(_________p1)); \ @@ -73,7 +76,7 @@ I still note a tone of uncertainty in the above sentence. ;-) > > #define __rcu_dereference_protected(p, c, space) \ > > ({ \ > > rcu_lockdep_assert(c); \ -> > - (void) (((typeof (*p) space *)p) = p); \ +> > - (void) (((typeof (*p) space *)p) == p); \ > > + rcu_dereference_sparse(p, space); \ > > ((typeof(*p) __force __kernel *)(p)); \ > > }) diff --git a/a/content_digest b/N1/content_digest index e9f6e0f..d8a46b8 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -4,7 +4,7 @@ "ref\0201009151428.32348.arnd@arndb.de\0" "From\0Paul E. McKenney <paulmck@linux.vnet.ibm.com>\0" "Subject\0Re: [PATCH] md: do not use ++ in rcu_dereference() argument\0" - "Date\0Thu, 16 Sep 2010 06:15:14 +0000\0" + "Date\0Wed, 15 Sep 2010 23:15:14 -0700\0" "To\0Arnd Bergmann <arnd@arndb.de>\0" "Cc\0Kulikov Vasiliy <segooon@gmail.com>" kernel-janitors@vger.kernel.org @@ -43,14 +43,17 @@ "> > CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \\\n" "> > - -Wbitwise -Wno-return-void $(CF)\n" "> > + -Wbitwise -Wno-return-void -DKBUILD_CHECKSRC $(CF)\n" - "> > CFLAGS_MODULE > > AFLAGS_MODULE > > LDFLAGS_MODULE > \n" + "> > CFLAGS_MODULE =\n" + "> > AFLAGS_MODULE =\n" + "> > LDFLAGS_MODULE =\n" + "> \n" "> sparse already define __CHECKER__ itself, no need to define another symbol.\n" "\n" "Good point, will fix if we are in fact sticking with this solution.\n" "\n" "> > +#ifdef KBUILD_CHECKSRC\n" "> > +#define rcu_dereference_sparse(p, space) \\\n" - "> > + ((void)(((typeof(*p) space *)p) = p))\n" + "> > + ((void)(((typeof(*p) space *)p) == p))\n" "> > +#else /* #ifdef KBUILD_CHECKSRC */\n" "> > +#define rcu_dereference_sparse(p, space)\n" "> > +#endif /* #else #ifdef KBUILD_CHECKSRC */\n" @@ -58,7 +61,7 @@ "> Did you see a problem with my macro?\n" "> \n" "> #define rcu_dereference_sparse(p, space) \\\n" - "> ((void)(((typeof(*p) space *)NULL) = ((typeof(p))NULL)))\n" + "> ((void)(((typeof(*p) space *)NULL) == ((typeof(p))NULL)))\n" "\n" "I don't see a specific problem with it. However, I am not sure that\n" "it really does what we want, and you indicated some doubts when you\n" @@ -73,7 +76,7 @@ "> > #define __rcu_access_pointer(p, space) \\\n" "> > ({ \\\n" "> > typeof(*p) *_________p1 = (typeof(*p)*__force )ACCESS_ONCE(p); \\\n" - "> > - (void) (((typeof (*p) space *)p) = p); \\\n" + "> > - (void) (((typeof (*p) space *)p) == p); \\\n" "> > + rcu_dereference_sparse(p, space); \\\n" "> > ((typeof(*p) __force __kernel *)(_________p1)); \\\n" "> > })\n" @@ -81,7 +84,7 @@ "> > ({ \\\n" "> > typeof(*p) *_________p1 = (typeof(*p)*__force )ACCESS_ONCE(p); \\\n" "> > rcu_lockdep_assert(c); \\\n" - "> > - (void) (((typeof (*p) space *)p) = p); \\\n" + "> > - (void) (((typeof (*p) space *)p) == p); \\\n" "> > + rcu_dereference_sparse(p, space); \\\n" "> > smp_read_barrier_depends(); \\\n" "> > ((typeof(*p) __force __kernel *)(_________p1)); \\\n" @@ -89,7 +92,7 @@ "> > #define __rcu_dereference_protected(p, c, space) \\\n" "> > ({ \\\n" "> > rcu_lockdep_assert(c); \\\n" - "> > - (void) (((typeof (*p) space *)p) = p); \\\n" + "> > - (void) (((typeof (*p) space *)p) == p); \\\n" "> > + rcu_dereference_sparse(p, space); \\\n" "> > ((typeof(*p) __force __kernel *)(p)); \\\n" "> > })\n" @@ -112,4 +115,4 @@ "\n" "\t\t\t\t\t\t\tThanx, Paul" -5de1166c6828fecd711a179b915934d3ecda051ec97a58a06468d0c534c0ba14 +374ce2946bebdffb28ef1c44f96c7076a38aa0a7880b3933822d7e64ce2677cc
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.