Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1393001pxm; Thu, 24 Feb 2022 02:09:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJyTw9FMlXRJ/meob87Gj/qcVmdc+Ta+TE9WgJE1uo4GRc6tKhMrhw1PNeU0FC9g5rAVFuFc X-Received: by 2002:a05:6a00:130c:b0:4bd:118:8071 with SMTP id j12-20020a056a00130c00b004bd01188071mr2088429pfu.28.1645697361324; Thu, 24 Feb 2022 02:09:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645697361; cv=none; d=google.com; s=arc-20160816; b=xuxcb5nhih3h6Agx6W3hh2Mg77tbBw/kT6PJ8C3bN2b/laEqeRUFqTfzKMJEgfovUA Pnv6OsDds6BaLztoyeaHHddZrittIj+JzDWnLebhTv995gGZEj6fKNY7DmhX51HkpKFh oDxXknsQLjub1TICOANA9BALkmTAw/xrsXzdwWxc2YJQUVSa3XoyyDo828IisHtPByRQ 64LIK+78oiDAU0nKJBcqWYlBRT6zYpsdcUp0fGLhgGcvtmnEeprA8Mk1XIuH1JqDdlDZ Ml4RldDCSk2rQtlURoxYz1CzekJ6KrWoqxR4pzsNYVbBh0dXnjc8G8wAX71x172db7Wf T7Qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=YDqiNHamOjenxa5cw+TrO7mXIFA5wZHD7nPZZlE9Yo8=; b=kwhAQWreDcvUYxoXEyEG8zKVtkv2vBFjav4lqE8JqavxEFdLvojvTyyb9Fe7bXbQFK pPhd5cBHu7UpmvugoJCkHPaY0fgN7fZhdtAV4tylgz2GW0kt43fdsdoL2Tfpx0qAeDG7 QTEuOVm8XV88CCQaTCEezsABBaqCZc+ZROTMzovIjG2JPRD5kPtEIDHbIk3YZddpod5a 7pXxWXgCGolzkPoEPRzpDqAnHdbduPSim1AudkKmuEe2urCwLCCzcptWz9XIQFOl5/99 NLrgpaoa/KZrJdaT+t1Yzw6rgtidPVFarV6MiS0jvMPgUQ6XKg7SMByty4Bgen+CNl1M Hmiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hkaey1IT; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c8si1787943pll.597.2022.02.24.02.09.06; Thu, 24 Feb 2022 02:09:21 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=hkaey1IT; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233039AbiBXJzp (ORCPT + 99 others); Thu, 24 Feb 2022 04:55:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232367AbiBXJzo (ORCPT ); Thu, 24 Feb 2022 04:55:44 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6D1F28571D for ; Thu, 24 Feb 2022 01:55:14 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 63AE260B4B for ; Thu, 24 Feb 2022 09:55:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 33A4EC340E9; Thu, 24 Feb 2022 09:55:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645696513; bh=/n75j2+vxgqqryZGybH7IthNrDj1w6prdozxYse9SUk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hkaey1ITcpR7c7EjwedBuhUzAG0S/M7sD+ClXNymg+LsuPFABd3j70d3o8r7R4qEa cKZpCk1/pDoeLT0PW0y9PI5UpsPWKVFGhkCCN40t0JnA8NfxVZMS3Qiu3TsesTuCNP vBMPJQ7fJ2pycFiyeJP//s3/skccbBWIxmR+hMWihtkAkztXlE1zDM//yfDIqVXUcS 11zU2+oy5Ls3yuPcvKBuY8II0ZH5kRoZyj/u2zarp81DhQuyn7bC4fVW7Ouy8/r3fI WdtGzbsD8cMGebTfrVNaEmPnIieDVviSu1a7EMPTVs2BiDiJAQC/KUrudUTLl+d0aC 0vL01pqzSFqbg== Date: Thu, 24 Feb 2022 15:25:09 +0530 From: Vinod Koul To: Raghu Bankapur Cc: Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Krishna Jha Subject: Re: [PATCH V1 1/1] ASoC: compress: propagate the error code from the compress framework Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On 24-02-22, 13:56, Raghu Bankapur wrote: > Propagate the error code from the compress framework for the timestamp > query. This error code will be used by the client to handle the > error case scenarios gracefully. > > Signed-off-by: Raghu Bankapur > --- > sound/core/compress_offload.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c > index de514ec8c83d..b89adbf666b1 100644 > --- a/sound/core/compress_offload.c > +++ b/sound/core/compress_offload.c > @@ -166,9 +166,12 @@ static int snd_compr_free(struct inode *inode, struct file *f) > static int snd_compr_update_tstamp(struct snd_compr_stream *stream, > struct snd_compr_tstamp *tstamp) > { > + int ret = 0; why initialize here, also pls leave an empty line here > if (!stream->ops->pointer) > return -ENOTSUPP; > - stream->ops->pointer(stream, tstamp); > + ret = stream->ops->pointer(stream, tstamp); > + if (ret) > + return ret; > pr_debug("dsp consumed till %d total %d bytes\n", > tstamp->byte_offset, tstamp->copied_total); > if (stream->direction == SND_COMPRESS_PLAYBACK) > -- > 2.17.1 -- ~Vinod