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@xxxxxx> 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@xxxxxx> >>>>> >>>>> 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@xxxxxx> >>>>> Co-developed-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@xxxxxxxxxx> >>>>> Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@xxxxxxxxxx> >>>>> Signed-off-by: Puranjay Mohan <p-mohan@xxxxxx> >>>>> Signed-off-by: MD Danish Anwar <danishanwar@xxxxxx> >>>>> --- >>>>> 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@xxxxxx/ -- Thanks and Regards, Danish.