Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5447429pxv; Wed, 28 Jul 2021 10:56:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwhlMjtnITCuHLQUPVSr4D5l1j7Z3vJDE5hHPJoJZqK88cl5i+MS65TDP2WlInRehheEOlN X-Received: by 2002:a05:6e02:60c:: with SMTP id t12mr698809ils.121.1627495015445; Wed, 28 Jul 2021 10:56:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627495015; cv=none; d=google.com; s=arc-20160816; b=Oo8Tp6wzMCbsXC3NKyLKcHViCgPKZTDsakdtG8s0VKh+KE6BvPJncaPnMPfax4oii6 BXA0tpuoFcJce79mGxfyI6ZJOEV2h1Abhp9YvOmTk4+foYGXo4Gh/gh36dLdyKzaXamV qGz9RiC/6OrTCU3XXr+w3yyHoYt/yMMsfOH8c5daAZMoiQMbuk6HVkSJKMyDLWvT9zkM nYZAAb51mCF7IcvWyJjZANrvs9Wln81+okRSZKnsLTrCRw7VHCKKaFgVN19E6FyuJm2J 6euQZvI84sSf5INp1b/ftcuuR2CN79oTXpfMX9E70UyZB1lHtWbk8kaxxBwKADXFupeG kX1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=q05yqAu8ME3RCtFdzSAF1FWQTEcma/V/l7m5UOE1MSo=; b=FVkAuvCcJ3Nohb7CKwMP8C3peJRsKXGvI0ZUS4BrWvHtbSyBqRek7McyroH96ypRF0 gk7alLIxJPg/6b3Sc2wseIV4kP+KbBAldv+foUXay+ilxZT4IG7A2BbJbkUb2NdkJ41D 63YSXOyl8knuebi8ca0t6UmjXnsF6QoFG44dyI90+wL3ksoer8kFxCY8rg9kyiOwnBdK jGF2MZQkURMkBm75Q8UIenfvb03Ye7pXB2BYzClQugK99TD5dyLefVKBcps6dOb1kc5e jAXlXnf3VQpVLbt2h+WJ4BR11FdxAYgoeE1tAAzgPbvL1FXi8xLReqZ/4cjN6irqxLNi d6wA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NBwah9bZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b4si552476jat.6.2021.07.28.10.56.44; Wed, 28 Jul 2021 10:56:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NBwah9bZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229581AbhG1Rza (ORCPT + 99 others); Wed, 28 Jul 2021 13:55:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:39374 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231222AbhG1Rz2 (ORCPT ); Wed, 28 Jul 2021 13:55:28 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C335D61050; Wed, 28 Jul 2021 17:55:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1627494926; bh=eR8Mb5mftbz5DEwh6BIcjxWxE2NDjLa/HY+rtPuS9Vc=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=NBwah9bZgNw8mAa/hy200SaKVPPUf1pG5zNHfsFuI7DCrIdyePnsfyF2sXrGWm4O5 BHzg3H5l5A8IKUCzt15r6OYMiPLUSPnfQkAoyp6Bz+VFoas/XkFnd1eigmYIlgTbRs cT78xYg68AOSUrm2j6jmU1NMkud+PR/zFJOznMttNDBx8kGW654eekl0zrf6Dis7CB aHmylcxM+f/sch4yg1QMBKL9Esh1DEAX22aMJ8/bn4Z9ED9mBAmjlbRZmjcLvROTH/ wpO++JjkQMyJg7ZM+SIavBU+futcLJfhqud03dX1cswHe9Nz9jmZmjILFXIWUUhbvK xW7FIZWiotJDw== Date: Wed, 28 Jul 2021 12:55:24 -0500 From: Bjorn Helgaas To: Amey Narkhede Cc: alex.williamson@redhat.com, Raphael Norwitz , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, kw@linux.com, Shanker Donthineni , Sinan Kaya , Len Brown , "Rafael J . Wysocki" Subject: Re: [PATCH v10 8/8] PCI: Change the type of probe argument in reset functions Message-ID: <20210728175524.GA834270@bjorn-Precision-5520> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210728173514.77yiv2vjvjpf6ao5@archlinux> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 28, 2021 at 11:05:14PM +0530, Amey Narkhede wrote: > On 21/07/27 05:22PM, Bjorn Helgaas wrote: > > On Fri, Jul 09, 2021 at 06:08:13PM +0530, Amey Narkhede wrote: > > > Introduce a new enum pci_reset_mode_t to make the context of probe argument > > > in reset functions clear and the code easier to read. Change the type of > > > probe argument in functions which implement reset methods from int to > > > pci_reset_mode_t to make the intent clear. > > > > Not sure adding an enum and a PCI_RESET_MODE_MAX seems worth it to me. > > It's really a boolean parameter, and I'd be happy to change it to a > > bool. But I don't think it's worth checking against > > PCI_RESET_MODE_MAX unless we need more than two options. > > > Is it okay to use PCI_RESET_PROBE and PCI_RESET_DO_RESET as bool. > That would be less confusing than directly using true/false. You mean like this? #define PCI_RESET_DO_RESET false #define PCI_RESET_PROBE true I don't think there's a huge amount of value, but I guess that's OK as long as it's confined to drivers/pci/, i.e., not exposed via include/linux/pci.h.