From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763387AbdAKKcp (ORCPT ); Wed, 11 Jan 2017 05:32:45 -0500 Received: from mail.skyhub.de ([78.46.96.112]:49741 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758285AbdAKKco (ORCPT ); Wed, 11 Jan 2017 05:32:44 -0500 Date: Wed, 11 Jan 2017 11:32:38 +0100 From: Borislav Petkov To: Suravee Suthikulpanit Cc: linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, joro@8bytes.org, peterz@infradead.org, mingo@redhat.com Subject: Re: [PATCH v7 1/7] perf/amd/iommu: Misc fix up perf_iommu_read Message-ID: <20170111103238.zhs5e7mkahmp73qn@pd.tnic> References: <1484019227-11473-1-git-send-email-Suravee.Suthikulpanit@amd.com> <1484019227-11473-2-git-send-email-Suravee.Suthikulpanit@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1484019227-11473-2-git-send-email-Suravee.Suthikulpanit@amd.com> User-Agent: NeoMutt/20161014 (1.7.1) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 09, 2017 at 09:33:41PM -0600, Suravee Suthikulpanit wrote: > This patch contains the following minor fixup: For the future: never say "this patch" in the commit message - just explain *why* the patch is needed. > * Fixed overflow handling since u64 delta would lose the MSB sign bit. Past tense also reads funnily: "Fix overflow handling ..." sounds much better. > * Remove unnecessary local64_set(). But you don't remove it - you add it. Huh? > * Coding style and make use of GENMASK_ULL macro. > > Cc: Peter Zijlstra > Cc: Borislav Petkov > Signed-off-by: Suravee Suthikulpanit > --- > arch/x86/events/amd/iommu.c | 25 +++++++++++++------------ > 1 file changed, 13 insertions(+), 12 deletions(-) > > diff --git a/arch/x86/events/amd/iommu.c b/arch/x86/events/amd/iommu.c > index b28200d..f387baf 100644 > --- a/arch/x86/events/amd/iommu.c > +++ b/arch/x86/events/amd/iommu.c > @@ -319,29 +319,30 @@ static void perf_iommu_start(struct perf_event *event, int flags) > > static void perf_iommu_read(struct perf_event *event) > { > - u64 count = 0ULL; > - u64 prev_raw_count = 0ULL; > - u64 delta = 0ULL; > + u64 cnt, prev; "count" was fine. > + s64 delta; > struct hw_perf_event *hwc = &event->hw; > pr_debug("perf: amd_iommu:perf_iommu_read\n"); ... -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.