Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753433AbcDYCfW (ORCPT ); Sun, 24 Apr 2016 22:35:22 -0400 Received: from mail-oi0-f49.google.com ([209.85.218.49]:33874 "EHLO mail-oi0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753379AbcDYCfR (ORCPT ); Sun, 24 Apr 2016 22:35:17 -0400 From: Florian Fainelli To: linux-kernel@vger.kernel.org Cc: ast@kernel.org, jolsa@kernel.org, acme@redhat.com, wangnan0@huawei.com, Florian Fainelli Subject: [PATCH 2/2] bfp tools: Fix syscall argument Date: Sun, 24 Apr 2016 19:34:54 -0700 Message-Id: <1461551694-5512-3-git-send-email-f.fainelli@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1461551694-5512-1-git-send-email-f.fainelli@gmail.com> References: <1461551694-5512-1-git-send-email-f.fainelli@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 892 Lines: 24 Coverity flagged this under CID 1354884 as a sizeof mismatch, it turns out that the argument "attr" passed to syscall should have been a pointer to attr in the first place. Reported-by: coverity (CID 1354884) Fixes: 8f9e05fb298f ("perf tools: Fix PowerPC native building") Signed-off-by: Florian Fainelli --- tools/build/feature/test-bpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/build/feature/test-bpf.c b/tools/build/feature/test-bpf.c index 8236df9a46ca..e04ab89a1013 100644 --- a/tools/build/feature/test-bpf.c +++ b/tools/build/feature/test-bpf.c @@ -31,5 +31,5 @@ int main(void) * Test existence of __NR_bpf and BPF_PROG_LOAD. * This call should fail if we run the testcase. */ - return syscall(__NR_bpf, BPF_PROG_LOAD, attr, sizeof(attr)); + return syscall(__NR_bpf, BPF_PROG_LOAD, &attr, sizeof(attr)); } -- 2.7.4