mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Md Danish Anwar <a0501179@ti.com>
To: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: MD Danish Anwar <danishanwar@ti.com>,
	"Andrew F. Davis" <afd@ti.com>, Suman Anna <s-anna@ti.com>,
	Roger Quadros <rogerq@kernel.org>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	Tero Kristo <kristo@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Santosh Shilimkar <ssantosh@kernel.org>,
	Nishanth Menon <nm@ti.com>, <linux-remoteproc@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <linux-omap@vger.kernel.org>,
	<srk@ti.com>, <devicetree@vger.kernel.org>,
	<netdev@vger.kernel.org>
Subject: Re: [EXTERNAL] Re: [PATCH v5 3/5] soc: ti: pruss: Add pruss_cfg_read()/update() API
Date: Fri, 31 Mar 2023 17:04:27 +0530	[thread overview]
Message-ID: <cca8cffb-b6f6-2fbb-f7a2-151b4380b2f6@ti.com> (raw)
In-Reply-To: <10ad5344-e8ae-eb8e-eb1e-6431b3e09384@ti.com>

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@ti.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@ti.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@ti.com>
>>>>> Co-developed-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
>>>>> Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
>>>>> Signed-off-by: Puranjay Mohan <p-mohan@ti.com>
>>>>> Signed-off-by: MD Danish Anwar <danishanwar@ti.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.

  reply	other threads:[~2023-03-31 11:35 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-23  6:24 [PATCH v5 0/5] Introduce PRU platform consumer API MD Danish Anwar
2023-03-23  6:24 ` [PATCH v5 1/5] soc: ti: pruss: Add pruss_get()/put() API MD Danish Anwar
2023-03-27 20:58   ` Mathieu Poirier
2023-03-28  5:42     ` [EXTERNAL] " Md Danish Anwar
2023-03-29 17:59       ` Mathieu Poirier
2023-03-30  9:16         ` Md Danish Anwar
2023-03-23  6:24 ` [PATCH v5 2/5] soc: ti: pruss: Add pruss_{request,release}_mem_region() API MD Danish Anwar
2023-03-27 20:59   ` Mathieu Poirier
2023-03-23  6:24 ` [PATCH v5 3/5] soc: ti: pruss: Add pruss_cfg_read()/update() API MD Danish Anwar
2023-03-23  9:30   ` Roger Quadros
2023-03-27 21:01   ` Mathieu Poirier
2023-03-28 11:17     ` [EXTERNAL] " Md Danish Anwar
2023-03-30 10:00     ` Md Danish Anwar
2023-03-30 14:21       ` Mathieu Poirier
2023-03-31 10:22         ` Md Danish Anwar
2023-03-31 11:34           ` Md Danish Anwar [this message]
2023-03-30 15:06       ` Roger Quadros
2023-03-23  6:24 ` [PATCH v5 4/5] soc: ti: pruss: Add helper functions to set GPI mode, MII_RT_event and XFR MD Danish Anwar
2023-03-23  9:32   ` Roger Quadros
2023-03-23  6:24 ` [PATCH v5 5/5] soc: ti: pruss: Add helper functions to get/set PRUSS_CFG_GPMUX MD Danish Anwar
2023-03-27 21:04   ` Mathieu Poirier
2023-03-28 11:28     ` [EXTERNAL] " Md Danish Anwar
2023-03-29 18:04       ` Mathieu Poirier
2023-03-30  9:18         ` Md Danish Anwar
2023-03-23  7:00 ` [PATCH v5 0/5] Introduce PRU platform consumer API Tony Lindgren
2023-03-24  7:13 ` Md Danish Anwar

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=cca8cffb-b6f6-2fbb-f7a2-151b4380b2f6@ti.com \
    --to=a0501179@ti.com \
    --cc=afd@ti.com \
    --cc=andersson@kernel.org \
    --cc=danishanwar@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=kristo@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=netdev@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=rogerq@kernel.org \
    --cc=s-anna@ti.com \
    --cc=srk@ti.com \
    --cc=ssantosh@kernel.org \
    --cc=vigneshr@ti.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

all inboxes | Powered by JetHome®