diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2012-01-05 19:05:20 +0000 |
---|---|---|
committer | Ben Hutchings <bhutchings@solarflare.com> | 2012-01-09 17:08:13 +0000 |
commit | 18e83e4cd144e30fb38bf1f714914182c6c8bced (patch) | |
tree | 3b9d93550cecbd127d2c00e50c9c373df8675aa0 /drivers/net/ethernet/sfc/mtd.c | |
parent | 0beaca2ca0b3c12dabab046f1541b09179ec449c (diff) | |
download | blackbird-op-linux-18e83e4cd144e30fb38bf1f714914182c6c8bced.tar.gz blackbird-op-linux-18e83e4cd144e30fb38bf1f714914182c6c8bced.zip |
sfc: Const-qualify static data as appropriate, partly prompted by checkpatch
Fix the following warnings:
WARNING: struct dev_pm_ops should normally be const
WARNING: static const char * array should probably be static const char * const
Similarly const-qualify struct i2c_board_info, struct i2c_algo_bit_data,
struct efx_ethtool_stat, struct efx_mtd_ops and struct siena_nvram_type_info.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/ethernet/sfc/mtd.c')
-rw-r--r-- | drivers/net/ethernet/sfc/mtd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ethernet/sfc/mtd.c b/drivers/net/ethernet/sfc/mtd.c index bc9dcd6b30d7..13f61fba731f 100644 --- a/drivers/net/ethernet/sfc/mtd.c +++ b/drivers/net/ethernet/sfc/mtd.c @@ -382,7 +382,7 @@ static int falcon_mtd_sync(struct mtd_info *mtd) return rc; } -static struct efx_mtd_ops falcon_mtd_ops = { +static const struct efx_mtd_ops falcon_mtd_ops = { .read = falcon_mtd_read, .erase = falcon_mtd_erase, .write = falcon_mtd_write, @@ -560,7 +560,7 @@ static int siena_mtd_sync(struct mtd_info *mtd) return rc; } -static struct efx_mtd_ops siena_mtd_ops = { +static const struct efx_mtd_ops siena_mtd_ops = { .read = siena_mtd_read, .erase = siena_mtd_erase, .write = siena_mtd_write, @@ -572,7 +572,7 @@ struct siena_nvram_type_info { const char *name; }; -static struct siena_nvram_type_info siena_nvram_types[] = { +static const struct siena_nvram_type_info siena_nvram_types[] = { [MC_CMD_NVRAM_TYPE_DISABLED_CALLISTO] = { 0, "sfc_dummy_phy" }, [MC_CMD_NVRAM_TYPE_MC_FW] = { 0, "sfc_mcfw" }, [MC_CMD_NVRAM_TYPE_MC_FW_BACKUP] = { 0, "sfc_mcfw_backup" }, @@ -593,7 +593,7 @@ static int siena_mtd_probe_partition(struct efx_nic *efx, unsigned int type) { struct efx_mtd_partition *part = &efx_mtd->part[part_id]; - struct siena_nvram_type_info *info; + const struct siena_nvram_type_info *info; size_t size, erase_size; bool protected; int rc; |