From: nsekhar@ti•com (Sekhar Nori)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH v6] ARM: omap: edma: add suspend suspend/resume hooks
Date: Wed, 27 Nov 2013 19:24:39 +0530 [thread overview]
Message-ID: <5295F99F.6010203@ti.com> (raw)
In-Reply-To: <5295F806.9030900@gmail.com>
On Wednesday 27 November 2013 07:17 PM, Daniel Mack wrote:
> Hi Sekhar,
>
> On 11/27/2013 02:35 PM, Sekhar Nori wrote:
>> On Monday 18 November 2013 03:49 AM, Daniel Mack wrote:
>
>>> +static int edma_pm_suspend(struct device *dev)
>>> +{
>>> + int j, r;
>>> +
>>> + r = pm_runtime_get_sync(dev);
>>> + if (IS_ERR_VALUE(r)) {
>>
>> So IS_ERR_VALUE() is only for functions which may return a negative
>> number outside of MAX_ERRNO as a success indication.
>> pm_runtime_get_sync() does not appear to be one of them so just use"
>>
>> if (r < 0) { .. }
>
> That's true. Thanks for catching this, I'll fix it. However, grepping
> through the tree, there are quite a lot places where the same mistake is
> made.
Yes, this is a common fallacy. Russell cleaned up a bunch of these a
while back.
>
>>> + /* Map the channel to param entry if channel mapping logic
>>> + * exist
>>> + */
>>
>> Please follow the multi-line commenting style.
>
> Can do. However, these lines in fact follow the style that is used
> throughout the entire file ;)
:) I did not compare the rest of the file, but hey the bar keep rising
all the time.
>
>> There are some checkpatch checks that result from lines like this.
>> Please fix these as well.
>>
>> CHECK: Alignment should match open parenthesis
>> #179: FILE: arch/arm/common/edma.c:1841:
>> + map_queue_tc(j, queue_tc_mapping[i][0],
>> + queue_tc_mapping[i][1]);
>
> If you say so, even though I disagree with checkpatch.pl here. The above
> is actually more readable, right? :)
In this particular case, I agree so I am okay if you keep it as is. The
rest of the two reports are valid though.
Thanks,
Sekhar
next prev parent reply other threads:[~2013-11-27 13:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-17 22:19 [PATCH v6] ARM: omap: edma: add suspend suspend/resume hooks Daniel Mack
2013-11-25 17:34 ` Joel Fernandes
2013-11-27 13:22 ` Sekhar Nori
2013-11-27 13:32 ` Daniel Mack
2013-12-03 18:24 ` Kevin Hilman
2013-11-27 13:35 ` Sekhar Nori
2013-11-27 13:47 ` Daniel Mack
2013-11-27 13:54 ` Sekhar Nori [this message]
2013-11-27 23:15 ` pm_runtime functions and IS_ERR_VALUE (was Re: [PATCH v6] ARM: omap: edma: add suspend suspend/resume hooks) Nishanth Menon
2013-11-28 13:13 ` Rafael J. Wysocki
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=5295F99F.6010203@ti.com \
--to=nsekhar@ti$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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