From patchwork Tue Feb 13 19:35:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 10217413 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 9767D601C2 for ; Tue, 13 Feb 2018 19:35:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 88B5D28D86 for ; Tue, 13 Feb 2018 19:35:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7D8A628DC9; Tue, 13 Feb 2018 19:35:52 +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 8A81028D86 for ; Tue, 13 Feb 2018 19:35:51 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 4165C2679A2; Tue, 13 Feb 2018 20:35:49 +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 278302679A7; Tue, 13 Feb 2018 20:35:47 +0100 (CET) Received: from mail-qk0-f196.google.com (mail-qk0-f196.google.com [209.85.220.196]) by alsa0.perex.cz (Postfix) with ESMTP id 0C5B826775A for ; Tue, 13 Feb 2018 20:35:44 +0100 (CET) Received: by mail-qk0-f196.google.com with SMTP id c128so23813488qkb.4 for ; Tue, 13 Feb 2018 11:35:44 -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=Sw8QWt3w/tJVsYOa370ehWFzKNrv/DDI9p9SNvnKG7o=; b=qefaAl6qYlNyF7SHqxoy72pw2zi99ZLeDeluaAyQh1hlnCANUaHzyGXwSA1dEQo14t ByADniENKjGHstvNjuslIPwAkMutzCohtGQ2jPWjZqXN8WY1ZTBaaV7oAaIENwPejZ77 WMqXqtExMk40V5Ahsbxky3EjdFTG5nXh3Tgd8Eejm4ArpAh2MXMD7BX5lr+4dymtvTVs R7wn2Qn5TuvxmPnv6YNREkXBZYaNGa6q5mVO9ogTBRtMktWet4yKrBnxRGN7ehbHYd4B ckraVT/SYplaaOV2GUQ9wo1pOMaljo78QlluL/nWWEWaPxi1ZVcdhv8IwFPX1BvEJ0jO baXg== 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=Sw8QWt3w/tJVsYOa370ehWFzKNrv/DDI9p9SNvnKG7o=; b=NtqP18x6Vi7zGSQvBy6bIilmSOZpOLI/P2LCsGRYBA5MkVao72z/ASH9B2gjVEc48M BPjUJHaCYhvQlcCqFIEPs5boi365eKuQFw9nEbPhPL5mV85htiNDEAq3L3oYcCCHmIzH 6HBTZLH+fCwOHE0qbopgqqXn0MZoiVvQdUzziWcC5LV0dVDQNv7NaVsm+KNrhnJTnG+1 N/vkZDynasYnbqK8O30Bbtpnn1PV82s0TPoRuNL9sJjT67qNbgs5YGqcNxmMXUzDHYry S7NDjkUCowYEIy8j86aKTRDjivWNFOyFJUg/RoTDcWdNgI2xPIu9VNFM0uibHDDdfqKd cIlQ== X-Gm-Message-State: APf1xPA0suLwD9CvBPY4Cn7Hhn//2ccohEoKLUhDQAd+zS2dQ6bJq3OS By4WQkjo71HR4MmZ7THyGvY= X-Google-Smtp-Source: AH8x224j9uSmP16Op2Aezk2ie582DSGhp2c0KxMd9Ff6kJeK8yGV0mtx4frUxAiTDDXdlfnsHM2TqQ== X-Received: by 10.55.135.70 with SMTP id j67mr3656010qkd.34.1518550542519; Tue, 13 Feb 2018 11:35:42 -0800 (PST) Received: from localhost.localdomain ([187.180.181.113]) by smtp.gmail.com with ESMTPSA id p64sm7769755qkb.4.2018.02.13.11.35.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 13 Feb 2018 11:35:42 -0800 (PST) From: Fabio Estevam To: broonie@kernel.org Date: Tue, 13 Feb 2018 17:35:35 -0200 Message-Id: <1518550536-16279-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 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 pointer, so wrting 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 Acked-by: Charles Keepax --- 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;