diff mbox series

[1/2] remoteproc: remoteproc_core: Use 'gnu_printf' format notation

Message ID 20200715123551.4011154-1-lee.jones@linaro.org
State Mainlined
Commit 7e05c8de132308da0c2a5b17842b808d99a00ca8
Headers show
Series [1/2] remoteproc: remoteproc_core: Use 'gnu_printf' format notation | expand

Commit Message

Lee Jones July 15, 2020, 12:35 p.m. UTC
Fixes the following W=1 kernel build warning(s):

 drivers/remoteproc/remoteproc_core.c: In function ‘rproc_find_carveout_by_name’:
 drivers/remoteproc/remoteproc_core.c:257:2: warning: function ‘rproc_find_carveout_by_name’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
 257 | vsnprintf(_name, sizeof(_name), name, args);
 | ^~~~~~~~~
 drivers/remoteproc/remoteproc_core.c: In function ‘rproc_mem_entry_init’:
 drivers/remoteproc/remoteproc_core.c:993:2: warning: function ‘rproc_mem_entry_init’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
 993 | vsnprintf(mem->name, sizeof(mem->name), name, args);
 | ^~~~~~~~~
 drivers/remoteproc/remoteproc_core.c: In function ‘rproc_of_resm_mem_entry_init’:
 drivers/remoteproc/remoteproc_core.c:1029:2: warning: function ‘rproc_of_resm_mem_entry_init’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
 1029 | vsnprintf(mem->name, sizeof(mem->name), name, args);
 | ^~~~~~~~~

Cc: Brian Swetland <swetland@google.com>
Cc: Mark Grosen <mgrosen@ti.com>
Cc: Guzman Lugo <fernando.lugo@ti.com>
Cc: Suman Anna <s-anna@ti.com>
Cc: Robert Tivy <rtivy@ti.com>
Cc: De Leon <x0095078@ti.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/remoteproc/remoteproc_core.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

patchwork-bot+linux-remoteproc@kernel.org July 15, 2020, 7:40 p.m. UTC | #1
Hello:

This series was applied to andersson/remoteproc.git (refs/heads/for-next).

On Wed, 15 Jul 2020 13:35:50 +0100 you wrote:
> Fixes the following W=1 kernel build warning(s):
> 
>  drivers/remoteproc/remoteproc_core.c: In function ‘rproc_find_carveout_by_name’:
>  drivers/remoteproc/remoteproc_core.c:257:2: warning: function ‘rproc_find_carveout_by_name’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
>  257 | vsnprintf(_name, sizeof(_name), name, args);
>  | ^~~~~~~~~
>  drivers/remoteproc/remoteproc_core.c: In function ‘rproc_mem_entry_init’:
>  drivers/remoteproc/remoteproc_core.c:993:2: warning: function ‘rproc_mem_entry_init’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
>  993 | vsnprintf(mem->name, sizeof(mem->name), name, args);
>  | ^~~~~~~~~
>  drivers/remoteproc/remoteproc_core.c: In function ‘rproc_of_resm_mem_entry_init’:
>  drivers/remoteproc/remoteproc_core.c:1029:2: warning: function ‘rproc_of_resm_mem_entry_init’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
>  1029 | vsnprintf(mem->name, sizeof(mem->name), name, args);
>  | ^~~~~~~~~
> 
> [...]


Here is a summary with links:
  - [1/2] remoteproc: remoteproc_core: Use 'gnu_printf' format notation
    https://git.kernel.org/andersson/remoteproc/c/7e05c8de132308da0c2a5b17842b808d99a00ca8
  - [2/2] remoteproc: qcom_sysmon: Solve function header bitrot issues
    https://git.kernel.org/andersson/remoteproc/c/5b435ca38b2ce785b60b4d3c230f0a21121d6728

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
index 0f95e025ba030..e00dff425c96e 100644
--- a/drivers/remoteproc/remoteproc_core.c
+++ b/drivers/remoteproc/remoteproc_core.c
@@ -243,6 +243,7 @@  EXPORT_SYMBOL(rproc_da_to_va);
  *
  * Return: a valid pointer on carveout entry on success or NULL on failure.
  */
+__printf(2, 3)
 struct rproc_mem_entry *
 rproc_find_carveout_by_name(struct rproc *rproc, const char *name, ...)
 {
@@ -966,6 +967,7 @@  EXPORT_SYMBOL(rproc_add_carveout);
  * This function allocates a rproc_mem_entry struct and fill it with parameters
  * provided by client.
  */
+__printf(8, 9)
 struct rproc_mem_entry *
 rproc_mem_entry_init(struct device *dev,
 		     void *va, dma_addr_t dma, size_t len, u32 da,
@@ -1009,6 +1011,7 @@  EXPORT_SYMBOL(rproc_mem_entry_init);
  * This function allocates a rproc_mem_entry struct and fill it with parameters
  * provided by client.
  */
+__printf(5, 6)
 struct rproc_mem_entry *
 rproc_of_resm_mem_entry_init(struct device *dev, u32 of_resm_idx, size_t len,
 			     u32 da, const char *name, ...)