From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751285AbdH1Jdq (ORCPT ); Mon, 28 Aug 2017 05:33:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51828 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751170AbdH1Jdo (ORCPT ); Mon, 28 Aug 2017 05:33:44 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A09C1267C4 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=jolsa@redhat.com Date: Mon, 28 Aug 2017 11:33:41 +0200 From: Jiri Olsa To: David Carrillo-Cisneros Cc: linux-kernel@vger.kernel.org, Arnaldo Carvalho de Melo , Alexander Shishkin , Stephane Eranian , Paul Turner Subject: Re: [PATCH 5/6] perf tools: Remove BUG_ON char[] to bool implicit conversions Message-ID: <20170828093341.GA15692@krava> References: <20170827075442.108534-1-davidcc@google.com> <20170827075442.108534-6-davidcc@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170827075442.108534-6-davidcc@google.com> User-Agent: Mutt/1.8.3 (2017-05-23) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 28 Aug 2017 09:33:44 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Aug 27, 2017 at 12:54:41AM -0700, David Carrillo-Cisneros wrote: > When compiling with LLVM, errors like this are shown: > > builtin-lock.c:46:10: error: implicit conversion turns string literal into bool: 'const char [39]' to 'bool' > > Due to error message implicit conversion into bool. Fix it by defining a > BUG macro without a boolean argument and use it instead. > > Signed-off-by: David Carrillo-Cisneros > --- > tools/include/linux/kernel.h | 2 ++ > tools/perf/builtin-lock.c | 15 ++++++++++----- > 2 files changed, 12 insertions(+), 5 deletions(-) > > diff --git a/tools/include/linux/kernel.h b/tools/include/linux/kernel.h > index 77d2e94ca5df..0951c96205c4 100644 > --- a/tools/include/linux/kernel.h > +++ b/tools/include/linux/kernel.h > @@ -70,6 +70,8 @@ > #endif > #endif > > +#define BUG() abort() we have some of those in tools/include/asm/bug.h some might suit you, I think we wanted to omit BUG calls completely jirka