From: Boqun Feng Subject: [RFC 0/3] sparse: Introduce __private to privatize members of structs Date: Sat, 12 Dec 2015 10:55:59 +0800 Message-ID: <1449888962-29348-1-git-send-email-boqun.feng@gmail.com> Return-path: Sender: linux-kernel-owner@vger.kernel.org To: linux-sparse@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Christopher Li , "Paul E . McKenney" , Josh Triplett , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , Andy Whitcroft , Joe Perches , Thomas Gleixner , Jiang Liu , Marc Zyngier , Mika Westerberg , Russell King , Brian Norris , Peter Zijlstra , Boqun Feng List-Id: linux-sparse@vger.kernel.org Hi all, As I proposed: http://marc.info/?l=linux-arm-kernel&m=144944469805753 , we can define 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 serves as a POC and 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 5f343fc7f0ce7edfe344e7cc5afdfe145a18f802 because this depends on commits: "rcu: Create transitive rnp->lock acquisition functions" and "rcu: Add transitivity to remaining rcu_node ->lock acquisitions I tried to use 0day to test this, but seems the email transfer from 0day to my mail box is very slow recently, so I haven't received a recent result yet. But as one can see, this patchset doesn't have any functional modification, the 0day may not find anything interesting ;-) Looking forward to any suggestion, question and comment ;-) Regards, Boqun