From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6954C433E0 for ; Tue, 21 Jul 2020 08:38:50 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 619CC20709 for ; Tue, 21 Jul 2020 08:38:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="rQ6eyOVX" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 619CC20709 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id D79591660; Tue, 21 Jul 2020 10:37:58 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D79591660 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1595320728; bh=mmsFNLREuQwxd9DR+7JA/NMbjm3wMYYChlHo290qAv0=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=rQ6eyOVXPNA/QyTMoEfoibsZZKkpPMVQMy7aEb4H6gDsNdljsGIbHFNrgskMbjSRd txLRLhufaieAHFB3oXRcYpf6mKtVztlwJwhQa9TVxXGm63dOfT1yGcab8caWFtUy+K NJZaHDYX8q3DNWQzyTwm2yA77KSf9K2Z/ku2cr80= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 61A58F80212; Tue, 21 Jul 2020 10:37:58 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 48124F800CE; Tue, 21 Jul 2020 10:37:57 +0200 (CEST) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 6483EF800CE for ; Tue, 21 Jul 2020 10:37:47 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6483EF800CE X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 6B997AC46; Tue, 21 Jul 2020 08:37:53 +0000 (UTC) Date: Tue, 21 Jul 2020 10:37:46 +0200 Message-ID: From: Takashi Iwai To: Ren9 Herman Subject: Re: [PATCH 0/3] snd-usb-6fire: firmware load and pulseaudio assumption In-Reply-To: References: <20200721064853.9516-1-rene.herman@gmail.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 Cc: alsa-devel@alsa-project.org, Torsten Schenk X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Tue, 21 Jul 2020 10:29:29 +0200, Ren9 Herman wrote: > > On 21-07-2020 10:02, Takashi Iwai wrote: > > > The patch needs to point to the right path that is applicable with > > patch -p1 option, i.e. it should be like > > diff -up a/sound/usb/6fire/xxx.c b/sound/usb/6fire/xxx.c > > > > At best use git for creating / submitting a patch. > > Blast. I did, but worked against an isolated (DKMS-ed) version of the > kernel driver. Pardon. Shall re-setup against the kernel as such and > resend after dealing with your other two comments. I.e., > > Re: [PATCH 1/3] snd-usb-6fire: Move DMA-buffer off of the stack Submit a complete set freshly as a v2 patch set. [PATCH v2 1/3] ... > > Could you rather change return with goto out (with ret variable > > set)? In that way we can see what actually you changed more clearly. > > I already did exactly that though and in fact, the original not doing so > is what makes the patch seem involved. With the added kmalloc() I change > it so that all returns goto out, which kfree()s again. The only one that > does not is when kmalloc() fails, i.e., when there's nothing to kfree(). > I suppose you just misread and do not need to have that single one go > through a goto as well? The first return for kmalloc error should remain so, but the rest can be replaced with goto out. That I meant. > > Re: [PATCH 3/3] snd-usb-6fire: Unmark struct snd_pcm_hardware const > > > This must be superfluous. usb6fire_pcm_open() changes the field of > > the copied pcm_hw, not the original pcm_hw itself. Otherwise we > > must have got already a compile warning / error. > > Unfortunately no; it's as mentioned in the cover letter accessed via > pointer: usb6fire_pcm_open() sets "alsa_rt->hw = pcm_hw" and then > changes pcm_hw as e.g. "alsa_rt->hw.channels_max = OUT_N_CHANNELS;". > I.e., not a copy. Note that it copies the whole instance, not the pointer. So the current code is correct. thanks, Takashi