All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <20100914003351.GA8300@linux.vnet.ibm.com>

diff --git a/a/1.txt b/N1/1.txt
index cc5c684..9074a46 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -8,7 +8,7 @@ On Thu, Sep 09, 2010 at 08:46:03PM -0700, Paul E. McKenney wrote:
 > > > > >                 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); \
 > > > > >                                       ^     ^
 > > > > >                 smp_read_barrier_depends(); \
 > > > > >                 ((typeof(*p) __force __kernel *)(_________p1)); \
@@ -30,7 +30,7 @@ On Thu, Sep 09, 2010 at 08:46:03PM -0700, Paul E. McKenney wrote:
 > Hmmm...  One approach would be have a secondary macro that was:
 > 
 > 	#define __rcu_dereference_check_sparse(p, space) \
-> 		(void) (((typeof (*p) space *)p) = p);
+> 		(void) (((typeof (*p) space *)p) == p);
 > 
 > when running sparse and:
 > 
@@ -82,7 +82,10 @@ index f3bdff8..1c4984d 100644
  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  diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
+ CFLAGS_MODULE   =
+ AFLAGS_MODULE   =
+ LDFLAGS_MODULE  =
+diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
 index 682bf4c..9fda1e6 100644
 --- a/include/linux/rcupdate.h
 +++ b/include/linux/rcupdate.h
@@ -93,7 +96,7 @@ index 682bf4c..9fda1e6 100644
 +
 +#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 */
@@ -101,7 +104,7 @@ index 682bf4c..9fda1e6 100644
  #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)); \
  	})
@@ -109,7 +112,7 @@ index 682bf4c..9fda1e6 100644
  	({ \
  		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)); \
@@ -117,7 +120,7 @@ index 682bf4c..9fda1e6 100644
  #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)); \
  	})
@@ -160,7 +163,7 @@ index 439ddab..adb09cb 100644
  		udelay(rcu_random(&rand) & 0x3ff);
 -		old_rp = rcu_torture_current;
 +		old_rp = rcu_dereference_check(rcu_torture_current,
-+					       current = writer_task);
++					       current == writer_task);
  		rp->rtort_mbtest = 1;
  		rcu_assign_pointer(rcu_torture_current, rp);
  		smp_wmb(); /* Mods to old_rp must follow rcu_assign_pointer() */
diff --git a/a/content_digest b/N1/content_digest
index bb53db4..e7d0690 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -5,7 +5,7 @@
  "ref\020100910034603.GA2612@linux.vnet.ibm.com\0"
  "From\0Paul E. McKenney <paulmck@linux.vnet.ibm.com>\0"
  "Subject\0Re: [PATCH] md: do not use ++ in rcu_dereference() argument\0"
- "Date\0Tue, 14 Sep 2010 00:33:51 +0000\0"
+ "Date\0Mon, 13 Sep 2010 17:33:51 -0700\0"
  "To\0Arnd Bergmann <arnd@arndb.de>\0"
  "Cc\0Kulikov Vasiliy <segooon@gmail.com>"
   kernel-janitors@vger.kernel.org
@@ -25,7 +25,7 @@
  "> > > > >                 typeof(*p) *_________p1 = (typeof(*p)*__force )ACCESS_ONCE(p); \\\n"
  "> > > > >                                                                    ^\n"
  "> > > > >                 rcu_lockdep_assert(c); \\\n"
- "> > > > >                 (void) (((typeof (*p) space *)p) = p); \\\n"
+ "> > > > >                 (void) (((typeof (*p) space *)p) == p); \\\n"
  "> > > > >                                       ^     ^\n"
  "> > > > >                 smp_read_barrier_depends(); \\\n"
  "> > > > >                 ((typeof(*p) __force __kernel *)(_________p1)); \\\n"
@@ -47,7 +47,7 @@
  "> Hmmm...  One approach would be have a secondary macro that was:\n"
  "> \n"
  "> \t#define __rcu_dereference_check_sparse(p, space) \\\n"
- "> \t\t(void) (((typeof (*p) space *)p) = p);\n"
+ "> \t\t(void) (((typeof (*p) space *)p) == p);\n"
  "> \n"
  "> when running sparse and:\n"
  "> \n"
@@ -99,7 +99,10 @@
  " CHECKFLAGS     := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \\\n"
  "-\t\t  -Wbitwise -Wno-return-void $(CF)\n"
  "+\t\t  -Wbitwise -Wno-return-void -DKBUILD_CHECKSRC $(CF)\n"
- " CFLAGS_MODULE    AFLAGS_MODULE    LDFLAGS_MODULE  diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h\n"
+ " CFLAGS_MODULE   =\n"
+ " AFLAGS_MODULE   =\n"
+ " LDFLAGS_MODULE  =\n"
+ "diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h\n"
  "index 682bf4c..9fda1e6 100644\n"
  "--- a/include/linux/rcupdate.h\n"
  "+++ b/include/linux/rcupdate.h\n"
@@ -110,7 +113,7 @@
  "+\n"
  "+#ifdef KBUILD_CHECKSRC\n"
  "+#define rcu_dereference_sparse(p, space) \\\n"
- "+\t((void)(((typeof(*p) space *)p) = p))\n"
+ "+\t((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"
@@ -118,7 +121,7 @@
  " #define __rcu_access_pointer(p, space) \\\n"
  " \t({ \\\n"
  " \t\ttypeof(*p) *_________p1 = (typeof(*p)*__force )ACCESS_ONCE(p); \\\n"
- "-\t\t(void) (((typeof (*p) space *)p) = p); \\\n"
+ "-\t\t(void) (((typeof (*p) space *)p) == p); \\\n"
  "+\t\trcu_dereference_sparse(p, space); \\\n"
  " \t\t((typeof(*p) __force __kernel *)(_________p1)); \\\n"
  " \t})\n"
@@ -126,7 +129,7 @@
  " \t({ \\\n"
  " \t\ttypeof(*p) *_________p1 = (typeof(*p)*__force )ACCESS_ONCE(p); \\\n"
  " \t\trcu_lockdep_assert(c); \\\n"
- "-\t\t(void) (((typeof (*p) space *)p) = p); \\\n"
+ "-\t\t(void) (((typeof (*p) space *)p) == p); \\\n"
  "+\t\trcu_dereference_sparse(p, space); \\\n"
  " \t\tsmp_read_barrier_depends(); \\\n"
  " \t\t((typeof(*p) __force __kernel *)(_________p1)); \\\n"
@@ -134,7 +137,7 @@
  " #define __rcu_dereference_protected(p, c, space) \\\n"
  " \t({ \\\n"
  " \t\trcu_lockdep_assert(c); \\\n"
- "-\t\t(void) (((typeof (*p) space *)p) = p); \\\n"
+ "-\t\t(void) (((typeof (*p) space *)p) == p); \\\n"
  "+\t\trcu_dereference_sparse(p, space); \\\n"
  " \t\t((typeof(*p) __force __kernel *)(p)); \\\n"
  " \t})\n"
@@ -177,9 +180,9 @@
  " \t\tudelay(rcu_random(&rand) & 0x3ff);\n"
  "-\t\told_rp = rcu_torture_current;\n"
  "+\t\told_rp = rcu_dereference_check(rcu_torture_current,\n"
- "+\t\t\t\t\t       current = writer_task);\n"
+ "+\t\t\t\t\t       current == writer_task);\n"
  " \t\trp->rtort_mbtest = 1;\n"
  " \t\trcu_assign_pointer(rcu_torture_current, rp);\n"
  " \t\tsmp_wmb(); /* Mods to old_rp must follow rcu_assign_pointer() */"
 
-8fbacc1dc11b5be8dbae7861a3f8868486f45f6dbd2a0592888fca4e3db959ba
+21bd9a54ccb7426b4ece6c9dea1f8f0468516eb54fac5869c36e8d9bbb0e4174

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.