[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5605dae6-3dde-17f9-35c8-7973106b9bea@amd.com>
Date: Thu, 18 Mar 2021 16:16:37 +0530
From: Sanjay R Mehta <sanmehta@....com>
To: Vinod Koul <vkoul@...nel.org>
Cc: gregkh@...uxfoundation.org, dan.j.williams@...el.com,
Thomas.Lendacky@....com, Shyam-sundar.S-k@....com,
Nehal-bakulchandra.Shah@....com, robh@...nel.org,
mchehab+samsung@...nel.org, davem@...emloft.net,
linux-kernel@...r.kernel.org, dmaengine@...r.kernel.org
Subject: Re: [PATCH v7 1/3] dmaengine: ptdma: Initial driver for the AMD PTDMA
>> +#include <linux/delay.h>
>> +#include <linux/interrupt.h>
>> +#include <linux/kernel.h>
>> +#include <linux/kthread.h>
>> +#include <linux/module.h>
>> +#include <linux/pci_ids.h>
>> +#include <linux/pci.h>
>> +#include <linux/spinlock.h>
>> +#include <linux/sched.h>
>
> why do you need sched.h here?
>
>> +
>> +#include "ptdma.h"
>> +
>> +/* Ever-increasing value to produce unique unit numbers */
>> +static atomic_t pt_ordinal;
>
> What is the need of that?
>
The "pt_ordinal" is incremented for each DMA instances and its number is used only to assign device name for each instances.
This same device name is passed as a string parameter in many places in code like while using request_irq(), dma_pool_create() and in debugfs.
Also, I have implemented all of the comments for this patch except this. if this is fine, will send the next version for review.
Thanks,
Sanjay Mehta
>> +static int pt_get_irqs(struct pt_device *pt)
>> +{
>> + struct device *dev = pt->dev;
>> + int ret;
>> +
>> + ret = pt_get_msix_irqs(pt);
>> + if (!ret)
>> + return 0;
>> +
>> + /* Couldn't get MSI-X vectors, try MSI */
>> + dev_dbg(dev, "could not enable MSI-X (%d), trying MSI\n", ret);
>> + ret = pt_get_msi_irq(pt);
Powered by blists - more mailing lists