* [PATCH -next] swiotlb: drop pointless static qualifier in swiotlb_dma_supported()
@ 2019-02-14 1:41 YueHaibing
2019-02-14 7:26 ` Christoph Hellwig
2019-02-14 9:04 ` [PATCH v2 -next] swiotlb: drop pointless static qualifier in swiotlb_create_debugfs() YueHaibing
0 siblings, 2 replies; 4+ messages in thread
From: YueHaibing @ 2019-02-14 1:41 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk, Christoph Hellwig, Marek Szyprowski, Robin Murphy
Cc: YueHaibing, iommu, linux-kernel, kernel-janitors
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 <yuehaibing@huawei.com>
---
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);
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH -next] swiotlb: drop pointless static qualifier in swiotlb_dma_supported()
2019-02-14 1:41 [PATCH -next] swiotlb: drop pointless static qualifier in swiotlb_dma_supported() YueHaibing
@ 2019-02-14 7:26 ` Christoph Hellwig
2019-02-14 8:39 ` YueHaibing
2019-02-14 9:04 ` [PATCH v2 -next] swiotlb: drop pointless static qualifier in swiotlb_create_debugfs() YueHaibing
1 sibling, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2019-02-14 7:26 UTC (permalink / raw)
To: YueHaibing
Cc: Konrad Rzeszutek Wilk, Christoph Hellwig, Marek Szyprowski,
Robin Murphy, iommu, linux-kernel, kernel-janitors
On Thu, Feb 14, 2019 at 01:41:47AM +0000, 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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -next] swiotlb: drop pointless static qualifier in swiotlb_dma_supported()
2019-02-14 7:26 ` Christoph Hellwig
@ 2019-02-14 8:39 ` YueHaibing
0 siblings, 0 replies; 4+ messages in thread
From: YueHaibing @ 2019-02-14 8:39 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Konrad Rzeszutek Wilk, Marek Szyprowski, Robin Murphy, iommu,
linux-kernel, kernel-janitors
On 2019/2/14 15:26, Christoph Hellwig wrote:
> On Thu, Feb 14, 2019 at 01:41:47AM +0000, 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.
>
> .
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2 -next] swiotlb: drop pointless static qualifier in swiotlb_create_debugfs()
2019-02-14 1:41 [PATCH -next] swiotlb: drop pointless static qualifier in swiotlb_dma_supported() YueHaibing
2019-02-14 7:26 ` Christoph Hellwig
@ 2019-02-14 9:04 ` YueHaibing
1 sibling, 0 replies; 4+ messages in thread
From: YueHaibing @ 2019-02-14 9:04 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk, Christoph Hellwig, Marek Szyprowski, Robin Murphy
Cc: YueHaibing, iommu, linux-kernel, kernel-janitors
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 <yuehaibing@huawei.com>
---
v2: fix patch title
---
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);
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-02-14 9:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-14 1:41 [PATCH -next] swiotlb: drop pointless static qualifier in swiotlb_dma_supported() YueHaibing
2019-02-14 7:26 ` Christoph Hellwig
2019-02-14 8:39 ` YueHaibing
2019-02-14 9:04 ` [PATCH v2 -next] swiotlb: drop pointless static qualifier in swiotlb_create_debugfs() YueHaibing
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).