summaryrefslogtreecommitdiff
path: root/drivers/edac
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2016-04-16 23:13:55 +0300
committerBorislav Petkov <bp@suse.de>2016-04-23 12:54:42 +0300
commit2c911f6cac9388830d2afb350d29f43f115b1a28 (patch)
tree7f5ad9db10bc0c5013a362da2c99825bce95be13 /drivers/edac
parent2364d423a7b34bd972761eeed1f764c962980c23 (diff)
downloadlinux-2c911f6cac9388830d2afb350d29f43f115b1a28.tar.xz
EDAC, altera: Remove useless casts
The altera EDAC driver refers to its per-device data using a cast to '(void *)', which makes the pointer non-const, though both the source and destination are actually const. Removing the annotation makes the reference (almost) fit into a single line for improved readability, and ensures that it is actually defined as const. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Thor Thayer <tthayer@opensource.altera.com> Cc: Alan Tull <atull@opensource.altera.com> Cc: Dinh Nguyen <dinguyen@opensource.altera.com> Cc: linux-edac <linux-edac@vger.kernel.org> Link: http://lkml.kernel.org/r/1460837650-1237650-1-git-send-email-arnd@arndb.de Signed-off-by: Borislav Petkov <bp@suse.de>
Diffstat (limited to 'drivers/edac')
-rw-r--r--drivers/edac/altera_edac.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/edac/altera_edac.c b/drivers/edac/altera_edac.c
index 11775dc0b139..cc987b4ce908 100644
--- a/drivers/edac/altera_edac.c
+++ b/drivers/edac/altera_edac.c
@@ -232,8 +232,8 @@ static unsigned long get_total_mem(void)
}
static const struct of_device_id altr_sdram_ctrl_of_match[] = {
- { .compatible = "altr,sdram-edac", .data = (void *)&c5_data},
- { .compatible = "altr,sdram-edac-a10", .data = (void *)&a10_data},
+ { .compatible = "altr,sdram-edac", .data = &c5_data},
+ { .compatible = "altr,sdram-edac-a10", .data = &a10_data},
{},
};
MODULE_DEVICE_TABLE(of, altr_sdram_ctrl_of_match);
@@ -705,15 +705,12 @@ static void altr_create_edacdev_dbgfs(struct edac_device_ctl_info *edac_dci,
static const struct of_device_id altr_edac_device_of_match[] = {
#ifdef CONFIG_EDAC_ALTERA_L2C
- { .compatible = "altr,socfpga-l2-ecc", .data = (void *)&l2ecc_data },
- { .compatible = "altr,socfpga-a10-l2-ecc",
- .data = (void *)&a10_l2ecc_data },
+ { .compatible = "altr,socfpga-l2-ecc", .data = &l2ecc_data },
+ { .compatible = "altr,socfpga-a10-l2-ecc", .data = &a10_l2ecc_data },
#endif
#ifdef CONFIG_EDAC_ALTERA_OCRAM
- { .compatible = "altr,socfpga-ocram-ecc",
- .data = (void *)&ocramecc_data },
- { .compatible = "altr,socfpga-a10-ocram-ecc",
- .data = (void *)&a10_ocramecc_data },
+ { .compatible = "altr,socfpga-ocram-ecc", .data = &ocramecc_data },
+ { .compatible = "altr,socfpga-a10-ocram-ecc", .data = &a10_ocramecc_data },
#endif
{},
};