Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp967608rwd; Tue, 13 Jun 2023 03:00:08 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7/O8F7hoJbmh+fcnqNJjAn9wsaDnx0WqO7udklzZVq4LJXgXMmhZyuE8bbrWu1Y6koncnn X-Received: by 2002:a05:6a20:938f:b0:117:c0a5:5f36 with SMTP id x15-20020a056a20938f00b00117c0a55f36mr14019492pzh.36.1686650407885; Tue, 13 Jun 2023 03:00:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686650407; cv=none; d=google.com; s=arc-20160816; b=yGDiqvuAn+lwC3cm+tiXgIGowQX8NsnOSXioCgHOMj5X4s2igoye4a0JKFRIqBHCi9 4zhDxOoOGP/LeX0ewiZ4cMfeTycUyo1LBwCThF8/5rUXjSCF1M8mnoynVRVc///lTuh2 mdoiG4N3xH7t4uvgqttmhsqLuAt0W5KoBHrJn3q2cRC3fm/x7aOdKIbjbq+gat8bIImI c2YdbDB25nnlLymzdtNZzoe6/nKsA3cSxWtfqIEvfp9viqFETibklq/dLKclmTrhY1bp /ZZrq70kR9eDBlPJT6Kcl9m2g6Qa0SknWTXiFCYscb9ezWtfb8ozKzhE3MubBagbwRoN AM3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=eEwfBJFCHzxYRQZi7kEFO2bxAicvTJZZs7UatO3IpJY=; b=Mac4qJkrQBNOAfxF2/BpT8+MHSi8yLoN0SfhnIBC9nvwh9Ppg7lKYatH0yD/57MjTR nCLtJDbPTv26x1lDm9OQZx0lrfH3dWLwQeeQOXaP2eiBI8Jl71Y2WtarOgxFFFSmfa4g uOpmq8CPYLG0CN/KB9hJwWfzBKAf7VBqQw2OhWDrTonia21nKvVmvN50u2Q5ZpXj8PMW l3WrxFkBpH6gNynmfbBwUFo/S6avM4zuvHNuin3KnDpL/uXgkjP2vqOa8esQobv/Dri+ qWIZJooNPJfGffN03lijbkbNPAaiITL/Z55CKcqv5ytdAn0YdABrbX51ehEkfgu01Da2 SWWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=cI4E+0KO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kh7-20020a170903064700b001ae5fcecb49si8175067plb.25.2023.06.13.02.59.54; Tue, 13 Jun 2023 03:00:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=cI4E+0KO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240649AbjFMJhg (ORCPT + 99 others); Tue, 13 Jun 2023 05:37:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241430AbjFMJhU (ORCPT ); Tue, 13 Jun 2023 05:37:20 -0400 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::225]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 715841BD8; Tue, 13 Jun 2023 02:37:11 -0700 (PDT) X-GND-Sasl: herve.codina@bootlin.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1686649030; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eEwfBJFCHzxYRQZi7kEFO2bxAicvTJZZs7UatO3IpJY=; b=cI4E+0KOLchkY75M01qJZk03RB9OYLGMIknmHlekjZAFP9rMQm4qdF0plxkJvW4o0wQb3V aeOKu0+VWSa+XUy0hxzF17L3AyuurA1xLK/8403rCjD34EdOaVFxFBuQvaoGKhfT+sU63P 8VpipIM3aay0z2B77mUXpat210sCtstH5/ByVej4cne+lLryxekrqE9YtnGoHCkfJT++U4 j32ezAkUWMdd4ILDfcxzg+8fI0CcCMTB5bVwNzI2mAYfMyHvynBFzTYu6avs8GGNEzTdtz UXB3+Crd46nY2Qsey6k71iqGnlTyj5iGRVCQH/sTtqBREr1QCPP6SeOKDt9EZw== X-GND-Sasl: herve.codina@bootlin.com X-GND-Sasl: herve.codina@bootlin.com X-GND-Sasl: herve.codina@bootlin.com X-GND-Sasl: herve.codina@bootlin.com X-GND-Sasl: herve.codina@bootlin.com X-GND-Sasl: herve.codina@bootlin.com X-GND-Sasl: herve.codina@bootlin.com X-GND-Sasl: herve.codina@bootlin.com X-GND-Sasl: herve.codina@bootlin.com X-GND-Sasl: herve.codina@bootlin.com X-GND-Sasl: herve.codina@bootlin.com X-GND-Sasl: herve.codina@bootlin.com X-GND-Sasl: herve.codina@bootlin.com X-GND-Sasl: herve.codina@bootlin.com X-GND-Sasl: herve.codina@bootlin.com X-GND-Sasl: herve.codina@bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 76FB11C0005; Tue, 13 Jun 2023 09:37:08 +0000 (UTC) Date: Tue, 13 Jun 2023 11:37:07 +0200 From: Herve Codina To: Andy Shevchenko Cc: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jonathan Cameron , Lars-Peter Clausen , Jaroslav Kysela , Takashi Iwai , Kuninori Morimoto , alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, Christophe Leroy , Thomas Petazzoni Subject: Re: [PATCH v3 11/12] ASoC: codecs: Add support for the generic IIO auxiliary devices Message-ID: <20230613113707.0b5d9648@bootlin.com> In-Reply-To: References: <20230612122926.107333-1-herve.codina@bootlin.com> <20230612122926.107333-12-herve.codina@bootlin.com> Organization: Bootlin X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andy, On Mon, 12 Jun 2023 17:37:00 +0300 Andy Shevchenko wrote: > ... > > > + struct snd_kcontrol_new control = {0}; > > 0 is not needed. Not for this one. The variable is in stack. Some of the structure members will be set in the code but we need to ensure that all others are set to 0. The full context: --- 8< --- static int audio_iio_aux_add_controls(struct snd_soc_component *component, struct audio_iio_aux_chan *chan) { struct snd_kcontrol_new control = {0}; control.iface = SNDRV_CTL_ELEM_IFACE_MIXER; control.name = chan->name; control.info = audio_iio_aux_info_volsw; control.get = audio_iio_aux_get_volsw; control.put = audio_iio_aux_put_volsw; control.private_value = (unsigned long)chan; return snd_soc_add_component_controls(component, &control, 1); } --- 8< --- Thanks for the review, Hervé