From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759498AbcBYCCl (ORCPT ); Wed, 24 Feb 2016 21:02:41 -0500 Received: from LGEAMRELO12.lge.com ([156.147.23.52]:34159 "EHLO lgeamrelo12.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759219AbcBYCCj convert rfc822-to-8bit (ORCPT ); Wed, 24 Feb 2016 21:02:39 -0500 X-Original-SENDERIP: 156.147.1.125 X-Original-MAILFROM: namhyung@kernel.org X-Original-SENDERIP: 165.244.98.150 X-Original-MAILFROM: namhyung@kernel.org X-Original-SENDERIP: 10.177.227.17 X-Original-MAILFROM: namhyung@kernel.org Date: Thu, 25 Feb 2016 11:02:27 +0900 From: Namhyung Kim To: Arnaldo Carvalho de Melo CC: Ingo Molnar , Peter Zijlstra , Jiri Olsa , LKML , David Ahern , Andi Kleen , Stephane Eranian , Wang Nan Subject: Re: [PATCH v7 05/18] perf hists: Introduce hist_entry__filter() Message-ID: <20160225020227.GA18880@sejong> References: <1456326830-30456-1-git-send-email-namhyung@kernel.org> <1456326830-30456-6-git-send-email-namhyung@kernel.org> <20160224232251.GE8720@kernel.org> MIME-Version: 1.0 In-Reply-To: <20160224232251.GE8720@kernel.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-MIMETrack: Itemize by SMTP Server on LGEKRMHUB04/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2016/02/25 11:02:32, Serialize by Router on LGEKRMHUB04/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2016/02/25 11:02:32 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arnaldo, On Wed, Feb 24, 2016 at 08:22:51PM -0300, Arnaldo Carvalho de Melo wrote: > Em Thu, Feb 25, 2016 at 12:13:37AM +0900, Namhyung Kim escreveu: > > +static int hist_entry__socket_filter(struct hist_entry *he, int type, const void *arg) > > +{ > > + int socket = *(const int *)arg; > > + > > + if (type != HIST_FILTER__SOCKET) > > + return -1; > > + > > + return socket >= 0 && he->socket != socket; > > 'socket' is a function in sys/socket.h, and in older systems this file, > tools/perf/util/sort.c, ends up including that header, causing: > > CC /tmp/build/perf/util/sort.o > cc1: warnings being treated as errors > util/sort.c: In function ‘hist_entry__socket_filter’: > util/sort.c:479: error: declaration of ‘socket’ shadows a global > declaration > /usr/include/sys/socket.h:105: error: shadowed declaration is here > > I fixed it renaming it to 'sk'. Oh, thank you for fixing this! Thanks, Namhyung