Re: [PATCH -next] swiotlb: drop pointless static qualifier in swiotlb_dma_supported()

2019-02-14 Thread YueHaibing
On 2019/2/14 15:26, Christoph Hellwig wrote:
> On Thu, Feb 14, 2019 at 01:41:47AM +, YueHaibing wrote:
>> There is no need to have the 'struct dentry *d_swiotlb_usage' variable
>> static since new value always be assigned before use it.
> 
> FYI, this is in swiotlb_create_debugfs, not swiotlb_dma_supported.

Thank you, I will fix it.

> 
> .
> 

___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


Re: [PATCH -next] swiotlb: drop pointless static qualifier in swiotlb_dma_supported()

2019-02-13 Thread Christoph Hellwig
On Thu, Feb 14, 2019 at 01:41:47AM +, YueHaibing wrote:
> There is no need to have the 'struct dentry *d_swiotlb_usage' variable
> static since new value always be assigned before use it.

FYI, this is in swiotlb_create_debugfs, not swiotlb_dma_supported.
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


[PATCH -next] swiotlb: drop pointless static qualifier in swiotlb_dma_supported()

2019-02-13 Thread YueHaibing
There is no need to have the 'struct dentry *d_swiotlb_usage' variable
static since new value always be assigned before use it.

Signed-off-by: YueHaibing 
---
 kernel/dma/swiotlb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c
index a7b53786db9f..02fa517c47d9 100644
--- a/kernel/dma/swiotlb.c
+++ b/kernel/dma/swiotlb.c
@@ -689,7 +689,7 @@ swiotlb_dma_supported(struct device *hwdev, u64 mask)
 
 static int __init swiotlb_create_debugfs(void)
 {
-   static struct dentry *d_swiotlb_usage;
+   struct dentry *d_swiotlb_usage;
struct dentry *ent;
 
d_swiotlb_usage = debugfs_create_dir("swiotlb", NULL);





___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu