Commit Graph
8 Commits
Author SHA1 Message Date
Arnd Bergmann 2e2f16d5cd EDAC/aspeed: Use proper format string for printing resource
On ARMv7, resource_size_t can be 64-bit, which breaks printing
it as %x:

  drivers/edac/aspeed_edac.c: In function 'init_csrows':
  drivers/edac/aspeed_edac.c:257:28: error: format '%x' expects argument of \
    type 'unsigned int', but argument 4 has type 'resource_size_t' {aka 'long \
    long unsigned int'} [-Werror=format=]
  257 |         dev_dbg(mci->pdev, "dt: /memory node resources: first page \
    r.start=0x%x, resource_size=0x%x, PAGE_SHIFT macro=0x%x\n",

Use the special %pR format string to pretty-print the entire resource
instead.

Fixes: edfc2d73ca ("EDAC/aspeed: Add support for AST2400 and AST2600")
Signed-off-by: Arnd Bergmann <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
Reviewed-by: Andrew Jeffery <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
2021-05-18 16:33:13 +02:00
Troy Lee edfc2d73ca EDAC/aspeed: Add support for AST2400 and AST2600
Add AST2400 and AST2600 EDAC driver support.

Signed-off-by: Troy Lee <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
Reviewed-by: Stefan Schaeckeler <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
2020-12-07 12:05:41 +01:00
Liu Shixin 07def58717 EDAC/aspeed: Use module_platform_driver() to simplify
Use module_platform_driver() which makes the code simpler by eliminating
boilerplate code.

Signed-off-by: Liu Shixin <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
Reviewed-by: Joel Stanley <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
2020-09-18 09:14:01 +02:00
Krzysztof Kozlowski afce699694 EDAC/aspeed: Fix handling of platform_get_irq() error
platform_get_irq() returns a negative error number on error. In such a
case, comparison to 0 would pass the check therefore check the return
value properly, whether it is negative.

 [ bp: Massage commit message. ]

Fixes: 9b7e6242ee ("EDAC, aspeed: Add an Aspeed AST2500 EDAC driver")
Signed-off-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
Reviewed-by: Stefan Schaeckeler <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
2020-09-01 20:41:27 +02:00
Xu Wang a651c6c644 EDAC/aspeed: Remove unneeded semicolon
Remove unneeded semicolon reported by coccinelle.

Signed-off-by: Xu Wang <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
Acked-by: Andrew Jeffery <[email protected]>
Cc: James Morse <[email protected]>
Cc: Joel Stanley <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: linux-edac <[email protected]>
Cc: Mauro Carvalho Chehab <[email protected]>
Cc: Robert Richter <[email protected]>
Cc: Stefan Schaeckeler <[email protected]>
Cc: Tony Luck <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
2019-12-19 07:27:09 +01:00
Markus Elfring 5bbab3cf21 EDAC/aspeed: Use devm_platform_ioremap_resource() in aspeed_probe()
Simplify this function implementation by using a known wrapper function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
Acked-by: Joel Stanley <[email protected]>
Cc: Andrew Jeffery <[email protected]>
Cc: James Morse <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: linux-edac <[email protected]>
Cc: Mauro Carvalho Chehab <[email protected]>
Cc: Robert Richter <[email protected]>
Cc: Stefan Schaeckeler <[email protected]>
Cc: Tony Luck <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
2019-10-24 11:17:29 +02:00
YueHaibing ff70cacc96 EDAC/aspeed: Remove set but not used variable 'np'
Fix the following -Wunused-but-set-variable warning:

  drivers/edac/aspeed_edac.c: In function aspeed_probe:
  drivers/edac/aspeed_edac.c:284:22: warning: variable np set but not used [-Wunused-but-set-variable]

It is never used and can be removed.

Signed-off-by: YueHaibing <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
Reviewed-by: Andrew Jeffery <[email protected]>
Reviewed-by: Stefan Schaeckeler <[email protected]>
Cc: James Morse <[email protected]>
Cc: Joel Stanley <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: linux-edac <[email protected]>
Cc: Mauro Carvalho Chehab <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
2019-06-20 11:44:36 -07:00
Stefan M Schaeckeler 9b7e6242ee EDAC, aspeed: Add an Aspeed AST2500 EDAC driver
Add support for the Aspeed AST2500 SoC.

Signed-off-by: Stefan M Schaeckeler <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
Cc: Andrew Jeffery <[email protected]>
Cc: Joel Stanley <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Mauro Carvalho Chehab <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: linux-edac <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
2019-01-18 15:23:11 +01:00