Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753862AbbFLHiO (ORCPT ); Fri, 12 Jun 2015 03:38:14 -0400 Received: from lb2-smtp-cloud2.xs4all.net ([194.109.24.25]:46478 "EHLO lb2-smtp-cloud2.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750931AbbFLHiL (ORCPT ); Fri, 12 Jun 2015 03:38:11 -0400 Message-ID: <1434094677.2271.125.camel@x220> Subject: Re: [alsa-devel] [PATCH 1/3] ASoC: mediatek: Add AFE platform driver From: Paul Bolle To: Koro Chen Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, srv_heupstream@mediatek.com, tiwai@suse.de, linux-kernel@vger.kernel.org, s.hauer@pengutronix.de, lgirdwood@gmail.com, robh+dt@kernel.org, broonie@kernel.org, linux-mediatek@lists.infradead.org, galak@codeaurora.org, matthias.bgg@gmail.com, linux-arm-kernel@lists.infradead.org Date: Fri, 12 Jun 2015 09:37:57 +0200 In-Reply-To: <1434074158.10969.5.camel@mtksdaap41> References: <1433946276-25969-1-git-send-email-koro.chen@mediatek.com> <1433946276-25969-2-git-send-email-koro.chen@mediatek.com> <1434006187.24094.40.camel@x220> <1434074158.10969.5.camel@mtksdaap41> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4 (3.10.4-4.fc20) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1058 Lines: 29 On Fri, 2015-06-12 at 09:55 +0800, Koro Chen wrote: > On Thu, 2015-06-11 at 09:03 +0200, Paul Bolle wrote: > > (What does negating a bool twice do?) > > > Because bool actually can be unsigned char, although actually in this > driver, the caller always passes "true" or "false" to this function. bool is _Bool in the kernel (see include/linux/types.h). So whenever you see a bool in the kernel you can assume it's either 0 or 1. Are there any cases where this conveniently simple rule doesn't hold? But here the discussion is moot, because as you say, the function will only be passed false or true so we know "enable" is either 0 or 1 and double negating will do nothing. > Do you think if this is the case, should I still need to do !!? So you should not, as it's confusing at best. Thanks, Paul Bolle -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/