All of lore.kernel.org
 help / color / mirror / Atom feed
From: Scott Bruce <smbruce@gmail.com>
To: Sanket Goswami <Sanket.Goswami@amd.com>
Cc: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>,
	hdegoede@redhat.com, mgross@linux.intel.com,
	platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH v5 2/3] platform/x86: amd-pmc: Store the pci_dev instance inside struct amd_pmc_dev
Date: Fri, 29 Oct 2021 16:27:56 -0700	[thread overview]
Message-ID: <CAPOoXdGt7vnbM9_gEiz84_M3wsYEADLs9hGdT0ch4kVKPauo8g@mail.gmail.com> (raw)
In-Reply-To: <20211029172304.2998-3-Sanket.Goswami@amd.com>

Tested-by: Scott Bruce <smbruce@gmail.com>

On Fri, Oct 29, 2021 at 10:25 AM Sanket Goswami <Sanket.Goswami@amd.com> wrote:
>
> Store the root port information in amd_pmc_probe() so that the
> information can be used across multiple routines.
>
> Signed-off-by: Sanket Goswami <Sanket.Goswami@amd.com>
> ---
> Changes in v5:
> - Remove pci_dev_put() from amd_pmc_remove() as its no longer required.
>
> Changes in v4:
> - No change.
>
> Changes in v3:
> - Add pci_dev_put() in amd_pmc_remove().
>
> Changes in v2:
> - Store the rdev info in amd_pmc_probe() as suggested by Hans.
>
>  drivers/platform/x86/amd-pmc.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/platform/x86/amd-pmc.c b/drivers/platform/x86/amd-pmc.c
> index 9af02860ed59..ea099f7759f2 100644
> --- a/drivers/platform/x86/amd-pmc.c
> +++ b/drivers/platform/x86/amd-pmc.c
> @@ -121,6 +121,7 @@ struct amd_pmc_dev {
>         u16 minor;
>         u16 rev;
>         struct device *dev;
> +       struct pci_dev *rdev;
>         struct mutex lock; /* generic mutex lock */
>  #if IS_ENABLED(CONFIG_DEBUG_FS)
>         struct dentry *dbgfs_dir;
> @@ -538,6 +539,7 @@ static int amd_pmc_probe(struct platform_device *pdev)
>         }
>
>         dev->cpu_id = rdev->device;
> +       dev->rdev = rdev;
>         err = pci_write_config_dword(rdev, AMD_PMC_SMU_INDEX_ADDRESS, AMD_PMC_BASE_ADDR_LO);
>         if (err) {
>                 dev_err(dev->dev, "error writing to 0x%x\n", AMD_PMC_SMU_INDEX_ADDRESS);
> --
> 2.25.1
>

  reply	other threads:[~2021-10-29 23:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-29 17:23 [PATCH v5 0/3] Updates to amd-pmc driver Sanket Goswami
2021-10-29 17:23 ` [PATCH v5 1/3] platform/x86: amd-pmc: Simplify error handling path Sanket Goswami
2021-10-29 23:27   ` Scott Bruce
2021-10-29 17:23 ` [PATCH v5 2/3] platform/x86: amd-pmc: Store the pci_dev instance inside struct amd_pmc_dev Sanket Goswami
2021-10-29 23:27   ` Scott Bruce [this message]
2021-11-16 13:31   ` Hans de Goede
2021-11-30 11:25     ` Goswami, Sanket
2021-10-29 17:23 ` [PATCH v5 3/3] platform/x86: amd-pmc: Add support for AMD Smart Trace Buffer Sanket Goswami
2021-10-29 23:26   ` Scott Bruce
2021-11-03 18:39   ` Limonciello, Mario

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=CAPOoXdGt7vnbM9_gEiz84_M3wsYEADLs9hGdT0ch4kVKPauo8g@mail.gmail.com \
    --to=smbruce@gmail.com \
    --cc=Sanket.Goswami@amd.com \
    --cc=Shyam-sundar.S-k@amd.com \
    --cc=hdegoede@redhat.com \
    --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.