Home
last modified time | relevance | path

Searched hist:"365 cd2ce" (Results 1 – 2 of 2) sorted by relevance

/openbmc/linux/drivers/net/ethernet/qlogic/qed/
H A Dqed_hw.h365cd2ce Mon Jul 06 10:38:15 CDT 2020 Alexander Lobakin <alobakin@marvell.com> net: qed: correct qed_hw_err_notify() prototype

Change the prototype of qed_hw_err_notify() with the following:
* constify "fmt" argument according to printk() declarations;
* anontate it with __cold attribute to move the function out of
the line;
* annotate it with __printf() attribute;

This eliminates W=1+ warning:

drivers/net/ethernet/qlogic/qed/qed_hw.c: In function
‘qed_hw_err_notify’:
drivers/net/ethernet/qlogic/qed/qed_hw.c:851:3: warning: function
‘qed_hw_err_notify’ might be a candidate for ‘gnu_printf’ format
attribute [-Wsuggest-attribute=format]
len = vsnprintf(buf, QED_HW_ERR_MAX_STR_SIZE, fmt, vl);
^~~

as well as saves some code size:

add/remove: 0/0 grow/shrink: 2/4 up/down: 40/-125 (-85)
Function old new delta
qed_dmae_execute_command 1680 1711 +31
qed_spq_post 1104 1113 +9
qed_int_sp_dpc 3554 3545 -9
qed_mcp_cmd_and_union 1896 1876 -20
qed_hw_err_notify 395 352 -43
qed_mcp_handle_events 2630 2577 -53
Total: Before=368645, After=368560, chg -0.02%

__printf() will also be helpful with catching bad format strings
and arguments.

Signed-off-by: Alexander Lobakin <alobakin@marvell.com>
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
365cd2ce Mon Jul 06 10:38:15 CDT 2020 Alexander Lobakin <alobakin@marvell.com> net: qed: correct qed_hw_err_notify() prototype

Change the prototype of qed_hw_err_notify() with the following:
* constify "fmt" argument according to printk() declarations;
* anontate it with __cold attribute to move the function out of
the line;
* annotate it with __printf() attribute;

This eliminates W=1+ warning:

drivers/net/ethernet/qlogic/qed/qed_hw.c: In function
‘qed_hw_err_notify’:
drivers/net/ethernet/qlogic/qed/qed_hw.c:851:3: warning: function
‘qed_hw_err_notify’ might be a candidate for ‘gnu_printf’ format
attribute [-Wsuggest-attribute=format]
len = vsnprintf(buf, QED_HW_ERR_MAX_STR_SIZE, fmt, vl);
^~~

as well as saves some code size:

add/remove: 0/0 grow/shrink: 2/4 up/down: 40/-125 (-85)
Function old new delta
qed_dmae_execute_command 1680 1711 +31
qed_spq_post 1104 1113 +9
qed_int_sp_dpc 3554 3545 -9
qed_mcp_cmd_and_union 1896 1876 -20
qed_hw_err_notify 395 352 -43
qed_mcp_handle_events 2630 2577 -53
Total: Before=368645, After=368560, chg -0.02%

__printf() will also be helpful with catching bad format strings
and arguments.

Signed-off-by: Alexander Lobakin <alobakin@marvell.com>
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
H A Dqed_hw.c365cd2ce Mon Jul 06 10:38:15 CDT 2020 Alexander Lobakin <alobakin@marvell.com> net: qed: correct qed_hw_err_notify() prototype

Change the prototype of qed_hw_err_notify() with the following:
* constify "fmt" argument according to printk() declarations;
* anontate it with __cold attribute to move the function out of
the line;
* annotate it with __printf() attribute;

This eliminates W=1+ warning:

drivers/net/ethernet/qlogic/qed/qed_hw.c: In function
‘qed_hw_err_notify’:
drivers/net/ethernet/qlogic/qed/qed_hw.c:851:3: warning: function
‘qed_hw_err_notify’ might be a candidate for ‘gnu_printf’ format
attribute [-Wsuggest-attribute=format]
len = vsnprintf(buf, QED_HW_ERR_MAX_STR_SIZE, fmt, vl);
^~~

as well as saves some code size:

add/remove: 0/0 grow/shrink: 2/4 up/down: 40/-125 (-85)
Function old new delta
qed_dmae_execute_command 1680 1711 +31
qed_spq_post 1104 1113 +9
qed_int_sp_dpc 3554 3545 -9
qed_mcp_cmd_and_union 1896 1876 -20
qed_hw_err_notify 395 352 -43
qed_mcp_handle_events 2630 2577 -53
Total: Before=368645, After=368560, chg -0.02%

__printf() will also be helpful with catching bad format strings
and arguments.

Signed-off-by: Alexander Lobakin <alobakin@marvell.com>
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
365cd2ce Mon Jul 06 10:38:15 CDT 2020 Alexander Lobakin <alobakin@marvell.com> net: qed: correct qed_hw_err_notify() prototype

Change the prototype of qed_hw_err_notify() with the following:
* constify "fmt" argument according to printk() declarations;
* anontate it with __cold attribute to move the function out of
the line;
* annotate it with __printf() attribute;

This eliminates W=1+ warning:

drivers/net/ethernet/qlogic/qed/qed_hw.c: In function
‘qed_hw_err_notify’:
drivers/net/ethernet/qlogic/qed/qed_hw.c:851:3: warning: function
‘qed_hw_err_notify’ might be a candidate for ‘gnu_printf’ format
attribute [-Wsuggest-attribute=format]
len = vsnprintf(buf, QED_HW_ERR_MAX_STR_SIZE, fmt, vl);
^~~

as well as saves some code size:

add/remove: 0/0 grow/shrink: 2/4 up/down: 40/-125 (-85)
Function old new delta
qed_dmae_execute_command 1680 1711 +31
qed_spq_post 1104 1113 +9
qed_int_sp_dpc 3554 3545 -9
qed_mcp_cmd_and_union 1896 1876 -20
qed_hw_err_notify 395 352 -43
qed_mcp_handle_events 2630 2577 -53
Total: Before=368645, After=368560, chg -0.02%

__printf() will also be helpful with catching bad format strings
and arguments.

Signed-off-by: Alexander Lobakin <alobakin@marvell.com>
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>