lkml.org 
[lkml]   [2013]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] Initial support for Allwinner's Security ID fuses
On 06/06/13 21:16, Andy Shevchenko wrote:

Thank you andy for your review, I do have a few questions/comments if
you don't mind.
> On Sun, Jun 2, 2013 at 5:58 PM, Oliver Schinagl <oliver+list@schinagl.nl> wrote:
>> From: Oliver Schinagl <oliver@schinagl.nl>
<snip>
>> + if (likely((SID_SIZE))) {
>
> Extra braces.
> Use antipattern here.

While I accidentally dropped the pointer here, sorry for the confusion,
what is antipattern? I have asked around and nobody really knew.

Wikipedia mentions it as a software development thing, but you make it
sound like it is some sort of tool?

<snip>
>> + if (unlikely(!pdev->dev.of_node)) {
>> + dev_err(dev, "No devicetree data available\n");
>> + ret = -EFAULT;
>> + goto exit;
>
> Plain return here and in entire function where it applies.
Why? I know there's conflicting preferences here. The general consensus
seems, don't return mid function if you don't absolutely have to. Yet,
you make it sound, just return wherever. I take it that really is just a
preference? I think i see both constructs throughout the kernel. So one
review prefers the one method, the next the other?
<snip>
>> +
>> + ret = device_create_bin_file(dev, &sid_bin_attr);
>> + if (unlikely(ret)) {
>
> Any benifit of (un)likely in probe()?
Does it hurt however in any way though? It's just a compiler
optimization isn't it.

<snip>
>
> --
> With Best Regards,
> Andy Shevchenko
>
Thank you for your time, it is much appreciated :)

Oliver


\
 
 \ /
  Last update: 2013-06-11 00:21    [W:0.060 / U:0.592 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site