Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp4812644rwb; Wed, 17 Aug 2022 06:34:01 -0700 (PDT) X-Google-Smtp-Source: AA6agR4DmNkU7BY39y1ZI1jzsZE3swJJM9+hJJomunT6HDGicSFcny/5DdJdzij1Wiz/L1QVZMkS X-Received: by 2002:a05:6402:1777:b0:43d:85da:2fac with SMTP id da23-20020a056402177700b0043d85da2facmr23370763edb.32.1660743241515; Wed, 17 Aug 2022 06:34:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660743241; cv=none; d=google.com; s=arc-20160816; b=d5knCYIxMjWqNSLpJHF8Yv2BlJKKlWYNx+lB1Rf4Kc5oZptgY8ON+X2UMuW+CBhZvH wCRx5XDE0GcHWlwEQnOq+pCeVRnZ36kZee0fmcLH+i47HqwTOtnvnwA+u/0jaDk1p66t dktdQA4HLNSloI/OieukODEegc3wHpj9AhhN1XKY75bpHa65Zldf65kUpwG4j3L6K9qo LMSj0JOYJOZiUTYXZ4OGdkwhDRnIyfE1amZaCDn2Uo4vcjGzY9aGepNbGF7YOQmdGw3i XTe6Wz1v7l1hLCoW+wtRVWB+7gMvEwaFA4PRpKh2OHzv3C10QNfgbHp0WRLwFls6Dbnb C34Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=MfCyyM097uPmLQWZKM3eGaWAjuFDAzT36Fcx+55M2n4=; b=XGb4PE7tmQY7RMCNixGerwI+R4twZ0hK8d6Say6393nC4bY1uTODfLAHlyjT0uewop KrVPSpzQnNmJrQiBs6qF3qmlGLn0HHjoKvzKg8TcVOF89PwT2Bue/7R8Tr8MQ4qkaFOg JLG4gAxOIuYuIIn6cKLu7veE1a0RC3XgC5g79uSYq2xIc8TwRiCOfrdGk/3VPpb2Yj7Q kI+mvsejMKxkLaDJ+ri6wYLZkz/kSmpIlRNAvIwWIT2fyrwCi9/WzvPrnzlart//CQnM fRKIllbBg38PrIXehh6vIR8OUU90/L7FRoOhyC0oxORyTuA/ylMcBCZ5YoqtC//Wklxi WwEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=B3RuwYOj; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p7-20020a056402500700b00441df4d5525si11961202eda.106.2022.08.17.06.33.33; Wed, 17 Aug 2022 06:34:01 -0700 (PDT) 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=@intel.com header.s=Intel header.b=B3RuwYOj; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236509AbiHQM4L (ORCPT + 99 others); Wed, 17 Aug 2022 08:56:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239474AbiHQM4J (ORCPT ); Wed, 17 Aug 2022 08:56:09 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C33404A10F for ; Wed, 17 Aug 2022 05:56:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660740968; x=1692276968; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=eRG0+qm4oBLh6lGn6yysc7LMWTIO44vPZQRuwGAcMZY=; b=B3RuwYOjsLTAYKFZYBDGGY/zqFXw9wJynCWpW7Sbt7z/fia975RIHrqn gKVN1RUKm+6poKzGhE10dugdcZkc9Y9OlBgUK9g10SybZQ4TFtSodYMRk 7RbOJG+BHoGxc2pAXnwle1OclS0M1UDhWPqwFdK7u7K7Ra5t9I2ZMqSbB 4gwvrlEi8KJ+llCEzcK0UDHK+KAq0QLjoq4JTAJtg/I4epXpcVdzpkq3C xDbDt0r6Gxrw8/2wc0OjQDSyhVRa3zORiGmEQouBtCsdIrdQuV51X4ST6 exMTOnapeNnWeGLUWQitp/y7BS9jb93EgdlmPOPg7pikDODWfS4o3WTFJ g==; X-IronPort-AV: E=McAfee;i="6500,9779,10442"; a="378775141" X-IronPort-AV: E=Sophos;i="5.93,243,1654585200"; d="scan'208";a="378775141" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Aug 2022 05:56:08 -0700 X-IronPort-AV: E=Sophos;i="5.93,243,1654585200"; d="scan'208";a="749696078" Received: from aslawinx-mobl.ger.corp.intel.com (HELO [10.99.249.169]) ([10.99.249.169]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Aug 2022 05:56:07 -0700 Message-ID: <7324df1d-0424-a589-f7c9-df089a6cbefe@linux.intel.com> Date: Wed, 17 Aug 2022 14:56:05 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [RESEND][PATCH] ALSA: info: Fix llseek return value when using callback Content-Language: en-US To: Takashi Iwai , alsa-devel@alsa-project.org Cc: Cezary Rojewski , linux-kernel@vger.kernel.org, Jaroslav Kysela References: <20220817124924.3974577-1-amadeuszx.slawinski@linux.intel.com> From: =?UTF-8?Q?Amadeusz_S=c5=82awi=c5=84ski?= In-Reply-To: <20220817124924.3974577-1-amadeuszx.slawinski@linux.intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 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? For example lkml accepted both messages just fine... previous mail: https://lore.kernel.org/lkml/20220817124642.3974015-1-amadeuszx.slawinski@linux.intel.com/T/#u and resend: https://lore.kernel.org/lkml/20220817124924.3974577-1-amadeuszx.slawinski@linux.intel.com/T/#u