Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 97CA7C433EF for ; Tue, 14 Dec 2021 16:34:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236060AbhLNQeX (ORCPT ); Tue, 14 Dec 2021 11:34:23 -0500 Received: from smtp-out2.suse.de ([195.135.220.29]:47430 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235989AbhLNQeV (ORCPT ); Tue, 14 Dec 2021 11:34:21 -0500 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 4AB3F1F381; Tue, 14 Dec 2021 16:34:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1639499660; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=77bABPJtSNxFAw/Xtugh+m2CCURtbLu9t56UQYXKviI=; b=ltizkbQFfN1v1qDLj8gG/oO7fyxcQbvikRiUO50rlowAcfzxJVPVx8aAcAGjn5fEeYiG7s PVHapEjw1sjiMZQPTYIze4vwX+CKzWhhQyWcj+s6uXtudd073XdEzlOZh39GEzAU9usTBo vNNLWYGoyYA3lj2hjc0ZbmA1bUO6rVA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1639499660; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=77bABPJtSNxFAw/Xtugh+m2CCURtbLu9t56UQYXKviI=; b=a7pfyxVm1Jcrr30RkT/TIczCZlsHs9c4RavcxTF49sgmZlxy3T37Zgr0470H3dpi/+oNaO M4MAhIlorR9T7XBA== Received: from alsa1.suse.de (alsa1.suse.de [10.160.4.42]) by relay2.suse.de (Postfix) with ESMTP id 2C6D3A3B85; Tue, 14 Dec 2021 16:34:20 +0000 (UTC) Date: Tue, 14 Dec 2021 17:34:20 +0100 Message-ID: From: Takashi Iwai To: Lucas Tanure Cc: "Rafael J . Wysocki" , Len Brown , Hans de Goede , Mark Gross , Liam Girdwood , Jaroslav Kysela , Mark Brown , Takashi Iwai , , , , , Subject: Re: [PATCH v4 09/10] ALSA: hda/realtek: Add support for Legion 7 16ACHg6 laptop In-Reply-To: <20211214135959.1317949-10-tanureal@opensource.cirrus.com> References: <20211214135959.1317949-1-tanureal@opensource.cirrus.com> <20211214135959.1317949-10-tanureal@opensource.cirrus.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 14 Dec 2021 14:59:58 +0100, Lucas Tanure wrote: > > Add Support for CS35L41 using the component binding > method > > Signed-off-by: Lucas Tanure Through a quick glance, the patch looks almost fine, just a few nitpicking: > @@ -6497,6 +6502,105 @@ static void alc287_fixup_legion_15imhg05_speakers(struct hda_codec *codec, > } > } > > +static int comp_match_dev_name(struct device *dev, void *data) > +{ > + if (strcmp(dev_name(dev), data) == 0) > + return 1; > + > + return 0; This could be a oneliner: return strcmp(dev_name(dev), data) == 0; > +void comp_generic_playback_hook(struct hda_pcm_stream *hinfo, struct hda_codec *codec, > + struct snd_pcm_substream *sub, int action) Missing static? > +void alc287_legion_16achg6_playback_hook(struct hda_pcm_stream *hinfo, struct hda_codec *codec, > + struct snd_pcm_substream *sub, int action) Ditto. > +{ > + struct alc_spec *spec = codec->spec; > + unsigned int rx_slot; > + int i = 0; A superfluous variable initialization. thanks, Takashi