Re: [PATCH v2] rt-tests: hwlatdetect: Gracefully handle lack of /dev/cpu_dma_latency

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

 



John Kacur <jkacur@xxxxxxxxxx> writes:

> On Wed, 29 Sep 2021, Punit Agrawal wrote:
>

[...]

>> > Thanks! I have a couple of nit-picky suggestions.
>> >
>> > If you initialize self.dma_latency_handle = None in the init method of 
>> > class Detector, then you can drop the else part of your check to see if 
>> > the file exists.
>> 
>> I can do that - but then I wonder if there is any harm in initialising
>> the file handle in the init method itself too. That way
>> c_states_[off|on]() can focus on doing their thing after checking the
>> handle is not null.
>
> I mean I suppose it would work, but I wouldn't consider it great style, 
> I think of the init as a place for basic declarations and
> initializations.

I don't have a strong preference here - so I'll go with your suggestion.

Thanks.

> Anyway, I'll have a look at whatever way you decide to go.
>

[...]




[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux