Skip to content

RFC sparse: Introduce __private to privatize members of structs

Boqun Feng linux-sparse lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 RFC Latest3 patches 2 repliesIn review
  2. v1 RFC3 patches 5 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3sparse: Add __private to privatize members of structsinclude/linux/compiler.h scripts/checkpatch.pl+10 -50 replies
2/3RCU: Privatize rcu_node::lockkernel/rcu/tree.c kernel/rcu/tree.h kernel/rcu/tree_plugin.h+96 -750 replies
3/3irq: Privatize irq_common_data::state_use_accessorsinclude/linux/irq.h kernel/irq/internals.h+8 -21 reply

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchThomas Gleixner
1/3
2/3
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [RFC v2 0/3] sparse: Introduce __private to privatize members of structs

Hi all,

This is v2 of __private.

Link for v1: http://marc.info/?l=linux-sparse&m=144988906932520&w=2

Change since v1:

* #undef __irqd_to_state after used (Peter Zijlstra)

This patchset introduces a __private modifier for sparse to detect misuses of private members of structs. This could make maintenace a little easier and prevent some potential bugs.

This patchset consists of three patches:

1. Introduce __private and related macro, also improve compiler.h a litte
bit

2. Privatize rcu_node::lock

3. Privatize irq_common_data::state_use_accessors

This patchset is against

	-rcu/rcu/next	c95a158356397844a5a6deb0bd58758084f891df

because it depends on commits:

	"rcu: Create transitive rnp->lock acquisition functions"
and
	"rcu: Add transitivity to remaining rcu_node ->lock acquisitions

Tested by 0day.

Looking forward to any suggestion, question and comment ;-)

Regards,
Boqun