Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1949101imm; Sat, 4 Aug 2018 14:56:33 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcu37jiwwZfNTs95BiBCOdGN1ZtOt7UJW/+RyqY8vbTe5LRce7Y1HwBAj3O+B+Kuyme9/Kl X-Received: by 2002:a62:9992:: with SMTP id t18-v6mr10546407pfk.239.1533419793855; Sat, 04 Aug 2018 14:56:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533419793; cv=none; d=google.com; s=arc-20160816; b=hWGuDAyX5f53bbMMJJSRPXOA90T/OF9E74VoO1LZmUtTMHbMdfA8o3mVJrnI7v07/o Axv45f3V/wSMs0mPidg8mhsocN0ZNnSXO/qZEZGWT31RYC/Evkd/2pX7hCZAZx14e5Gl tkaxfA5YrShxdHWPP7vNl29hR5uWU5/VDEf7GFCW5rx/aD4eQd6sv7nOIjKXI67kZoC6 VXX8BjhOkxCNd9y4iViq/PWaSYoBFvNxvN8z/ldB/6nesy87ua+gqnkBvGpDqp+LyGxC /C/brwDoMG650qnzaq0Z7NlYt5lEzQnHXe4JJ1Xx2kQBR5LrJjiWWH66ylcUpMLXhhHS WrFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=QL3Sm8RxuJs+KWMJNx2nQAs18tn5RtgUbd4D+yw6wGI=; b=U3YOH4uDZuLGK0ZNzNF6WXCupE9Ht7tD5h3DeT8SCwYIODUMCrev1tU8GXHMyduZ/S JF8uuC7++ibnOSQZQX5Sb/z1ocUQI81pWzGGgTXAXQntJwTwH8VUPdZI3ixWtqH05wHK LNFy6AjR8eMlALg3P0sdOEw6nu/K5y9DGPEIEmIsgnoH54/MMbTERhmo2Nnn1VXwT+nO J2b+mzOctRh/9Qu0n6R+rMoam5HOhrcExnOBHD61LgIBcaXByw23CKj3vZt1Y6FDqKEE BLxLG56ojqwgtSfzz6BbNMC4b5NzEYXJuNR+u9kHa3wzm305z8AZNY/QqQ5VgcWf7/RN gL8w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r73-v6si9125080pfk.83.2018.08.04.14.56.19; Sat, 04 Aug 2018 14:56:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729710AbeHDX5C (ORCPT + 99 others); Sat, 4 Aug 2018 19:57:02 -0400 Received: from gateway31.websitewelcome.com ([192.185.143.39]:20596 "EHLO gateway31.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728882AbeHDX5B (ORCPT ); Sat, 4 Aug 2018 19:57:01 -0400 Received: from cm17.websitewelcome.com (cm17.websitewelcome.com [100.42.49.20]) by gateway31.websitewelcome.com (Postfix) with ESMTP id 7BAA6888B8 for ; Sat, 4 Aug 2018 16:54:55 -0500 (CDT) Received: from gator4166.hostgator.com ([108.167.133.22]) by cmsmtp with SMTP id m4VjfUaJKPvAdm4VjfWTKm; Sat, 04 Aug 2018 16:54:55 -0500 X-Authority-Reason: nr=8 Received: from [189.250.50.82] (port=33810 helo=embeddedor) by gator4166.hostgator.com with esmtpa (Exim 4.91) (envelope-from ) id 1fm4Vi-002mQQ-QN; Sat, 04 Aug 2018 16:54:54 -0500 Date: Sat, 4 Aug 2018 16:54:54 -0500 From: "Gustavo A. R. Silva" To: alsa-devel@alsa-project.org, Takashi Iwai , Jaroslav Kysela , Liam Girdwood , Mark Brown , "Gustavo A. R. Silva" , linux-kernel@vger.kernel.org Cc: patches@opensource.cirrus.com Subject: [PATCH 10/12] ASoC: wm5100-tables: use true and false for boolean values Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4166.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - embeddedor.com X-BWhitelist: no X-Source-IP: 189.250.50.82 X-Source-L: No X-Exim-ID: 1fm4Vi-002mQQ-QN X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (embeddedor) [189.250.50.82]:33810 X-Source-Auth: gustavo@embeddedor.com X-Email-Count: 80 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= X-Local-Domain: yes Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return statements in functions returning bool should use true or false instead of an integer value. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- sound/soc/codecs/wm5100-tables.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/wm5100-tables.c b/sound/soc/codecs/wm5100-tables.c index e239f4b..9e987cf 100644 --- a/sound/soc/codecs/wm5100-tables.c +++ b/sound/soc/codecs/wm5100-tables.c @@ -30,7 +30,7 @@ bool wm5100_volatile_register(struct device *dev, unsigned int reg) case WM5100_OUTPUT_STATUS_2: case WM5100_INPUT_ENABLES_STATUS: case WM5100_MIC_DETECT_3: - return 1; + return true; default: if ((reg >= WM5100_DSP1_PM_0 && reg <= WM5100_DSP1_PM_1535) || (reg >= WM5100_DSP1_ZM_0 && reg <= WM5100_DSP1_ZM_2047) || @@ -41,9 +41,9 @@ bool wm5100_volatile_register(struct device *dev, unsigned int reg) (reg >= WM5100_DSP3_PM_0 && reg <= WM5100_DSP3_PM_1535) || (reg >= WM5100_DSP3_ZM_0 && reg <= WM5100_DSP3_ZM_2047) || (reg >= WM5100_DSP3_DM_0 && reg <= WM5100_DSP3_DM_511)) - return 1; + return true; else - return 0; + return false; } } @@ -798,7 +798,7 @@ bool wm5100_readable_register(struct device *dev, unsigned int reg) case WM5100_DSP3_CONTROL_28: case WM5100_DSP3_CONTROL_29: case WM5100_DSP3_CONTROL_30: - return 1; + return true; default: if ((reg >= WM5100_DSP1_PM_0 && reg <= WM5100_DSP1_PM_1535) || (reg >= WM5100_DSP1_ZM_0 && reg <= WM5100_DSP1_ZM_2047) || @@ -809,9 +809,9 @@ bool wm5100_readable_register(struct device *dev, unsigned int reg) (reg >= WM5100_DSP3_PM_0 && reg <= WM5100_DSP3_PM_1535) || (reg >= WM5100_DSP3_ZM_0 && reg <= WM5100_DSP3_ZM_2047) || (reg >= WM5100_DSP3_DM_0 && reg <= WM5100_DSP3_DM_511)) - return 1; + return true; else - return 0; + return false; } } -- 2.7.4