Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752603AbbEHOHm (ORCPT ); Fri, 8 May 2015 10:07:42 -0400 Received: from mail-oi0-f50.google.com ([209.85.218.50]:34951 "EHLO mail-oi0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751332AbbEHOHj (ORCPT ); Fri, 8 May 2015 10:07:39 -0400 MIME-Version: 1.0 In-Reply-To: References: <1429742451-11465-1-git-send-email-mathieu.poirier@linaro.org> <1429742451-11465-2-git-send-email-mathieu.poirier@linaro.org> Date: Fri, 8 May 2015 08:07:39 -0600 Message-ID: Subject: Re: [PATCH 01/11] coresight-etm4x: Adding CoreSight ETM4x driver From: Mathieu Poirier To: Linus Walleij Cc: Greg KH , "linux-arm-kernel@lists.infradead.org" , "linux-api@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Kaixu Xia , Chunyan Zhang Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1549 Lines: 43 On 28 April 2015 at 06:28, Linus Walleij wrote: > On Thu, Apr 23, 2015 at 12:40 AM, Mathieu Poirier > wrote: > >> From: Pratik Patel >> >> This driver manages the CoreSight ETMv4 (Embedded Trace Macrocell) IP block >> to support HW assisted tracing on ARMv7 and ARMv8 architectures. >> >> Signed-off-by: Pratik Patel >> Signed-off-by: Kaixu Xia >> Signed-off-by: Mathieu Poirier > > (...) >> +/* The number of ETMv4 currently registered */ >> +static int etm4_count; >> +static struct etmv4_drvdata *etmdrvdata[NR_CPUS]; > > Don't you need a mutex or something around etm4_count so > as to protect it? You could also make it an atomic. Sorry for the late reply, your email got lost under the pile. The etm4_count is only used at boot time to avoid registering the notifiers twice and not used otherwise. Since the discovery of coresight devices is sequential there is no point in guarding it. > > Also why is it a signed int ... unsigned int? > > I know, lame comments, the runtime PM stuff looks perfect now, I like it too - thanks for the review. > someone had a refcount comment but it's doing the right thing. > > Yours, > Linus Walleij -- 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/