rtc: sh: silence warning
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Mon, 11 Sep 2023 09:50:51 +0000 (11:50 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Sun, 1 Oct 2023 20:31:59 +0000 (22:31 +0200)
Silence:
drivers/rtc/rtc-sh.c:517:58: warning: '%d' directive output may be truncated writing between 1 and 10 bytes into a region of size 3 [-Wformat-truncation=]

Link: https://lore.kernel.org/r/20230911095052.1292869-1-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-sh.c

index cd146b5741431f0c72448af9d1ad8f170800c7c2..04a6d24e2817e23f6ae12b5b9aa3f94fff11a3e2 100644 (file)
@@ -469,7 +469,7 @@ static int __init sh_rtc_probe(struct platform_device *pdev)
 {
        struct sh_rtc *rtc;
        struct resource *res;
-       char clk_name[6];
+       char clk_name[14];
        int clk_id, ret;
 
        rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL);