Re: [PATCH 5/5] dmaengine: ti: k3-udma: Use udma_chan instead of tchan/rchan for IO functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 07/07/2020 12.27, Grygorii Strashko wrote:
> 
> 
> On 07/07/2020 12:10, Peter Ujfalusi wrote:
>> Move the uc->tchan/rchan checks to the IO wrappers itself instead of
>> calling the functions with tchan/rchan directly.
>>
>> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@xxxxxx>
>> ---
>>   drivers/dma/ti/k3-udma.c | 163 +++++++++++++++++++--------------------
>>   1 file changed, 78 insertions(+), 85 deletions(-)
>>
>> diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c
>> index 7eae3a3d0703..8b9a3829abc2 100644
>> --- a/drivers/dma/ti/k3-udma.c
>> +++ b/drivers/dma/ti/k3-udma.c
>> @@ -282,51 +282,49 @@ static inline void udma_update_bits(void __iomem
>> *base, int reg,
>>   }
>>     /* TCHANRT */
>> -static inline u32 udma_tchanrt_read(struct udma_tchan *tchan, int reg)
>> +static inline u32 udma_tchanrt_read(struct udma_chan *uc, int reg)
>>   {
>> -    if (!tchan)
>> +    if (!uc || !uc->tchan)
>>           return 0;
> 
> In general I have no objections, but
> do you need those checks at all? can it ever happen?

right, it is highly unlikely that uc is NULL. iow it is never NULL.
I'll drop the !uc checks.

Thanks,
- Péter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki





[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux