All of lore.kernel.org
 help / color / mirror / Atom feed
From: "David E. Box" <david.e.box@linux.intel.com>
To: lee.jones@linaro.org, hdegoede@redhat.com, mgross@linux.intel.com
Cc: "David E. Box" <david.e.box@linux.intel.com>,
	linux-kernel@vger.kernel.org,
	platform-driver-x86@vger.kernel.org
Subject: [PATCH V2 1/2] MFD: intel_pmt: Fix nuisance messages and handling of disabled capabilities
Date: Wed, 24 Feb 2021 12:10:04 -0800	[thread overview]
Message-ID: <20210224201005.1034005-1-david.e.box@linux.intel.com> (raw)
In-Reply-To: <20210128172846.99352-1-david.e.box@linux.intel.com>

Some products will be available that have PMT capabilities that are not
supported. Remove the warnings in this instance to avoid nuisance messages
and confusion.

Also return an error code for capabilities that are disabled by quirk to
prevent them from keeping the driver loaded if only disabled capabilities
are found.

Fixes: 4f8217d5b0ca ("mfd: Intel Platform Monitoring Technology support")
Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
---
For merge in platform-drivers-x86

Based on 5.11-rc1 review-hans branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans

Changes from V1:

	- None. Patch 2 added.

 drivers/mfd/intel_pmt.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/mfd/intel_pmt.c b/drivers/mfd/intel_pmt.c
index 744b230cdcca..65da2b17a204 100644
--- a/drivers/mfd/intel_pmt.c
+++ b/drivers/mfd/intel_pmt.c
@@ -79,19 +79,18 @@ static int pmt_add_dev(struct pci_dev *pdev, struct intel_dvsec_header *header,
 	case DVSEC_INTEL_ID_WATCHER:
 		if (quirks & PMT_QUIRK_NO_WATCHER) {
 			dev_info(dev, "Watcher not supported\n");
-			return 0;
+			return -EINVAL;
 		}
 		name = "pmt_watcher";
 		break;
 	case DVSEC_INTEL_ID_CRASHLOG:
 		if (quirks & PMT_QUIRK_NO_CRASHLOG) {
 			dev_info(dev, "Crashlog not supported\n");
-			return 0;
+			return -EINVAL;
 		}
 		name = "pmt_crashlog";
 		break;
 	default:
-		dev_err(dev, "Unrecognized PMT capability: %d\n", id);
 		return -EINVAL;
 	}
 
@@ -174,12 +173,8 @@ static int pmt_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 		header.offset = INTEL_DVSEC_TABLE_OFFSET(table);
 
 		ret = pmt_add_dev(pdev, &header, quirks);
-		if (ret) {
-			dev_warn(&pdev->dev,
-				 "Failed to add device for DVSEC id %d\n",
-				 header.id);
+		if (ret)
 			continue;
-		}
 
 		found_devices = true;
 	} while (true);

base-commit: a7d53dbbc70a81d5781da7fc905b656f41ad2381
-- 
2.25.1


  parent reply	other threads:[~2021-02-24 20:16 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-28 17:28 [PATCH] MFD: intel_pmt: Fix nuisance messages and handling of disabled capabilities David E. Box
2021-02-02 14:22 ` Hans de Goede
2021-02-24 20:10 ` David E. Box [this message]
2021-02-24 20:22   ` [PATCH V2 1/2] " Hans de Goede
2021-02-24 23:01     ` David E. Box
2021-03-09 18:12   ` [GIT PULL] Immutable branch between MFD and Platform/X86 due for the v5.13 merge window Lee Jones
2021-03-09 18:59     ` Hans de Goede
2021-03-09 19:17       ` Lee Jones
2021-03-09 20:06         ` Lee Jones
2021-03-10 10:57     ` [GIT PULL v2] " Lee Jones
2021-03-18 11:02       ` Hans de Goede
2021-02-24 20:10 ` [PATCH 2/2 V2] MFD: intel_pmt: Add support for DG1 David E. Box
2021-03-09 16:45   ` Lee Jones
2021-03-09 17:27     ` David E. Box
2021-03-09 18:13       ` Lee Jones
2021-03-09 19:52         ` [PATCH V3 1/2] MFD: intel_pmt: Fix nuisance messages and handling of disabled capabilities David E. Box
2021-03-09 19:52         ` [PATCH V3 2/2] MFD: intel_pmt: Add support for DG1 David E. Box

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210224201005.1034005-1-david.e.box@linux.intel.com \
    --to=david.e.box@linux.intel.com \
    --cc=hdegoede@redhat.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgross@linux.intel.com \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.