Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp3068391rdb; Tue, 6 Feb 2024 06:26:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IFbimXl+GH/PwUcXJnO9lXcufA7PtjPCMYfAEgjlfEFaaD6gzPxNlCucNTBs/Q9qNiduJgJ X-Received: by 2002:a05:6808:21a5:b0:3bf:dead:30d9 with SMTP id be37-20020a05680821a500b003bfdead30d9mr3344651oib.44.1707229560137; Tue, 06 Feb 2024 06:26:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707229560; cv=pass; d=google.com; s=arc-20160816; b=IRugcrIbuSyHAncVge/eaGZ/g8byDuD596NZst7o7SLhCn8B+mFy+N0kSJOEkTUOtp LReY4YlSfnCepG/i1Z2G34/yKN5iPGIbNPaGcVYZZqlnDCQNTrDn+pOMEUAEEFb0kMjY DxvTDppyS6PvMfeLYNe4+mPIBGMJjJQy0gdTm2W7R8RDi+J15odxGERQoQdaiKnT/gaB RDimpf23o8F6CQrT+eyq+zOvGX79U2INdKbgtc/4MAp5fRsxIpC+IHEaAgJccfvx449d Mhss2GJWMvgdlJZxW/ivVp44fWKD6CY58R7zctQWlcM+TKmcRWFj6LUp5HCFT6AdDWSJ tNGQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:message-id:in-reply-to:subject:cc:to:date :from:dkim-signature; bh=S9I97fV7IyZngQlkkRUCW+IQbxa3BcGOHFNGm1aWFHA=; fh=7MRtlgjxK62HzhVgpr5GwN7+kjLBzhac7TvBHLFHRxU=; b=cci5wv1Q48L64kWALlM8/otV8waiCiJxJHRxeNfrW8BRwRmdCUtyBK6zpAwsa2h7hs z+ZPdeRI5l9ax2efME9dOMuW3vp3ysUFRKJND5v9WVejKPzFbVBoZwcNdXtf0FgjdQeq 2V812T0xFvBMPCgexK3HgrMSO5aDcAFFN0G2wl0yA2gqUH/bHKezlFZ8ph+pI5mWtjRv yxC3T1CZi99pD8F7Qx3CeKULnN6x6TWUV6cq7qrFQtTaBWIjlBvD8FJOMDKtfzWTOMTJ AP2NOSObRVpOx+VQ6OPPSaLppwN2uSzaQFz2j3BRM0+Ii62tdDyHhSo+da0oDf9Ur6ZP fmHw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=UkdI95DM; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-55106-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55106-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=1; AJvYcCXy9ukLSjGEloXAsjOf1bKyM4re8eSdTRYkOSTOO9OkjZGvFByQKKQq6M0XaY/DECJ886ynEemhgDoXvfDLmQPoOgkr6fXfNgTz6W0Kgw== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id e14-20020ac8598e000000b0042c38359742si941140qte.271.2024.02.06.06.25.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 06:26:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-55106-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=UkdI95DM; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-55106-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55106-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id D7DAE1C2190E for ; Tue, 6 Feb 2024 14:25:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7682C133294; Tue, 6 Feb 2024 14:25:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="UkdI95DM" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) (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 F0992132464; Tue, 6 Feb 2024 14:25:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707229515; cv=none; b=l4BMkL25NAw7zz7+IY1SLqEjgsDh/rLn+HvbLjI4ySyh0b7YPE1N10hg0uB7nFFAfo7keK/jd6rJ4qBbGhGUb6HzF0SlowG6qMaN0xVGsWcZNVhaYxE/45QsWFNxCrs6HmfPTzPVsExzizs8OCyVWGMjDrzrAXyO2B39Al1Ft5k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707229515; c=relaxed/simple; bh=0VGhK+HezmmVvyHrl6zdHaTbhG2VV9gWiHy3q9uuyQc=; h=From:Date:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=bpykOKiO16Qh4h7UygeN0XO/zoisPZ7vyWQrgxzX6HPjOjS0gh2vgS3jj/3NvC84NsgidFifeciiUNZie6sQIVhZhdCSqqGEsCpwUCwflRz/Zi0GmiZZ8NJNYBd/eTwJowLnXa+IHZ7lBCJYOY4TanTIkOkqfQAMVp0zA2Aq7fY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=UkdI95DM; arc=none smtp.client-ip=198.175.65.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707229514; x=1738765514; h=from:date:to:cc:subject:in-reply-to:message-id: references:mime-version:content-id; bh=0VGhK+HezmmVvyHrl6zdHaTbhG2VV9gWiHy3q9uuyQc=; b=UkdI95DMz3HRFW5974FB1wglCW30dtjh8odgQCHdpwAsyZ2St6kDdW+T MB5E7TCB2t9H66Lo5jVvUeN7KOXy15X4rRuRAGREEM9+Oemo6uCTiezCe lvc9AW1Xal9mj5M4pS4Gtgprh+SCWBJyJ9ja71fyKq3F5RBCRf8c5Lycf Hnd1F6aaygbjPGrQEhU+bcH8yWMlDHRAAq6tyW0bLKgsUpIf6knGkQD5V W8UZdbgnQ/1AQAB1o9DzsWq7IctBWQil0OcTeA+uxu57fJPGbQLcuQSeq U5S3/KqeuVP5jdbrYG6AVT/2c4VRvvJzZDGa91+Ey41ep2UwmYOL4pVjF Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10975"; a="918545" X-IronPort-AV: E=Sophos;i="6.05,247,1701158400"; d="scan'208";a="918545" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Feb 2024 06:25:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10975"; a="933474688" X-IronPort-AV: E=Sophos;i="6.05,247,1701158400"; d="scan'208";a="933474688" Received: from ijarvine-desk1.ger.corp.intel.com (HELO localhost) ([10.246.36.139]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Feb 2024 06:25:11 -0800 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Date: Tue, 6 Feb 2024 16:25:06 +0200 (EET) To: Sergio Paracuellos cc: Thomas Bogendoerfer , linux-mips@vger.kernel.org, LKML Subject: Re: [PATCH 3/4] MIPS: PCI: Return PCIBIOS_* from tx4927_pci_config_read/write() In-Reply-To: Message-ID: References: <20240205133450.5222-1-ilpo.jarvinen@linux.intel.com> <20240205133450.5222-4-ilpo.jarvinen@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="8323328-1474976237-1707152415=:1027" Content-ID: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-1474976237-1707152415=:1027 Content-Type: text/plain; CHARSET=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Content-ID: <76afa036-4192-9aa8-2f0d-bde05d65a403@linux.intel.com> On Mon, 5 Feb 2024, Sergio Paracuellos wrote: > On Mon, Feb 5, 2024 at 3:35=E2=80=AFPM Ilpo J=C3=A4rvinen > wrote: > > > > pci_ops .read/.write must return PCIBIOS_* codes but > > tx4927_pci_config_read/write() return -1 when mkaddr() cannot find > > devfn from the root bus. Return PCIBIOS_DEVICE_NOT_FOUND instead and > > pass that onward in the call chain instead of overwriting the return > > value. > > > > Signed-off-by: Ilpo J=C3=A4rvinen > > --- > > arch/mips/pci/ops-tx4927.c | 14 +++++++++----- > > 1 file changed, 9 insertions(+), 5 deletions(-) > > > > diff --git a/arch/mips/pci/ops-tx4927.c b/arch/mips/pci/ops-tx4927.c > > index f7802f100401..4dd8b93985fb 100644 > > --- a/arch/mips/pci/ops-tx4927.c > > +++ b/arch/mips/pci/ops-tx4927.c > > @@ -60,7 +60,7 @@ static int mkaddr(struct pci_bus *bus, unsigned int d= evfn, int where, > > { > > if (bus->parent =3D=3D NULL && > > devfn >=3D PCI_DEVFN(TX4927_PCIC_MAX_DEVNU, 0)) > > - return -1; > > + return PCIBIOS_DEVICE_NOT_FOUND; > > __raw_writel(((bus->number & 0xff) << 0x10) > > | ((devfn & 0xff) << 0x08) | (where & 0xfc) > > | (bus->parent ? 1 : 0), >=20 > Should we also return PCIBIOS_SUCCESSFUL instead of 'return 0' in > 'mkaddr' for coherency? Yeah right, I'll change it too. I didn't take notice of that because the reason for all this is that I=20 intend to convert these functions to return generic errno and push the=20 PCIBIOS error code -> errno conversion into where it's really needed (real= =20 PCIBIOS access functions in arch/x86/pci/pcbios.c). Returning 0 as literal= =20 is very common cosmetic "error" in these functions. While calculating the= =20 error rate in return values of these functions (I'm able to do that=20 because of the audit), those were not even included to 15% returning=20 -Esomething instead of PCIBIOS_*. It would be way above that if I'd count= =20 return 0 also as an error. > Other than that, changes look good to me. >=20 > Reviewed-by: Sergio Paracuellos Thanks for the review. --=20 i. --8323328-1474976237-1707152415=:1027--