Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp151882pxp; Tue, 8 Mar 2022 23:18:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJy3bGQzkssxvXWfxalW3ctMaB5vlfl4w0WSkKfW/74B7SEuqHYADxXzFdVYncfrsAgWGj66 X-Received: by 2002:a17:902:f68b:b0:151:d869:3b16 with SMTP id l11-20020a170902f68b00b00151d8693b16mr19030082plg.85.1646810303647; Tue, 08 Mar 2022 23:18:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646810303; cv=none; d=google.com; s=arc-20160816; b=QEfpu7b9k1C611MGLQdMG9wLfgu3qsf74fLMQCHHt+Eu94JOvQj0pZpiFjZUDKLTGr KFvOtBHn7zTI/8fOeVrBGaBuYprWPf0cdDaDCp8LL5cv4kvhYx/a2ApyGA6iUEvnGG9q kV7swVheAuZPIEBVEyVEFVLMP5/fKWlpgZz5J2Lxoi5rhS+eZsiDjJFjxCx3FAekm97e Yl/hhUugJU4US81Ehc8rdCO56ue31d3df7DWvqWbpXB54qOJn+Gxtw6AlvsuqSARtuAi IfE1n05yZ4yy4TfoPWOzAXm6uc189sIXwa5yh8zl87WYmbIt1kQCMOMfe7Tm+PG68Fu+ u1FA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=+4eP/H0wpVzSjsYEXDTaZk/VvPZ4tqcbQZOjVFDUlXw=; b=AT8nTAmsGMF8GIPewgfGK4Ad6PdajUMJhva29jDCiQV8lvYVuAdK4lXS5R+uT9KKRu ZhtcZTFZ746p2H6yKqT7SeDzb2GqJjZGzXmlUSEtZntp+amAgiE6+79fk/VVh65zPZI9 i+0/N7WKzo4S5zzG2v4OUXWwUlj97zwaG1gDQ7i3rWZB7HiB/QyFwovMTIXqV4wi0l36 kwXivWaNEaJHivQrM9bmY6ox0yWFbzoilZ+ADLIHxqj4BlvsgVf8bGgYIt4mgYkS+iHx uLhdnjQItbz/r1uK9sp2DsHSbNoj3Gru7CR7UZ96yPUdl0DLQsmEchFy5YS8eTVvTI+s LdSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gnuweeb.org header.s=default header.b=HVo3Iaa0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnuweeb.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r139-20020a632b91000000b0037c53c0fd16si1043817pgr.767.2022.03.08.23.18.09; Tue, 08 Mar 2022 23:18:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gnuweeb.org header.s=default header.b=HVo3Iaa0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnuweeb.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229952AbiCIHAG (ORCPT + 99 others); Wed, 9 Mar 2022 02:00:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229501AbiCIHAF (ORCPT ); Wed, 9 Mar 2022 02:00:05 -0500 Received: from gnuweeb.org (gnuweeb.org [51.81.211.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1730542EE3 for ; Tue, 8 Mar 2022 22:59:07 -0800 (PST) Received: from localhost.localdomain (unknown [138.197.159.143]) by gnuweeb.org (Postfix) with ESMTPSA id 934627E2B4; Wed, 9 Mar 2022 06:59:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1646809146; bh=XOsQg5Wg6D7N7E5H1D+daqbJz5RJM1qCGTDWtbNB08c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HVo3Iaa0NIhYESCGguWkOvc+o9kTJzFhAyH9Lx5IXJIy+Q7O4zl1oLinQtoawnc9x qV3+ueZu7m3VLLsCTwCv1BwqWSKoXVrD9+9XN8cCCCYi5FRoNepLcKDiQLY8RWwNpS G4XN+QQNy44lglNZdimwgOpIWFpRXBWIqHFE58Sfv7KzQAXfA/rj2HURXK9x1z+lcZ GEETY6W+I1hG9lj2bJ9wzwsCU/6EiKwBqKbaYyKHXXLw0m4KPXDOsXYwGLP0upc2K4 xJNCBD5bFDGbOmopb+RjOX63yl+x5/iWAdDcb5Jj7wiCXC9H9PPF/7PC29YIwZF2rv OEWDTyfj1R7QA== From: Alviro Iskandar Setiawan To: Mark Brown Cc: Alviro Iskandar Setiawan , Alviro Iskandar Setiawan , Codrin Ciubotariu , Nugraha , llvm@lists.linux.dev, kbuild-all@lists.01.org, gwml@vger.gnuweeb.org, linux-kernel@vger.kernel.org, kernel test robot Subject: [PATCH] ASoC: atmel: mchp-pdmc: Fix `-Wpointer-bool-conversion` warning Date: Wed, 9 Mar 2022 06:58:49 +0000 Message-Id: <20220309065849.96165-1-alviro.iskandar@gnuweeb.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <202203091430.MLY27Bif-lkp@intel.com> References: <202203091430.MLY27Bif-lkp@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In function mchp_pdmc_af_put(), Intel's kernel test robot reports the following warning: sound/soc/atmel/mchp-pdmc.c:186:34: warning: address of array \ 'uvalue->value.integer.value' will always evaluate to 'true' \ [-Wpointer-bool-conversion] This is because we are using `uvalue->value.integer.value` which its type is `long value[128];` for conditional expression and that array will always decay to a non-NULL pointer. Using a non-NULL pointer for conditional expression will always evaluate to true. Fix this by changing it to `uvalue->value.integer.value[0]` as that's what the mchp_pdmc_af_get() function sets. To: Mark Brown Cc: Codrin Ciubotariu Cc: Nugraha Cc: llvm@lists.linux.dev Cc: kbuild-all@lists.01.org Cc: gwml@vger.gnuweeb.org Cc: linux-kernel@vger.kernel.org Reported-by: kernel test robot Link: https://lore.kernel.org/lkml/202203091430.MLY27Bif-lkp@intel.com Fixes: 50291652af5269813baa6024eb0e81b5f0bbb451 ("ASoC: atmel: mchp-pdmc: add PDMC driver") Signed-off-by: Alviro Iskandar Setiawan --- sound/soc/atmel/mchp-pdmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/atmel/mchp-pdmc.c b/sound/soc/atmel/mchp-pdmc.c index c44636f6207d..7b87f75c284c 100644 --- a/sound/soc/atmel/mchp-pdmc.c +++ b/sound/soc/atmel/mchp-pdmc.c @@ -183,7 +183,7 @@ static int mchp_pdmc_af_put(struct snd_kcontrol *kcontrol, { struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); struct mchp_pdmc *dd = snd_soc_component_get_drvdata(component); - bool af = uvalue->value.integer.value ? true : false; + bool af = uvalue->value.integer.value[0] ? true : false; if (dd->audio_filter_en == af) return 0; base-commit: 50291652af5269813baa6024eb0e81b5f0bbb451 -- 2.27.0