From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755144AbbLLC4n (ORCPT ); Fri, 11 Dec 2015 21:56:43 -0500 Received: from mail-ob0-f173.google.com ([209.85.214.173]:34328 "EHLO mail-ob0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752495AbbLLC4j (ORCPT ); Fri, 11 Dec 2015 21:56:39 -0500 From: Boqun Feng 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 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> X-Mailer: git-send-email 2.6.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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