lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 7 Jan 2017 03:24:40 +0200
From:   Vladimir Zapolskiy <vz@...ia.com>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     Luis Oliveira <Luis.Oliveira@...opsys.com>,
        Wolfram Sang <wsa@...-dreams.de>,
        Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Jarkko Nikula <jarkko.nikula@...ux.intel.com>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Mika Westerberg <mika.westerberg@...ux.intel.com>,
        linux-i2c@...r.kernel.org, devicetree <devicetree@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Ramiro.Oliveira@...opsys.com, Joao Pinto <Joao.Pinto@...opsys.com>,
        CARLOS.PALMINHA@...opsys.com
Subject: Re: [PATCH] i2c: core: helper function to detect slave mode

On 01/07/2017 02:19 AM, Andy Shevchenko wrote:
> On Sat, Jan 7, 2017 at 1:43 AM, Vladimir Zapolskiy <vz@...ia.com> wrote:
>> On 01/07/2017 12:45 AM, Andy Shevchenko wrote:
>>> On Fri, Jan 6, 2017 at 11:46 PM, Vladimir Zapolskiy <vz@...ia.com> wrote:
>>>>> +     if (IS_BUILTIN(CONFIG_OF) && dev->of_node) {
>>>>
>>>> IS_BUILTIN(CONFIG_OF) looks excessive, check for non-NULL dev->of_node
>>>> should be sufficient.
>>>
>>> Sorry, but you missed the point.
>>> This will enable compile time optimization and basically be collapsed to no-op.
>>>
>>
>> Good point, do you plan to add more "IS_BUILTIN(CONFIG_OF)" checks all
>> over the code to reduce the size of the built image?
> 
> There is no black and white, don't be silly.
> 
>>
>>>>> +             }
>>>>> +     } else if (IS_BUILTIN(CONFIG_ACPI) && ACPI_HANDLE(dev)) {
>>>>> +             dev_dbg(dev, "ACPI slave is not supported yet\n");
>>>>> +     }
>>>>
>>>> If so, then it might be better to drop else-if stub for now.
>>>
>>> Please, don't.
>>>
>>
>> Why do you ask for this stub to be added?
> 
> 1. Exactly the reason you asked above. Here is the code which has
> built differently on different platforms. x86 usually is not using
> CONFIG_OF, ARM doesn't ACPI (versus ARM64). Check GPIO library for
> existing examples.

>From the context by the stub I mean dev_dbg() in i2c_slave_mode_detect()
function, I don't see a connection to GPIO library, please clarify.

> 2. We might add that support later, but here is again, just no-op.
> 
> So, what is your strong argument here against that?
> 

When the support is ready for ACPI case, you'll remove the added
dev_dbg(), and I don't see a good point by adding it temporarily.

What is wrong with the approach of adding the ACPI case handling
branch when it is ready and remove any kind of stubs right now?

On ACPI platforms the function returns 'false' always, will the
function work correctly (= corresponding to its description) as is?

PS, if it is possible, please give up on arrogance in discussion.

--
With best wishes,
Vladimir

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ