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] [day] [month] [year] [list]
Message-ID: <cca8cffb-b6f6-2fbb-f7a2-151b4380b2f6@ti.com>
Date:   Fri, 31 Mar 2023 17:04:27 +0530
From:   Md Danish Anwar <a0501179@...com>
To:     Mathieu Poirier <mathieu.poirier@...aro.org>
CC:     MD Danish Anwar <danishanwar@...com>,
        "Andrew F. Davis" <afd@...com>, Suman Anna <s-anna@...com>,
        Roger Quadros <rogerq@...nel.org>,
        Vignesh Raghavendra <vigneshr@...com>,
        Tero Kristo <kristo@...nel.org>,
        Bjorn Andersson <andersson@...nel.org>,
        Santosh Shilimkar <ssantosh@...nel.org>,
        Nishanth Menon <nm@...com>, <linux-remoteproc@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>, <linux-omap@...r.kernel.org>,
        <srk@...com>, <devicetree@...r.kernel.org>,
        <netdev@...r.kernel.org>
Subject: Re: [EXTERNAL] Re: [PATCH v5 3/5] soc: ti: pruss: Add
 pruss_cfg_read()/update() API

Hi Mathieu,

On 31/03/23 15:52, Md Danish Anwar wrote:
> On 30/03/23 19:51, Mathieu Poirier wrote:
>> On Thu, 30 Mar 2023 at 04:00, Md Danish Anwar <a0501179@...com> wrote:
>>>
>>> Hi Mathieu,
>>>
>>> On 28/03/23 02:31, Mathieu Poirier wrote:
>>>> On Thu, Mar 23, 2023 at 11:54:49AM +0530, MD Danish Anwar wrote:
>>>>> From: Suman Anna <s-anna@...com>
>>>>>
>>>>> Add two new generic API pruss_cfg_read() and pruss_cfg_update() to
>>>>> the PRUSS platform driver to read and program respectively a register
>>>>> within the PRUSS CFG sub-module represented by a syscon driver.
>>>>>
>>>>> These APIs are internal to PRUSS driver. Various useful registers
>>>>> and macros for certain register bit-fields and their values have also
>>>>> been added.
>>>>>
>>>>> Signed-off-by: Suman Anna <s-anna@...com>
>>>>> Co-developed-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@...aro.org>
>>>>> Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@...aro.org>
>>>>> Signed-off-by: Puranjay Mohan <p-mohan@...com>
>>>>> Signed-off-by: MD Danish Anwar <danishanwar@...com>
>>>>> ---
>>>>>  drivers/soc/ti/pruss.c |   1 +
>>>>>  drivers/soc/ti/pruss.h | 112 +++++++++++++++++++++++++++++++++++++++++
>>>>>  2 files changed, 113 insertions(+)
>>>>>  create mode 100644 drivers/soc/ti/pruss.h
>>>>>
>>>>
>>>> This patch doesn't compile without warnings.
>>>>
>>>
>>> I checked the warnings. Below are the warnings that I am getting for these patch.
>>>
>>> In file included from drivers/soc/ti/pruss.c:24:
>>> drivers/soc/ti/pruss.h:103:12: warning: ‘pruss_cfg_update’ defined but not used
>>> [-Wunused-function]
>>>   103 | static int pruss_cfg_update(struct pruss *pruss, unsigned int reg,
>>>       |            ^~~~~~~~~~~~~~~~
>>> drivers/soc/ti/pruss.h:84:12: warning: ‘pruss_cfg_read’ defined but not used
>>> [-Wunused-function]
>>>    84 | static int pruss_cfg_read(struct pruss *pruss, unsigned int reg,
>>> unsigned int *val)
>>>
>>> These warnings are coming because pruss_cfg_read() / update() APIs are
>>> introduced in this patch but they are used later.
>>>
>>> One way to resolve this warning is to make this API "inline". I compiled after
>>> making these APIs inline, it got compiled without any warnings.
>>>
>>> The other solution is to merge a user API of these APIs in this patch. Patch 4
>>> and 5 introduces some APIs that uses pruss_cfg_read() / update() APIs. If we
>>> squash patch 5 (as patch 5 uses both read() and update() APIs where as patch 4
>>> only uses update() API) with this patch and make it a single patch where
>>> pruss_cfg_read() / update() is introduced as well as used, then this warning
>>> will be resolved.
>>>
>>
>> The proper way to do this is to introduce new APIs only when they are needed.
>>
> 
> Sure, Mathieu. I will squash this patch with patch 5 ( as it uses both update()
> and read() APIs) so that these APIs are introduced and used in the same patch.
> 

I have sent next revision [v6] of these patch-set addressing your comments.
Please have a look at that.

[v6] https://lore.kernel.org/all/20230331112941.823410-1-danishanwar@ti.com/

-- 
Thanks and Regards,
Danish.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ