ice: ice_base.c: Add const modifier to params and vars
authorJan Glaza <jan.glaza@intel.com>
Wed, 29 Nov 2023 07:36:11 +0000 (02:36 -0500)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 2 Jan 2024 19:18:32 +0000 (11:18 -0800)
commitb8ab8858190a1bba5f4b35ca37b1e4d7577b3a75
tree7ca4e1c0a9a7a2a12164810a303cfeaa0afe3997
parentf9f9de23dc88670564a8e2448750d88398ea3555
ice: ice_base.c: Add const modifier to params and vars

Add const modifier to function parameters and variables where appropriate
in ice_base.c and corresponding declarations in ice_base.h.

The reason for starting the change is that read-only pointers should be
marked as const when possible to allow for smoother and more optimal code
generation and optimization as well as allowing the compiler to warn the
developer about potentially unwanted modifications, while not carrying
noticeable negative impact.

Reviewed-by: Andrii Staikov <andrii.staikov@intel.com>
Reviewed-by: Sachin Bahadur <sachin.bahadur@intel.com>
Signed-off-by: Jan Glaza <jan.glaza@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_base.c
drivers/net/ethernet/intel/ice/ice_base.h