From patchwork Tue Feb 13 19:37:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 10217435 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 08A9F601C2 for ; Tue, 13 Feb 2018 19:38:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ECEA028DB2 for ; Tue, 13 Feb 2018 19:38:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E179028DC5; Tue, 13 Feb 2018 19:38:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3DBD928DB2 for ; Tue, 13 Feb 2018 19:38:14 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 9D9722679EE; Tue, 13 Feb 2018 20:38:04 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 546CA2679EE; Tue, 13 Feb 2018 20:38:02 +0100 (CET) Received: from mail-qt0-f196.google.com (mail-qt0-f196.google.com [209.85.216.196]) by alsa0.perex.cz (Postfix) with ESMTP id 7936D26775A for ; Tue, 13 Feb 2018 20:37:59 +0100 (CET) Received: by mail-qt0-f196.google.com with SMTP id d26so3355215qtj.4 for ; Tue, 13 Feb 2018 11:37:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=0Ngx+dyfyr81T+fcHNFvjdaThOVz9FBQcsOnC1GtnRQ=; b=Avbp5ffrutJQxGA8BKpalzr1ch9z2p9UlMf9nEGzP2eRJ4j3/a+rTG4Zvu2UXp+ryA cX7wi8/ITEa5Hhb5GxMvBtvnvcPpU9Lnkuk+kIkJYkkULZgtXH08PgyRsfX1xodO8zI4 mRK1sSY6bTT77dK2k/KlhjsUZbthnSvAbEhSlHrnigL5YuBxWuuUtDazpCiZHXPMKzwr n5JhlEtiftTtgx4QewnLE2iGuSV7J1470rXc/C3m+v3c0SzoyyQdog74Y6dRZApp8Ac/ dqYPJvYzk2GcfwFjgUpf1FVZyhSP61InzrjvLx+AlKwuhlyrJukKwulcL0eDxtaayTTt M+Cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=0Ngx+dyfyr81T+fcHNFvjdaThOVz9FBQcsOnC1GtnRQ=; b=Z8iYeftnQ/gt0ho8f+ZGhfInT+8Cr33QI9UcW6nGJ+5hR7myqLPSPrUGGNLfd05UyK EDueB8Wu4T4J2kTDEepsvPbpr4OW0UUPEEafY8SM9pDkHuz5ciU+YJclkFRrI8EPPxFB EYYY7/Yh3etiNuoxl8InCdYdWWmVkpx473K7ldhIA02eu2AZJJHqujfltq+mdbvEUZ4J WnmaCT5caRbkHAHKywm21qFV6Ih/yWsVPPiaaoOTTrG0LRN6+STl0TlsfPM+UaYtzv3G QlHCxR+qnkJ2fjIIU5//leum8sLjBZZpMtMWsnC2A8UEeloicO9OdRBSfXWcdPwibDOV 6sgg== X-Gm-Message-State: APf1xPDUDEaVP/IbcyeleVyh7dryRkJew8b0+k5wZ4gVlxmkdoUMqAWh XEa96/Zm2kYZesh/R4gaPJye0w== X-Google-Smtp-Source: AH8x226u5+c+UAZBYrEKM5H1fcGCQNBn/I9ryLQkiTPxlgjQ1LhAgN3r55qnkBb9653fXuG5INHZNQ== X-Received: by 10.200.5.75 with SMTP id c11mr3495383qth.47.1518550679123; Tue, 13 Feb 2018 11:37:59 -0800 (PST) Received: from localhost.localdomain ([187.180.181.113]) by smtp.gmail.com with ESMTPSA id a190sm7669021qkf.20.2018.02.13.11.37.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 13 Feb 2018 11:37:58 -0800 (PST) From: Fabio Estevam To: broonie@kernel.org Date: Tue, 13 Feb 2018 17:37:51 -0200 Message-Id: <1518550671-16359-2-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518550671-16359-1-git-send-email-festevam@gmail.com> References: <1518550671-16359-1-git-send-email-festevam@gmail.com> Cc: Fabio Estevam , alsa-devel@alsa-project.org Subject: [alsa-devel] [PATCH v2 2/2] ASoC: tlv320aic3x: Use empty struct initializer X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Fabio Estevam { 0 } only clears the first member of the structure. The first member of the snd_soc_dapm_update struct is a pointer, and writing 0 to a pointer results in the following sparse warning: sound/soc/codecs/tlv320aic3x.c:175:47: warning: Using plain integer as NULL pointer Use the empty struct initializer that clears all the struct members and fixes the sparse warning. Signed-off-by: Fabio Estevam --- Changes since v1: - Fix typos in commit log sound/soc/codecs/tlv320aic3x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index dbfa0d8..6a271e6 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c @@ -172,7 +172,7 @@ static int snd_soc_dapm_put_volsw_aic3x(struct snd_kcontrol *kcontrol, unsigned int mask = (1 << fls(max)) - 1; unsigned int invert = mc->invert; unsigned short val; - struct snd_soc_dapm_update update = { 0 }; + struct snd_soc_dapm_update update = {}; int connect, change; val = (ucontrol->value.integer.value[0] & mask);