Received: by 2002:a05:7412:8d1c:b0:fa:4c10:6cad with SMTP id bj28csp43564rdb; Tue, 16 Jan 2024 14:26:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IE1k34iOZTfCT2wxmWriTiehmo4MBw8KyaN/ul9tg9F9lBC1PCZn8n4B7OMJkUCW72irmkk X-Received: by 2002:a5b:886:0:b0:dc2:1958:fb4 with SMTP id e6-20020a5b0886000000b00dc219580fb4mr2183137ybq.2.1705444008106; Tue, 16 Jan 2024 14:26:48 -0800 (PST) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id w13-20020a05622a190d00b0042826d13e34si10880869qtc.590.2024.01.16.14.26.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 14:26:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-28298-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-28298-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28298-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 F35AA1C27D1D for ; Tue, 16 Jan 2024 22:26:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 45BD53418F; Tue, 16 Jan 2024 21:29:37 +0000 (UTC) Received: from fgw21-7.mail.saunalahti.fi (fgw21-7.mail.saunalahti.fi [62.142.5.82]) (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 6427932C97 for ; Tue, 16 Jan 2024 21:29:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.142.5.82 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705440576; cv=none; b=k7t6HUR6DwpIdHrKagAiJxE+s8fZCJEgZbe5t8sULNhmLoGjdrGh8g+N4E7nExgZmJI945pFWK3ZPmX67U66bJvz127K19l4sRbvYqhlfiLrDhQDaFZ6+P3pVJv1tts5UteJi3ReTRk9aYZpiDe9SOjJje+NPxYgPk4mote7X+I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705440576; c=relaxed/simple; bh=iKqKH6e4RDFRFZxOWMGe7xqaGvkzIxvIqzTieuZVuao=; h=Received:From:Date:To:Cc:Subject:Message-ID:References: MIME-Version:Content-Type:Content-Disposition:In-Reply-To; b=JymDKSXeRfgbHGgHR4PkbjEoz/1v3ZhrSMzjY4YkxMVX0pat+MUG1ceSbiVpTBrznR+A63e+zBWqYvUQ82Tz/zT5Dt5V1nPrD7auW/OHk3ujxU7gTeymNMinQcDMljPWSCtFoAK4aLbeyGoaq5KDDpsviIsF2L6eijA0E+9ybyo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com; spf=fail smtp.mailfrom=gmail.com; arc=none smtp.client-ip=62.142.5.82 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=gmail.com Received: from localhost (88-113-24-108.elisa-laajakaista.fi [88.113.24.108]) by fgw21.mail.saunalahti.fi (Halon) with ESMTP id 56bdf0cf-b4b6-11ee-abf4-005056bdd08f; Tue, 16 Jan 2024 23:29:33 +0200 (EET) From: andy.shevchenko@gmail.com Date: Tue, 16 Jan 2024 23:29:32 +0200 To: Philipp Stanner Cc: Jonathan Corbet , Hans de Goede , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Bjorn Helgaas , Sam Ravnborg , dakr@redhat.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-pci@vger.kernel.org Subject: Re: [PATCH 04/10] pci: devres: make devres region requests consistent Message-ID: References: <20240115144655.32046-2-pstanner@redhat.com> <20240115144655.32046-6-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240115144655.32046-6-pstanner@redhat.com> Mon, Jan 15, 2024 at 03:46:15PM +0100, Philipp Stanner kirjoitti: > Now that pure managed region request functions are available, the > implementation of the hybrid-functions which are only sometimes managed > can be made more consistent and readable by wrapping those > always-managed functions. > > Implement a new pcim_ function for exclusively requested regions. > Have the pci_request / release functions call their pcim_ counterparts. > Remove the now surplus region_mask from the devres struct. .. > + if (pci_is_managed(pdev)) { > + if (exclusive == IORESOURCE_EXCLUSIVE) > + return pcim_request_region_exclusive(pdev, bar, res_name); > + else Redundant 'else' > + return pcim_request_region(pdev, bar, res_name); > + } -- With Best Regards, Andy Shevchenko