Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752088Ab0DDH4T (ORCPT ); Sun, 4 Apr 2010 03:56:19 -0400 Received: from ns.dcl.info.waseda.ac.jp ([133.9.216.194]:55234 "EHLO ns.dcl.info.waseda.ac.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751621Ab0DDH4P (ORCPT ); Sun, 4 Apr 2010 03:56:15 -0400 Message-ID: <4BB8461B.3060502@dcl.info.waseda.ac.jp> Date: Sun, 04 Apr 2010 16:56:11 +0900 From: Hitoshi Mitake User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091211 Shredder/3.0 MIME-Version: 1.0 To: Peter Zijlstra CC: Frederic Weisbecker , Ingo Molnar , Jason Baron , Steven Rostedt , Mathieu Desnoyers , linux-kernel@vger.kernel.org, h.mitake@gmail.com, Paul Mackerras , Arnaldo Carvalho de Melo , Jens Axboe Subject: Re: [PATCH RFC 00/11] lock monitor: Separate features related to lock References: <1268563128-6486-1-git-send-email-mitake@dcl.info.waseda.ac.jp> <1268590435.9440.8.camel@laptop> <20100317013236.GB5258@nowhere> <20100317095230.GD17146@elte.hu> <4BA1C141.8050409@dcl.info.waseda.ac.jp> <20100318211633.GG5103@nowhere> <4BA4638C.40307@dcl.info.waseda.ac.jp> <4BA4860C.3050001@dcl.info.waseda.ac.jp> <1269358360.5109.88.camel@twins> In-Reply-To: <1269358360.5109.88.camel@twins> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1003 Lines: 32 On 03/24/10 00:32, Peter Zijlstra wrote: > On Sat, 2010-03-20 at 17:23 +0900, Hitoshi Mitake wrote: >> In lockdep, held_locks of task_struct are accessed this arithmetical way >> prev = curr->held_locks + i; >> Of course this is valid way, but I feel it is more simple and natural way >> prev = curr->held_locks[i]; >> > > The latter is a type mis-match, an equivalent expression would be: > &curr->held_locks[i]; > Yeah, sorry. And is there reason that the statement is not &curr->held_locks[i]; but prev = curr->held_locks + i; ? Of course, curr->held_locks + i style statement causes no problem. But I had a little interest in the selection of style. Do you know the reason? Thanks, Hitoshi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/