From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0ECD93E51DE for ; Wed, 3 Jun 2026 16:53:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.10 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780505633; cv=none; b=MwlB0Z2NfpYiztsOwSt6Mr3lwMAOc/rFeKLOPwshsxY+qK0zA9DhWEBhHpkrolkbNR95EPA3TzkSnXINfgcxsyWj+10CwPpMF8WdDrg4h9IEB0Oo1AHyZqc7pmBJB2S7Uu0Q4tse2FlRUip33I0oNwDepV2lidltzJkM4cXaShU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780505633; c=relaxed/simple; bh=vGW8kA/prUJxEIUvfxVBWUvpsNjeOxq7YOB4foxd/xs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=PFdW/VKiG9/vW16FDiYeNs9PnZio1cCSaDAlTw59uUK6qf82aMdVDsjvDtG3sRiQL3SKEINJZFUityIxjGy8OTHbD8vi/K5eIx2QnxbY/9fuCVUD92UVuUGxq6ui9iNxlLr2RbLz3N2pH1iLCNVuRh4OA6cChwBH1bYnKVkAue4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Yw++jOhj; arc=none smtp.client-ip=192.198.163.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Yw++jOhj" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1780505632; x=1812041632; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=vGW8kA/prUJxEIUvfxVBWUvpsNjeOxq7YOB4foxd/xs=; b=Yw++jOhj5CTN5CHp6w7I7OPLUhgNfKt1yRoUo/uO9B+e30C3mHnwGpJS u6NrdmjBsK4XKEhQUvgTN3BdxurAWzuyq5mSEKASulZcBaL/MC5DEkL+e wO1dcyqX+1m/Eb1lPRvxiz09KuAmyjHO5T9gZ5oJPXP7LGHgBK1dRHXzi Fv3AL7rd1DCyEcZYR7220YniAe1k0RwyF96GKUVSQAnZbUy1klobOYgN3 4n2JNP/8DerfOlp93PfsECgWHrmgq2axyQX8Tz3iJ1vqJlgy9r9gfpUeq wibLuCS5gDgk33yyHDbinoQoRlOSOxAorHxyzpDGRsJzLM708fuQ9pqw+ w==; X-CSE-ConnectionGUID: GOgvnMaSRUyw6LBwajIewA== X-CSE-MsgGUID: qb7qgImESICeCOrkBM1jTQ== X-IronPort-AV: E=McAfee;i="6800,10657,11806"; a="92698404" X-IronPort-AV: E=Sophos;i="6.24,185,1774335600"; d="scan'208";a="92698404" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jun 2026 09:53:51 -0700 X-CSE-ConnectionGUID: 7SZeEUmNQOqevpOK4Pnzww== X-CSE-MsgGUID: G8IVAMppQVyh5DE4WmZLNw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.24,185,1774335600"; d="scan'208";a="240106888" Received: from dnelso2-mobl.amr.corp.intel.com (HELO [10.125.108.116]) ([10.125.108.116]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jun 2026 09:53:51 -0700 Message-ID: <192106d4-a716-4a72-be23-0b1cf69dc60f@intel.com> Date: Wed, 3 Jun 2026 09:53:49 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] fwctl/pds: propagate actual error code instead of hardcoded -ENOMEM To: Jackie Liu , brett.creeley@amd.com Cc: linux-kernel@vger.kernel.org References: <20260603012219.90498-1-liu.yun@linux.dev> Content-Language: en-US From: Dave Jiang In-Reply-To: <20260603012219.90498-1-liu.yun@linux.dev> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 6/2/26 6:22 PM, Jackie Liu wrote: > From: Jackie Liu > > When pdsfc_get_operations() fails in pdsfc_validate_rpc(), the > function hardcodes the return value to -ENOMEM regardless of the > actual failure. pdsfc_get_operations() can return various errors > from the adminq command (e.g. -ETIMEDOUT, -EIO, -ENODEV) or from > DMA mapping failure (-ENOMEM). Propagate the actual error via > PTR_ERR(operations) so userspace and debugging tools see the correct > failure reason. > > Fixes: 92c66ee829b9 ("pds_fwctl: add rpc and query support") > Signed-off-by: Jackie Liu Reviewed-by: Dave Jiang > --- > drivers/fwctl/pds/main.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/fwctl/pds/main.c b/drivers/fwctl/pds/main.c > index 68fe254dd10a..a4e80cfa3c50 100644 > --- a/drivers/fwctl/pds/main.c > +++ b/drivers/fwctl/pds/main.c > @@ -325,7 +325,7 @@ static int pdsfc_validate_rpc(struct pdsfc_dev *pdsfc, > rpc->in.ep); > if (IS_ERR(operations)) { > mutex_unlock(&ep_info->lock); > - return -ENOMEM; > + return PTR_ERR(operations); > } > ep_info->operations = operations; > }