linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: rcu: Make rcu_assign_pointer's assignment volatile and type-safe
@ 2013-09-01 23:50 Wang Shilong
  2013-09-02  0:06 ` Josh Triplett
  0 siblings, 1 reply; 2+ messages in thread
From: Wang Shilong @ 2013-09-01 23:50 UTC (permalink / raw)
  To: Josh Triplett
  Cc: linux-kernel, sparse, linux-sparse, Wang Shilong,
	Stephen Hemminger, lttng-dev, Mathieu Desnoyers, Paul E. McKenney

Hello, Using checkpatch.pl, i get the following warnings(errors):
WARNING: line over 80 characters
#57: FILE: include/linux/rcupdate.h:518:
+		extern void __rcu_assign_pointer_typecheck(int, typeof(*(v)) __kernel *); \

ERROR: need consistent spacing around '*' (ctx:WxB)
#72: FILE: include/linux/rcupdate.h:568:
+		ACCESS_ONCE(p) = (typeof(*(v)) __force space *)(v); \
 		                                             ^

total: 1 errors, 1 warnings, 26 lines checked

patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Thanks, Wang

Notice: this is an automatically generated by shell script
Any problems please contact: wangshilong1991@gmail.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: rcu: Make rcu_assign_pointer's assignment volatile and type-safe
  2013-09-01 23:50 rcu: Make rcu_assign_pointer's assignment volatile and type-safe Wang Shilong
@ 2013-09-02  0:06 ` Josh Triplett
  0 siblings, 0 replies; 2+ messages in thread
From: Josh Triplett @ 2013-09-02  0:06 UTC (permalink / raw)
  To: Wang Shilong
  Cc: linux-kernel, linux-sparse, sparse, lttng-dev, Stephen Hemminger,
	Paul E. McKenney, Mathieu Desnoyers, Andy Whitcroft, Joe Perches

On Mon, Sep 02, 2013 at 07:50:09AM +0800, Wang Shilong wrote:
> Hello, Using checkpatch.pl, i get the following warnings(errors):
> WARNING: line over 80 characters
> #57: FILE: include/linux/rcupdate.h:518:
> +		extern void __rcu_assign_pointer_typecheck(int, typeof(*(v)) __kernel *); \

It'd get much uglier if wrapped, and the function name needs to stay
unique to avoid conflicts with the macro context.  I don't plan to
change this.

> ERROR: need consistent spacing around '*' (ctx:WxB)
> #72: FILE: include/linux/rcupdate.h:568:
> +		ACCESS_ONCE(p) = (typeof(*(v)) __force space *)(v); \

False positive; checkpatch.pl seems to parse this as multiplication
rather than a cast.

- Josh Triplett

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-09-02  0:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-01 23:50 rcu: Make rcu_assign_pointer's assignment volatile and type-safe Wang Shilong
2013-09-02  0:06 ` Josh Triplett

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).