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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EBB56C25B08 for ; Wed, 17 Aug 2022 13:12:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239769AbiHQNMm (ORCPT ); Wed, 17 Aug 2022 09:12:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239787AbiHQNMU (ORCPT ); Wed, 17 Aug 2022 09:12:20 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2524B6A4AF for ; Wed, 17 Aug 2022 06:12:12 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 444C31F9A8; Wed, 17 Aug 2022 13:12:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1660741931; h=from:from:reply-to: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=LSKR5hl3tgpKX0usEXDbDtvnkvqMP+IzysUnZiGsz5A=; b=hRocf2YuSQcp4APeYj1SbWrJkHGfG4Txf7rwRF6Gtu1wEWhYDD7t8qdWCOhpgdsv1wwp7O qj8YpM/bRqQV+3/mLQceLqp0gJx6/rtjqtcSndntK8wjzBBKk89XX4xvqjGvtAjyLrDyf4 BUrNSE70eoBPpGcVIGZVteQjdYtHH+U= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1660741931; h=from:from:reply-to: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=LSKR5hl3tgpKX0usEXDbDtvnkvqMP+IzysUnZiGsz5A=; b=rtw2K8tsLDvxKQbSYjfray2ttErKv1ZxMJM5RfdHpYt9eq9VeaoTdfKQu+42myKjMfDllS xdu3rPu0JDYUDADg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 2680813428; Wed, 17 Aug 2022 13:12:11 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id itmrCCvp/GKfUgAAMHmgww (envelope-from ); Wed, 17 Aug 2022 13:12:11 +0000 Date: Wed, 17 Aug 2022 15:12:10 +0200 Message-ID: <87ilmrauad.wl-tiwai@suse.de> From: Takashi Iwai To: Amadeusz =?ISO-8859-2?Q?S=B3awi=F1ski?= Cc: Takashi Iwai , alsa-devel@alsa-project.org, Cezary Rojewski , linux-kernel@vger.kernel.org, Jaroslav Kysela Subject: Re: [RESEND][PATCH] ALSA: info: Fix llseek return value when using callback In-Reply-To: <7324df1d-0424-a589-f7c9-df089a6cbefe@linux.intel.com> References: <20220817124924.3974577-1-amadeuszx.slawinski@linux.intel.com> <7324df1d-0424-a589-f7c9-df089a6cbefe@linux.intel.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 17 Aug 2022 14:56:05 +0200, Amadeusz Sławiński wrote: > > On 8/17/2022 2:49 PM, Amadeusz Sławiński wrote: > > When using callback there was a flow of > > > > ret = -EINVAL > > if (callback) { > > offset = callback(); > > goto out; > > } > > ... > > offset = some other value in case of no callback; > > ret = offset; > > out: > > return ret; > > > > which causes the snd_info_entry_llseek() to return -EINVAL when there is > > callback handler. Fix this by setting "ret" directly to callback return > > value before jumping to "out". > > > > 73029e0ff18d ("ALSA: info - Implement common llseek for binary mode") > > Signed-off-by: Amadeusz Sławiński > > --- > > sound/core/info.c | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/sound/core/info.c b/sound/core/info.c > > index b8058b341178..0b2f04dcb589 100644 > > --- a/sound/core/info.c > > +++ b/sound/core/info.c > > @@ -111,9 +111,9 @@ static loff_t snd_info_entry_llseek(struct file *file, loff_t offset, int orig) > > entry = data->entry; > > mutex_lock(&entry->access); > > if (entry->c.ops->llseek) { > > - offset = entry->c.ops->llseek(entry, > > - data->file_private_data, > > - file, offset, orig); > > + ret = entry->c.ops->llseek(entry, > > + data->file_private_data, > > + file, offset, orig); > > goto out; > > } > > > > Doing resend, because I did copy paste mistake when pasting Takashi > email to git command, additionally alsa-devel blocked my previous > mail. > I've seen that Cezary already discussed this issue, and it doesn't > seem to be fixed, can this be somehow investigated? I guess we can > provide response we get from server when email fails? It seems working now. Jaroslav mentioned that it was some DNS problem. Takashi