DMA Engine development
 help / color / mirror / Atom feed
* [4/5] dma: tegra: reduce channel name field size
@ 2018-11-21 16:13 Ben Dooks
  0 siblings, 0 replies; 4+ messages in thread
From: Ben Dooks @ 2018-11-21 16:13 UTC (permalink / raw)
  To: dan.j.williams, vkoul, dmaengine
  Cc: ldewangan, linux-tegra, jonathanh, Ben Dooks

The name field is used for "apbdma.%d" which is rarely going to be
more than 10 bytes, so reduce the size from 30 to 12. This is only
being used by the interrupt registration, so is not critical to the
operation of the driver either.

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
 drivers/dma/tegra20-apb-dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c
index ec8938a2ecab..c60c3f7cad5f 100644
--- a/drivers/dma/tegra20-apb-dma.c
+++ b/drivers/dma/tegra20-apb-dma.c
@@ -186,7 +186,7 @@ typedef void (*dma_isr_handler)(struct tegra_dma_channel *tdc,
 /* tegra_dma_channel: Channel specific information */
 struct tegra_dma_channel {
 	struct dma_chan		dma_chan;
-	char			name[30];
+	char			name[12];
 	bool			config_init;
 	int			id;
 	int			irq;

^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [4/5] dma: tegra: reduce channel name field size
@ 2018-11-22  9:26 Jon Hunter
  0 siblings, 0 replies; 4+ messages in thread
From: Jon Hunter @ 2018-11-22  9:26 UTC (permalink / raw)
  To: ben.dooks
  Cc: dan.j.williams, vkoul, dmaengine, ldewangan, linux-tegra,
	Jon Hunter

On Wed, Nov 21, 2018 at 4:15 PM Ben Dooks <ben.dooks@codethink.co.uk> wrote:
>
> The name field is used for "apbdma.%d" which is rarely going to be
> more than 10 bytes, so reduce the size from 30 to 12. This is only
> being used by the interrupt registration, so is not critical to the
> operation of the driver either.

Do you mean 'never' above instead of 'rarely'? The max number of
channels is never more than 2 digits and so the change is fine with
me. So for the change ...

Acked-by: Jon Hunter <jonathanh@nvidia.com>

Cheers
Jon

^ permalink raw reply	[flat|nested] 4+ messages in thread
* [4/5] dma: tegra: reduce channel name field size
@ 2018-11-22 15:14 Ben Dooks
  0 siblings, 0 replies; 4+ messages in thread
From: Ben Dooks @ 2018-11-22 15:14 UTC (permalink / raw)
  To: Jon Hunter
  Cc: dan.j.williams, vkoul, dmaengine, ldewangan, linux-tegra,
	Jon Hunter

On 22/11/2018 09:26, Jon Hunter wrote:
> On Wed, Nov 21, 2018 at 4:15 PM Ben Dooks <ben.dooks@codethink.co.uk> wrote:
>>
>> The name field is used for "apbdma.%d" which is rarely going to be
>> more than 10 bytes, so reduce the size from 30 to 12. This is only
>> being used by the interrupt registration, so is not critical to the
>> operation of the driver either.
> 
> Do you mean 'never' above instead of 'rarely'? The max number of
> channels is never more than 2 digits and so the change is fine with
> me. So for the change ...

I've never seen a system with more than 64 channels in it, but it didn't
seem worth trying to get it below 12 anyway.

^ permalink raw reply	[flat|nested] 4+ messages in thread
* [4/5] dma: tegra: reduce channel name field size
@ 2018-11-22 15:24 Jon Hunter
  0 siblings, 0 replies; 4+ messages in thread
From: Jon Hunter @ 2018-11-22 15:24 UTC (permalink / raw)
  To: Ben Dooks, Jon Hunter
  Cc: dan.j.williams, vkoul, dmaengine, ldewangan, linux-tegra

On 22/11/2018 15:14, Ben Dooks wrote:
> On 22/11/2018 09:26, Jon Hunter wrote:
>> On Wed, Nov 21, 2018 at 4:15 PM Ben Dooks <ben.dooks@codethink.co.uk>
>> wrote:
>>>
>>> The name field is used for "apbdma.%d" which is rarely going to be
>>> more than 10 bytes, so reduce the size from 30 to 12. This is only
>>> being used by the interrupt registration, so is not critical to the
>>> operation of the driver either.
>>
>> Do you mean 'never' above instead of 'rarely'? The max number of
>> channels is never more than 2 digits and so the change is fine with
>> me. So for the change ...
> 
> I've never seen a system with more than 64 channels in it, but it didn't
> seem worth trying to get it below 12 anyway.

I see. If you look at the 'nr_channels' definition for the various Tegra
devices that use this driver, there is nothing more than 32. So for this
driver the max is 32. Newer Tegra devices are not using this anymore and
so in the case of this specific driver we can say 'never' (although I
understand now you meant rarely in the general case).

Cheers Jon

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-11-22 15:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-21 16:13 [4/5] dma: tegra: reduce channel name field size Ben Dooks
  -- strict thread matches above, loose matches on Subject: below --
2018-11-22  9:26 Jon Hunter
2018-11-22 15:14 Ben Dooks
2018-11-22 15:24 Jon Hunter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox