From patchwork Tue Feb 13 19:37:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 10217433 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 9D742601C2 for ; Tue, 13 Feb 2018 19:38:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8C69128DC5 for ; Tue, 13 Feb 2018 19:38:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 816B728E59; Tue, 13 Feb 2018 19:38:04 +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 CCEB528DC5 for ; Tue, 13 Feb 2018 19:38:03 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 14FF72679C8; Tue, 13 Feb 2018 20:38:02 +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 7BC972679C8; Tue, 13 Feb 2018 20:38:00 +0100 (CET) Received: from mail-qt0-f194.google.com (mail-qt0-f194.google.com [209.85.216.194]) by alsa0.perex.cz (Postfix) with ESMTP id 9D26B26775A for ; Tue, 13 Feb 2018 20:37:58 +0100 (CET) Received: by mail-qt0-f194.google.com with SMTP id d8so4961515qtm.0 for ; Tue, 13 Feb 2018 11:37:57 -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; bh=sB1In/ZlrnbDv5XWtOsipTVLwYvW8KTBaKcxRsqklY4=; b=H28iL9m1qInO4nYNN+SrtDXxWvo24fz5Y0uDxDSWCjsGv2WaW4TL3hcYgQkjr+c4+x UWL7/CwVdva5QZNlZwZ8qH9TAuDGTt+/k1ltpOC6ukNwbwWIiHuSq3w5hd4dp8ygXHCk EwW79FJ4r+/5+zKU5SeLHNDtIs11oZAtH4hJdQ6YU5b2Dx1Dob3oWmFdkowIS9Z07HDm XEerRrY4pt/m4T1if/REJkMIXTrJKElyej/ZBceDaehjmuRTFhebVyf4DIDMP+wAI+hx GyJ88HNagi2YBLNeeTBxczkfR47GE0PWV+zrg+NzYXNIf2yPfrJsUGrT5IDaNMRbcDQf B1vg== 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; bh=sB1In/ZlrnbDv5XWtOsipTVLwYvW8KTBaKcxRsqklY4=; b=DS3ASUXb9bkZpUQYJfIkOvK0zAYY4JE+a5ZIG9BWLDKqtqlNMJ8K5myDJe+Z7C2Hxz IoB9vmY+5xFpXfm4qk+GMnAGwil1OJt5nG+n7iA6WxLMpfa6grSUZeQUswkDzzlaNtKA 0C+h0Ux8N3oBgR99AbQxtWaxTl1LJhvryoOux2qsoLA+nfHP6ZnyR6n+O+3wDO7or4/Q Uby4aMpGyYckHyfHXoEtzbkLb66LhnxhDXEzuB6k9+k6rdrL9JCiR/aGkbyaS1ZtPCsj hKVr3zhVl6xw0UUhrpgyQjdLlFXs5pjKhTpOpaWCItgldaiyEoG7rwLUGcBqDqNT6qZf zMrA== X-Gm-Message-State: APf1xPDzsOPNZ++9xnlMJ3O1k0xFERIkPRTQBX7PtpPJOStka2FP+R5E VUVgUCEtrUcwbWBZDZ0lbKOsSQ== X-Google-Smtp-Source: AH8x2276KClA6futXTgpS4qvm8fnFYHBOyvGqaeNh85aliIDe+3F2hdXCUTI5oFGJKA3rSU6n0JriA== X-Received: by 10.200.66.197 with SMTP id g5mr3852829qtm.12.1518550677124; Tue, 13 Feb 2018 11:37:57 -0800 (PST) Received: from localhost.localdomain ([187.180.181.113]) by smtp.gmail.com with ESMTPSA id a190sm7669021qkf.20.2018.02.13.11.37.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 13 Feb 2018 11:37:56 -0800 (PST) From: Fabio Estevam To: broonie@kernel.org Date: Tue, 13 Feb 2018 17:37:50 -0200 Message-Id: <1518550671-16359-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 2.7.4 Cc: Fabio Estevam , alsa-devel@alsa-project.org Subject: [alsa-devel] [PATCH v2 1/2] ASoC: wm9712: 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/wm9712.c:229: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/wm9712.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c index 7aeeeec..953d94d 100644 --- a/sound/soc/codecs/wm9712.c +++ b/sound/soc/codecs/wm9712.c @@ -226,7 +226,7 @@ static int wm9712_hp_mixer_put(struct snd_kcontrol *kcontrol, struct soc_mixer_control *mc = (struct soc_mixer_control *)kcontrol->private_value; unsigned int mixer, mask, shift, old; - struct snd_soc_dapm_update update = { 0 }; + struct snd_soc_dapm_update update = {}; bool change; mixer = mc->shift >> 8;