[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7b4f244d-0855-f979-414d-e2d3cb0f0c2f@ti.com>
Date: Mon, 2 Mar 2020 12:28:47 +0200
From: Peter Ujfalusi <peter.ujfalusi@...com>
To: Vinod Koul <vkoul@...nel.org>
CC: <dmaengine@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<dan.j.williams@...el.com>, <geert@...ux-m68k.org>
Subject: Re: [PATCH v4 1/2] dmaengine: Add basic debugfs support
Hi Vinod,
On 02/03/2020 9.11, Vinod Koul wrote:
>> diff --git a/drivers/dma/dmaengine.h b/drivers/dma/dmaengine.h
>> index e8a320c9e57c..72cd7fe33638 100644
>> --- a/drivers/dma/dmaengine.h
>> +++ b/drivers/dma/dmaengine.h
>> @@ -182,4 +182,10 @@ dmaengine_desc_callback_valid(struct dmaengine_desc_callback *cb)
>> struct dma_chan *dma_get_slave_channel(struct dma_chan *chan);
>> struct dma_chan *dma_get_any_slave_channel(struct dma_device *device);
>>
>> +#ifdef CONFIG_DEBUG_FS
>> +#include <linux/debugfs.h>
>> +
>> +struct dentry *dmaengine_get_debugfs_root(void);
>
> this needs to have an else defined with NULL return so that we dont
> force users to wrap the code under CONFIG_DEBUG_FS..
Drivers would anyways should have their debugfs related code wrapped
within ifdef. There is no point of having the code complied when it can
not be used (no debugfs support).
But I can add the else case if we really want to:
#ifdef CONFIG_DEBUG_FS
#include <linux/debugfs.h>
struct dentry *dmaengine_get_debugfs_root(void);
#else
struct dentry;
static inline struct dentry *dmaengine_get_debugfs_root(void)
{
return NULL;
}
#endif /* CONFIG_DEBUG_FS */
- Péter
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
Powered by blists - more mailing lists