ath79: rb91x_nand: fix compilation warning for dev_err
authorChristian Marangi <ansuelsmth@gmail.com>
Tue, 9 May 2023 15:35:53 +0000 (17:35 +0200)
committerChristian Marangi <ansuelsmth@gmail.com>
Fri, 12 May 2023 01:15:43 +0000 (03:15 +0200)
Fix compilation warning for dev_err in rb91x_nand driver.
Fix compilation warning:
drivers/mtd/nand/raw/rb91x_nand.c:289:25: note: in expansion of macro 'dev_err'
  289 |                         dev_err(dev, "failed to get gpios: %d\n",
      |                         ^~~~~~~
drivers/mtd/nand/raw/rb91x_nand.c:289:61: note: format string is defined here
  289 |                         dev_err(dev, "failed to get gpios: %d\n",
      |                                                            ~^
      |                                                             |
      |                                                             int
      |                                                            %ld
cc1: all warnings being treated as errors

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
target/linux/ath79/files/drivers/mtd/nand/raw/rb91x_nand.c

index 244fd27590337b310df5f1a5bbe2f3163e4cd29a..c502f4a06497e79abe56844be0e6514458a5a9e4 100644 (file)
@@ -286,7 +286,7 @@ static int rb91x_nand_probe(struct platform_device *pdev)
        gpios = gpiod_get_array(dev, NULL, GPIOD_OUT_LOW);
        if (IS_ERR(gpios)) {
                if (PTR_ERR(gpios) != -EPROBE_DEFER) {
-                       dev_err(dev, "failed to get gpios: %d\n",
+                       dev_err(dev, "failed to get gpios: %ld\n",
                                PTR_ERR(gpios));
                }
                return PTR_ERR(gpios);