Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next 1/2] net: ethernet: qualcomm: Unconstify function arguments passed by value
@ 2026-07-02  9:49 Krzysztof Kozlowski
  2026-07-02  9:49 ` [PATCH net-next 2/2] net: ethernet: qualcomm: Constify "queue_map" in ppe_ring_queue_map_set() Krzysztof Kozlowski
  2026-07-03  8:07 ` [PATCH net-next 1/2] net: ethernet: qualcomm: Unconstify function arguments passed by value Jie Luo
  0 siblings, 2 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2026-07-02  9:49 UTC (permalink / raw)
  To: Luo Jie, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, netdev, linux-kernel
  Cc: Krzysztof Kozlowski

There is no benefit in marking "const" a pass-by-value (not a pointer)
function argument, because it is passed as a copy on the stack.  No code
readability improvements, no additional compiler-time safety for misuse.
Drop such redundant "const".

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---
 drivers/net/ethernet/qualcomm/ppe/ppe_config.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/qualcomm/ppe/ppe_config.c b/drivers/net/ethernet/qualcomm/ppe/ppe_config.c
index e9a0e22907a6..94f69c077949 100644
--- a/drivers/net/ethernet/qualcomm/ppe/ppe_config.c
+++ b/drivers/net/ethernet/qualcomm/ppe/ppe_config.c
@@ -1380,7 +1380,7 @@ int ppe_ring_queue_map_set(struct ppe_device *ppe_dev, int ring_id, u32 *queue_m
 }
 
 static int ppe_config_bm_threshold(struct ppe_device *ppe_dev, int bm_port_id,
-				   const struct ppe_bm_port_config port_cfg)
+				   struct ppe_bm_port_config port_cfg)
 {
 	u32 reg, val, bm_fc_val[2];
 	int ret;
@@ -1586,7 +1586,7 @@ static int ppe_config_qm(struct ppe_device *ppe_dev)
 }
 
 static int ppe_node_scheduler_config(struct ppe_device *ppe_dev,
-				     const struct ppe_scheduler_port_config config)
+				     struct ppe_scheduler_port_config config)
 {
 	struct ppe_scheduler_cfg sch_cfg;
 	int ret, i;
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-07-03  8:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-02  9:49 [PATCH net-next 1/2] net: ethernet: qualcomm: Unconstify function arguments passed by value Krzysztof Kozlowski
2026-07-02  9:49 ` [PATCH net-next 2/2] net: ethernet: qualcomm: Constify "queue_map" in ppe_ring_queue_map_set() Krzysztof Kozlowski
2026-07-03  8:06   ` Jie Luo
2026-07-03  8:07 ` [PATCH net-next 1/2] net: ethernet: qualcomm: Unconstify function arguments passed by value Jie Luo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox