Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp49650pxj; Tue, 15 Jun 2021 19:47:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyO1Olaj0fGeeN0OtpPkzUimDfuSi6xL+Nvy66CosWAhCvln1hjk1sBBya5TD64AuERU1TD X-Received: by 2002:a05:6402:27ce:: with SMTP id c14mr1354134ede.118.1623811627246; Tue, 15 Jun 2021 19:47:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623811627; cv=none; d=google.com; s=arc-20160816; b=lRBNC6EWXHIRdmkfCJaipaLuQl5iu3kMigG8Vo7ZhGFtIYR6U5tkfEvEpESXPB0q/K yb5IqdGRD4h3tLyuFPYbLK7F+sqD5UgoHzVOUXLimDURpcxSncSHP3G3Dvxyft6m2mFP eBYsoL9HdLB7XjHOk2CYNF8v2N3rDtD6K+0swcjaci1HRJ6G/onU58pkOaxmd3+dG0ou JtnpxDg+8xZb728TOH69epSVEEKPprsQpNxFhLuaX/GGVDO34DZkZrs5d7C4Kj+VUUA/ MKc494Rh8KM43wAfoJGPgppaVwlwYD2a5+6uj6S5UF0LURauoNU9TFMA3IbMhVjZRmr+ IL9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=nZRqBjWLl2vtCuZ9++SzoRCgNKDIQ4tTr9W79XQ0DX0=; b=MP+ZpSIIZxTnTZVddMOWEaGOawnAXlwy6LZPDz7Bdw3iFEATgJmcSoY7gNoji5rl5V OIZ2ZIawH0WsGcarKS2OwGW3DesIooBRcI+As+FA0aUVKw/nTg39aJCwt9GiDVYIuamj YDLDZvoeM0TJUgwfCVxS1lJYi0QurG+LQtDgYH40sBKsScDp7P4o0UV+JIwb9ZRp5pmT lTlO/tc+n9zPU/B7Pu1LbkfDFIvdfWYcczSFvqSkuRbu8wO13ptcLvq8S1XA3BnNvNx6 3qYkm7RXqhTuPiUcibZTNQYoOOG9FkYIIn4hWSXDLZ+QR9uVoPA1KNhUfFXKUd37yopX 2UZQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cq9si704849edb.321.2021.06.15.19.46.44; Tue, 15 Jun 2021 19:47:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231960AbhFPCrv (ORCPT + 99 others); Tue, 15 Jun 2021 22:47:51 -0400 Received: from out30-133.freemail.mail.aliyun.com ([115.124.30.133]:41646 "EHLO out30-133.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231494AbhFPCrv (ORCPT ); Tue, 15 Jun 2021 22:47:51 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R891e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04426;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0UcZEGKZ_1623811542; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0UcZEGKZ_1623811542) by smtp.aliyun-inc.com(127.0.0.1); Wed, 16 Jun 2021 10:45:44 +0800 From: Yang Li To: lgirdwood@gmail.com Cc: broonie@kernel.org, perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH -next] SoC: codecs: wcd938x: fix boolreturn.cocci warning Date: Wed, 16 Jun 2021 10:45:35 +0800 Message-Id: <1623811535-15841-1-git-send-email-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return statements in functions returning bool should use true/false instead of 1/0. Fix the following coccicheck warning: ./sound/soc/codecs/wcd938x.c:1190:9-10: WARNING: return of 0/1 in function 'wcd938x_volatile_register' with return type bool. Reported-by: Abaci Robot Signed-off-by: Yang Li --- sound/soc/codecs/wcd938x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c index 2cf6145..cfe00536 100644 --- a/sound/soc/codecs/wcd938x.c +++ b/sound/soc/codecs/wcd938x.c @@ -1187,7 +1187,7 @@ static bool wcd938x_writeable_register(struct device *dev, unsigned int reg) static bool wcd938x_volatile_register(struct device *dev, unsigned int reg) { if (reg <= WCD938X_BASE_ADDRESS) - return 0; + return false; if (reg == WCD938X_DIGITAL_SWR_TX_CLK_RATE) return true; -- 1.8.3.1