From patchwork Wed Feb 14 15:39:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 10219289 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 173F060467 for ; Wed, 14 Feb 2018 15:47:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F13012901B for ; Wed, 14 Feb 2018 15:47:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EFF142902F; Wed, 14 Feb 2018 15:47:57 +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 02D642901B for ; Wed, 14 Feb 2018 15:47:57 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 582AA267B2B; Wed, 14 Feb 2018 16:39:20 +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 7AFF6267B2C; Wed, 14 Feb 2018 16:39:18 +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 B35C3267822 for ; Wed, 14 Feb 2018 16:39:16 +0100 (CET) Received: by mail-qk0-f196.google.com with SMTP id c4so24839628qkm.2 for ; Wed, 14 Feb 2018 07:39:15 -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=F1jYoDf7f/z8iRYaomYDk+efebylTbh2i8yqpKm30Yk=; b=vbJHvNSOZV1yU1n2bkWkpW+mWI6mVew28chJOMPZTO+nmRGv0YUUvqulWj3kcdjb4I NqHzeooz6S92pyLWukAB4o05UBENCUMkh6N66f43PtWzag1uYKvlZn49xaOxkDBrKZAI lMe23FMB+spWxTKoKGfQEXzQX8PQ60pSDimXnNkbtywlg4Xc3Bh45EEdFW6vVMZABGml b9HURy6vEJBv5LOr1Enu6nIbd00qVrfyZVeKixiY/ljCijpyjstyFfnK3Hj9tDtGQnJ4 1nCuJAE77HKWlZloY8KC+T7HYKMtB8EvcPtk5DZqvZhxUfw+qlRk5amsF1Z/McKdn5GD ftoQ== 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=F1jYoDf7f/z8iRYaomYDk+efebylTbh2i8yqpKm30Yk=; b=taYY7il+SR5Y3UXQIu3GUZ2MF7OiyXB9b0Adx4kVcHuMyQSvCzbmQPkEflAotfmHdk C57oU3aoXz45qytxn5w45s4yoj7X7t6+lbVi+TROCjjJ/tr8AMn8MJO5/FCSmCA6G3WW jkeXqlsLsqxaq+KiAJ/r2n+Qspcx1CUgg1YALXRbKElpyH2ucR2Bz5flQU5T+qpBh8d3 9jkHSQcGM8kShwtT+tABaPGnx4y9KsYfUzOFAEPos/D5rQr6z60uBYcpwvsercOrlgp2 tERBtn/ELyR44DyDx8ZIjgHkAjYbvcFv4eZbtD+WBVIHewEqJ3fdqqh2NasBSDVvKjxR ERWQ== X-Gm-Message-State: APf1xPBvIJMUdjZ+ZLR8UNRg2y8s9s1qYG/oF1hLNhBgWa5u6U+v+0JZ 1IZip49S71/uXFmf88UTSX8= X-Google-Smtp-Source: AH8x224dt05KieMh0IKas7Ptlvj05z25JoQsU44G0rO3SVw35HDqu1otrMwAjytENKrCFgQXKN+Xpg== X-Received: by 10.55.8.145 with SMTP id 139mr8206445qki.83.1518622755267; Wed, 14 Feb 2018 07:39:15 -0800 (PST) Received: from localhost.localdomain ([2804:14c:482:b3e:b9e4:e2b1:ec95:462c]) by smtp.gmail.com with ESMTPSA id z22sm8777219qti.75.2018.02.14.07.39.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 14 Feb 2018 07:39:14 -0800 (PST) From: Fabio Estevam To: broonie@kernel.org Date: Wed, 14 Feb 2018 13:39:05 -0200 Message-Id: <1518622745-12162-3-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518622745-12162-1-git-send-email-festevam@gmail.com> References: <1518622745-12162-1-git-send-email-festevam@gmail.com> Cc: Fabio Estevam , alsa-devel@alsa-project.org Subject: [alsa-devel] [PATCH 3/3] ASoC: soc-dapm: 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 { NULL } only clears the first member of the structure. Even though the first member of the snd_soc_dapm_update struct is a pointer,it is more robust to use the empty struct initializer that clears all the struct members. Signed-off-by: Fabio Estevam --- sound/soc/soc-dapm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 92894d9..2f34590 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -3165,7 +3165,7 @@ int snd_soc_dapm_put_volsw(struct snd_kcontrol *kcontrol, unsigned int invert = mc->invert; unsigned int val, rval = 0; int connect, rconnect = -1, change, reg_change = 0; - struct snd_soc_dapm_update update = { NULL }; + struct snd_soc_dapm_update update = {}; int ret = 0; val = (ucontrol->value.integer.value[0] & mask); @@ -3292,7 +3292,7 @@ int snd_soc_dapm_put_enum_double(struct snd_kcontrol *kcontrol, unsigned int *item = ucontrol->value.enumerated.item; unsigned int val, change, reg_change = 0; unsigned int mask; - struct snd_soc_dapm_update update = { NULL }; + struct snd_soc_dapm_update update = {}; int ret = 0; if (item[0] >= e->items)