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: 9387787 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 2419860762 for ; Fri, 21 Oct 2016 01:09:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 266C329A48 for ; Fri, 21 Oct 2016 01:09:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1AED129ACB; Fri, 21 Oct 2016 01:09:34 +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 C4ADA29AAC for ; Fri, 21 Oct 2016 01:09:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753802AbcJUBJb (ORCPT ); Thu, 20 Oct 2016 21:09:31 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:32940 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751226AbcJUBJ3 (ORCPT ); Thu, 20 Oct 2016 21:09:29 -0400 Received: by mail-pf0-f193.google.com with SMTP id i85so6969346pfa.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=j9AjvDzU21dK6JlsTWIUeCboNhTwf/UogE8P9zG9/aJlgjFKHXQTvuOOlhxsbJxKwK 0qN9KkfIvEC5hflxvUp1RUzx9uH8NO1cWYlSqjoHf5Z/pInKlFl49j7xZ6gZAbWVbeT5 csuvhBaxXr2/5mWNawZbHcGXYxF8dobeAGek0gtGPknODL8ZXTQu/Y69rqdHvSpSSMsV zU2OVacMfpXUuQJRBeOV4P2AZPK0QnAfWyO8nrIkmcenFo5U2t30DMlHb+kmxMcujaFD CKk93tG9lYdJjUeo68OCVeXOOzMtxP2G9lGsRFLG8RsQuTRlsLxmi890xGNe6RgAgd1e AwsQ== X-Gm-Message-State: AA6/9RnZ5wiXK/5owRAZihQIUolYrdrZR7cnWdEs8ADebs22SBGQqcZi+vsLXr0IKsFsNQ== 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-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@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)