From: Punit Agrawal <punitagrawal@gmail.com>
To: John Kacur <jkacur@redhat.com>
Cc: linux-rt-users@vger.kernel.org, daniel.sangorrin@toshiba.co.jp,
Punit Agrawal <punit1.agrawal@toshiba.co.jp>,
Suresh Hegde <suresh.c11@toshiba-tsip.com>
Subject: Re: [PATCH v2] rt-tests: hwlatdetect: Gracefully handle lack of /dev/cpu_dma_latency
Date: Wed, 29 Sep 2021 09:10:21 +0900 [thread overview]
Message-ID: <87bl4c5jiq.fsf@stealth> (raw)
In-Reply-To: <d150ec8a-73ba-53e7-4854-36eb82404c7@redhat.com> (John Kacur's message of "Tue, 28 Sep 2021 19:25:50 -0400 (EDT)")
John Kacur <jkacur@redhat.com> 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.
>
[...]
prev parent reply other threads:[~2021-09-29 0:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-28 8:17 [PATCH] rt-tests: hwlatdetect: Gracefully handle lack of /dev/cpu_dma_latency Punit Agrawal
2021-09-28 8:59 ` [PATCH v2] " Punit Agrawal
2021-09-28 14:34 ` John Kacur
2021-09-28 22:48 ` Punit Agrawal
2021-09-28 23:25 ` John Kacur
2021-09-29 0:10 ` Punit Agrawal [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bl4c5jiq.fsf@stealth \
--to=punitagrawal@gmail.com \
--cc=daniel.sangorrin@toshiba.co.jp \
--cc=jkacur@redhat.com \
--cc=linux-rt-users@vger.kernel.org \
--cc=punit1.agrawal@toshiba.co.jp \
--cc=suresh.c11@toshiba-tsip.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox