LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: "David E. Box" <david.e.box@linux.intel.com>,
	lee.jones@linaro.org, mgross@linux.intel.com,
	bhelgaas@google.com, srinivas.pandruvada@intel.com,
	andy.shevchenko@gmail.com
Cc: linux-kernel@vger.kernel.org,
	platform-driver-x86@vger.kernel.org, linux-pci@vger.kernel.org
Subject: Re: [PATCH v2 4/5] platform/x86: intel_pmt_telemetry: Ignore zero sized entries
Date: Wed, 18 Aug 2021 09:52:05 +0200	[thread overview]
Message-ID: <c1a8e066-ef99-911c-1b82-6e8da62e935a@redhat.com> (raw)
In-Reply-To: <20210817224018.1013192-5-david.e.box@linux.intel.com>

Hi,

On 8/18/21 12:40 AM, David E. Box wrote:
> Some devices may expose non-functioning entries that are reserved for
> future use. These entries have zero size. Ignore them during probe.
> 
> Signed-off-by: David E. Box <david.e.box@linux.intel.com>

Thank you for your patch, I've applied this patch to my review-hans 
branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans

Note it will show up in my review-hans branch once I've pushed my
local branch there, which might take a while.

Once I've run some tests on this branch the patches there will be
added to the platform-drivers-x86/for-next branch and eventually
will be included in the pdx86 pull-request to Linus for the next
merge-window.

Regards,

Hans


> ---
> 
> V2:	New patch
> 
>  drivers/platform/x86/intel/pmt/telemetry.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/platform/x86/intel/pmt/telemetry.c b/drivers/platform/x86/intel/pmt/telemetry.c
> index 3559f6e7b388..d93d02672679 100644
> --- a/drivers/platform/x86/intel/pmt/telemetry.c
> +++ b/drivers/platform/x86/intel/pmt/telemetry.c
> @@ -61,6 +61,14 @@ static int pmt_telem_header_decode(struct intel_pmt_entry *entry,
>  	/* Size is measured in DWORDS, but accessor returns bytes */
>  	header->size = TELEM_SIZE(readl(disc_table));
>  
> +	/*
> +	 * Some devices may expose non-functioning entries that are
> +	 * reserved for future use. They have zero size. Do not fail
> +	 * probe for these. Just ignore them.
> +	 */
> +	if (header->size == 0)
> +		return 1;
> +
>  	return 0;
>  }
>  
> 


  reply	other threads:[~2021-08-18  7:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-17 22:40 [PATCH v2 0/5] MFD: intel_pmt: Add general DVSEC/VSEC support David E. Box
2021-08-17 22:40 ` [PATCH v2 1/5] PCI: Add #defines for accessing PCIE DVSEC fields David E. Box
2021-08-17 22:40 ` [PATCH v2 2/5] MFD: intel_pmt: Support non-PMT capabilities David E. Box
2021-08-17 22:40 ` [PATCH v2 3/5] MFD: intel_pmt: Add support for PCIe VSEC structures David E. Box
2021-08-17 22:40 ` [PATCH v2 4/5] platform/x86: intel_pmt_telemetry: Ignore zero sized entries David E. Box
2021-08-18  7:52   ` Hans de Goede [this message]
2021-08-17 22:40 ` [PATCH v2 5/5] MFD: intel_pmt: Add DG2 support David E. Box
2021-08-18  7:51 ` [PATCH v2 0/5] MFD: intel_pmt: Add general DVSEC/VSEC support Hans de Goede
2021-08-19  9:36   ` Lee Jones

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=c1a8e066-ef99-911c-1b82-6e8da62e935a@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=david.e.box@linux.intel.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mgross@linux.intel.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=srinivas.pandruvada@intel.com \
    --subject='Re: [PATCH v2 4/5] platform/x86: intel_pmt_telemetry: Ignore zero sized entries' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).