From patchwork Tue Feb 13 19:35:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 10217429 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 256166056F for ; Tue, 13 Feb 2018 19:36:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1426E28C11 for ; Tue, 13 Feb 2018 19:36:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 08A3928D86; Tue, 13 Feb 2018 19:36:08 +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 49CB528CB3 for ; Tue, 13 Feb 2018 19:36:07 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 8C2182679BF; Tue, 13 Feb 2018 20:35:50 +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 4487D2679A5; Tue, 13 Feb 2018 20:35:48 +0100 (CET) Received: from mail-qk0-f194.google.com (mail-qk0-f194.google.com [209.85.220.194]) by alsa0.perex.cz (Postfix) with ESMTP id 848512679A2 for ; Tue, 13 Feb 2018 20:35:45 +0100 (CET) Received: by mail-qk0-f194.google.com with SMTP id z197so6955963qkb.6 for ; Tue, 13 Feb 2018 11:35:45 -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=2zWM5sLripEaXBkVYK+RWcYUVd8gyMIE+Qw9lsC23bQ=; b=jnLLlmkX2c5WJ74Q0RnB5Ge25/DHm5Kyedy6dH6FMPYUc/UZDz6ZI/r3M6POr3G7xI i3oJz4PftSKm7ZS/2FG+zlobkkh1YawDRx0EBBz99Ajq8yIULmcvf38K5sihS0KplsuR DSMyWmcWqdy3/Jy0+CUQj4Cs6TOREfO73/ThfNRsLmsAyPHkkcj6Hwd06a+z0MTN/Ylp YBP04NZQHP/nt+KIj8+/nbdTXWjqtCwrTeFErvTPLSfHLqSja3NUMW2pqmdoqgKlv6hZ BDtla57eG1r+rIYcl78SlTEGDsxYKCp6MjMlVMmr4Ez8TqOQRX0lkVjD/fNRl4gM3jo/ 6GGg== 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=2zWM5sLripEaXBkVYK+RWcYUVd8gyMIE+Qw9lsC23bQ=; b=ZkXX8oY3F0YYTSzLv3fRCFYXMi0Yid3fzCmGcVQa1ZychV9HNsxY9qNLs2lS7wzmba SKAvihTDgS9G2e97UNR1+rn720rdFcngRwD+tXQxUiiLXmk/uQzk6qlxcm4EMsMmBO8/ 8YDXaBWsvXpb3xFhLfuuc44MgSdYpNHurNPuIzjoF9bJ7FfEXvHoSc6Io6NyePxqymYh ZJiPe6Qw79OKD3tOZFBVv/V9mAKa6tk402ELTukanpMFPJdmjapCWd7g/MUjnXjCAggQ /b6kd1e2XqnQRLVfli/eXFi8FvQqPJvHH215DvyD5atA66UmNN7igv9Z4AukhKEmyyM0 BakA== X-Gm-Message-State: APf1xPDq+DkMuLGvoyJKlOqI4fYMUv2taOlplNJ93t+NSO+CxCHTANtb 1YfTWljFctiie6hCPy1xD5E= X-Google-Smtp-Source: AH8x225f08mJhWskLRrS+t6vhjjqNk9B6EPLggEVpTqTFZdOEm4pyZXo5+dF4O7kyaopNTaum6x/5g== X-Received: by 10.55.214.130 with SMTP id p2mr3641183qkl.304.1518550544424; Tue, 13 Feb 2018 11:35:44 -0800 (PST) Received: from localhost.localdomain ([187.180.181.113]) by smtp.gmail.com with ESMTPSA id p64sm7769755qkb.4.2018.02.13.11.35.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 13 Feb 2018 11:35:43 -0800 (PST) From: Fabio Estevam To: broonie@kernel.org Date: Tue, 13 Feb 2018 17:35:36 -0200 Message-Id: <1518550536-16279-2-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518550536-16279-1-git-send-email-festevam@gmail.com> References: <1518550536-16279-1-git-send-email-festevam@gmail.com> Cc: Fabio Estevam , alsa-devel@alsa-project.org Subject: [alsa-devel] [PATCH 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 pointer, so wrting 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 --- 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);