From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932621AbdIRJtB (ORCPT ); Mon, 18 Sep 2017 05:49:01 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:33982 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754061AbdIRJs6 (ORCPT ); Mon, 18 Sep 2017 05:48:58 -0400 From: Colin King To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Kuninori Morimoto , Arnaud Pouliquen , alsa-devel@alsa-project.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ASoC: hdmi-codec: use sizeof_field rather than declaring hcp Date: Mon, 18 Sep 2017 10:48:43 +0100 Message-Id: <20170918094843.28121-1-colin.king@canonical.com> X-Mailer: git-send-email 2.14.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King Use FIELD_SIZEOF rather than declaring and initializing hcp. Remove unused variables. Cleans up clang warning: warning: Value stored to 'hcp' during its initialization is never read Signed-off-by: Colin Ian King --- sound/soc/codecs/hdmi-codec.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c index 3abf82563408..5672e516bec3 100644 --- a/sound/soc/codecs/hdmi-codec.c +++ b/sound/soc/codecs/hdmi-codec.c @@ -303,11 +303,8 @@ enum { static int hdmi_eld_ctl_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { - struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); - struct hdmi_codec_priv *hcp = snd_soc_component_get_drvdata(component); - uinfo->type = SNDRV_CTL_ELEM_TYPE_BYTES; - uinfo->count = sizeof(hcp->eld); + uinfo->count = FIELD_SIZEOF(struct hdmi_codec_priv, eld); return 0; } -- 2.14.1