From patchwork Fri Oct 21 01:09:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 9387785 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 83CE960762 for ; Fri, 21 Oct 2016 01:09:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 84AC929A48 for ; Fri, 21 Oct 2016 01:09:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 76FED29BD4; Fri, 21 Oct 2016 01:09:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A11DE29A48 for ; Fri, 21 Oct 2016 01:09:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753012AbcJUBJa (ORCPT ); Thu, 20 Oct 2016 21:09:30 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:32940 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752876AbcJUBJ3 (ORCPT ); Thu, 20 Oct 2016 21:09:29 -0400 Received: by mail-pf0-f194.google.com with SMTP id i85so6969345pfa.0 for ; Thu, 20 Oct 2016 18:09:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ingics-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=fLYSSW8m02sPGkRjikpJaboux2pZB1l3Ua18ThrIkA0=; b=LEXghGrBzItgetKaePjhrwGDhlz9AfkeuNHyCkcc3K+v7eRRudYFfKf/ETjARDdWUz XWNUQLt4sPkjlA+DFlYK5uoniDYNNiEKDZ3AO0rHDIMgUwbvSfVBzPsTMTqP64BcVhWt lnINy5pbH5Bv0K5LYUTOmL/jXpYIJsC9gNSE4o5sYXZ2+PTox/pg0FVexZHe1iKGzGVx Z5ktr0Cic0bQTTeyPEiUgw2guIUJ77wNLDiDI8Ewn38ZIWaMqwvzgwYsu3qMpIaIL53h Oac7xdN4JtB3v48WuPeBGLz4fxWoLgFzRSigDPqFqdIX/ntmtweWrpvlJ3S6796Ij9aL LoYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=fLYSSW8m02sPGkRjikpJaboux2pZB1l3Ua18ThrIkA0=; b=MkpdnpCVgWnbXPtRTFzXuWhIBmGJ+Vc5tf7Y6+/GsfHDi6dni9BBYqyNX9QZ4n/8MD qYoYgTQ0OAw73NjJAnTweZIp9Qr8K5phu6uR6hOi4NENKWY0nXdeR5fOUoKtnXz4lhec keQ6I5vG4mrEzqCcmE7Re5e3lpf+MqseiJmPywNrlBDUCyc9gXmyLKpu+oc/RBj+cuzE ATafOKzkSobooSGYGmR08j9C4iXVoJvDwEAxw3T8tVPcoya4UT93c7qj9S6YyV+od51v yrr4zA9+uUeohqcHvlXQIw7Z5S5e9ofl8Zodq/iXHm7V3+E/CLSZNkglYFj98hkcFl59 VeiQ== X-Gm-Message-State: AA6/9RnuAQEFcnGdR8UBaPG4IC4yvuRoOSEWp6fISZcqcimeT1OqLZQ9IotwuU8bUM5dqg== X-Received: by 10.98.84.131 with SMTP id i125mr6402366pfb.96.1477012168313; Thu, 20 Oct 2016 18:09:28 -0700 (PDT) Received: from localhost.localdomain (36-239-239-80.dynamic-ip.hinet.net. [36.239.239.80]) by smtp.gmail.com with ESMTPSA id l85sm63707pfk.55.2016.10.20.18.09.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 20 Oct 2016 18:09:27 -0700 (PDT) From: Axel Lin To: "Rafael J . Wysocki" Cc: Chanwoo Choi , MyungJoo Ham , Kyungmin Park , linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org, Axel Lin Subject: [RESEND][PATCH 1/2] PM / devfreq: exynos-ppmu: ppmu_events array should not be NULL terminated Date: Fri, 21 Oct 2016 09:09:08 +0800 Message-Id: <1477012149-9928-1-git-send-email-axel.lin@ingics.com> X-Mailer: git-send-email 2.7.4 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The rest of the code uses ARRAY_SIZE to count the number of entries in ppmu_events array. The NULL terminated entry makes ARRAY_SIZE return off-by-one value. Signed-off-by: Axel Lin Acked-by: Chanwoo Choi Acked-by: MyungJoo Ham Acked-by: MyungJoo Ham --- This patch was sent on https://patchwork.kernel.org/patch/9342637/ drivers/devfreq/event/exynos-ppmu.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/devfreq/event/exynos-ppmu.c b/drivers/devfreq/event/exynos-ppmu.c index f55cf0e..c9ffaf0 100644 --- a/drivers/devfreq/event/exynos-ppmu.c +++ b/drivers/devfreq/event/exynos-ppmu.c @@ -90,8 +90,6 @@ struct __exynos_ppmu_events { PPMU_EVENT(d1-cpu), PPMU_EVENT(d1-general), PPMU_EVENT(d1-rt), - - { /* sentinel */ }, }; static int exynos_ppmu_find_ppmu_id(struct devfreq_event_dev *edev)