From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fabio Estevam Subject: Re: [PATCH 2/3] ASoC: wm9713: Use empty struct initializer Date: Wed, 14 Feb 2018 14:49:01 -0200 Message-ID: References: <1518622745-12162-1-git-send-email-festevam@gmail.com> <1518622745-12162-2-git-send-email-festevam@gmail.com> <938aa54c-c599-9efc-e78f-4e72db08199e@opensource.cirrus.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ot0-f196.google.com (mail-ot0-f196.google.com [74.125.82.196]) by alsa0.perex.cz (Postfix) with ESMTP id 80984266F0D for ; Wed, 14 Feb 2018 17:49:03 +0100 (CET) Received: by mail-ot0-f196.google.com with SMTP id f18so20925038otf.6 for ; Wed, 14 Feb 2018 08:49:03 -0800 (PST) In-Reply-To: <938aa54c-c599-9efc-e78f-4e72db08199e@opensource.cirrus.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Richard Fitzgerald Cc: Fabio Estevam , alsa-devel@alsa-project.org, Mark Brown , Charles Keepax List-Id: alsa-devel@alsa-project.org On Wed, Feb 14, 2018 at 2:41 PM, Richard Fitzgerald wrote: > This is the actual problem you are trying to fix? The comment about > { 0 } only clearing the first member is probably bogus, your actual > problem is that it should have been { NULL } ? Changing to { NULL } fixes the sparse warning, but that would be a fragile fix because it relies on the order of the struct members. If someday the struct changes in a way so that the first member is no longer a pointer, then we will have issues again. Using {} is more error prone.