Const-poison the cam_sim_* convenience accessor functions.

These don't modify the cam_sim, so make that parameter const.
This commit is contained in:
imp 2020-01-09 16:34:54 +00:00
parent b4fe107b5b
commit c5665254dc

View File

@ -81,11 +81,11 @@ void cam_sim_set_path(struct cam_sim *sim, u_int32_t path_id);
/* Convenience routines for accessing sim attributes. */
static __inline u_int32_t cam_sim_path(struct cam_sim *sim);
static __inline const char * cam_sim_name(struct cam_sim *sim);
static __inline void * cam_sim_softc(struct cam_sim *sim);
static __inline u_int32_t cam_sim_unit(struct cam_sim *sim);
static __inline u_int32_t cam_sim_bus(struct cam_sim *sim);
static __inline u_int32_t cam_sim_path(const struct cam_sim *sim);
static __inline const char * cam_sim_name(const struct cam_sim *sim);
static __inline void * cam_sim_softc(const struct cam_sim *sim);
static __inline u_int32_t cam_sim_unit(const struct cam_sim *sim);
static __inline u_int32_t cam_sim_bus(const struct cam_sim *sim);
@ -125,31 +125,31 @@ struct cam_sim {
#define CAM_SIM_UNLOCK(sim) mtx_unlock((sim)->mtx)
static __inline u_int32_t
cam_sim_path(struct cam_sim *sim)
cam_sim_path(const struct cam_sim *sim)
{
return (sim->path_id);
}
static __inline const char *
cam_sim_name(struct cam_sim *sim)
cam_sim_name(const struct cam_sim *sim)
{
return (sim->sim_name);
}
static __inline void *
cam_sim_softc(struct cam_sim *sim)
cam_sim_softc(const struct cam_sim *sim)
{
return (sim->softc);
}
static __inline u_int32_t
cam_sim_unit(struct cam_sim *sim)
cam_sim_unit(const struct cam_sim *sim)
{
return (sim->unit_number);
}
static __inline u_int32_t
cam_sim_bus(struct cam_sim *sim)
cam_sim_bus(const struct cam_sim *sim)
{
return (sim->bus_id);
}