From patchwork Wed Nov 17 12:17:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guo Zhengkui X-Patchwork-Id: 12624459 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5FE54C433EF for ; Wed, 17 Nov 2021 12:19:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3B12C6128C for ; Wed, 17 Nov 2021 12:19:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237240AbhKQMWG (ORCPT ); Wed, 17 Nov 2021 07:22:06 -0500 Received: from mail-sgaapc01on2117.outbound.protection.outlook.com ([40.107.215.117]:18528 "EHLO APC01-SG2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233484AbhKQMV4 (ORCPT ); Wed, 17 Nov 2021 07:21:56 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OYpAobBUF3gqvTGir4Q+wli4xmn4FMRgJX0JWL5TjUcvRzc+zW0RoXJ1flLWNYk4qBNeVyoMhzWPxTEs1SPWPzS1JyGrHq3AjFwW7KvGj8uVyvo6BfWg1iZVqczmeL+fbafgWMFNoWyKyQr+sbfMvpFJz1swXa9uGf2WwnVrXLi1MgPrg9Naajw+F05xyo4iA4j8IL1+LQ44HylOfokF0kTISgvl0fIY47LQj7ONMHVBoEtZ6xyqmXpMMcj8qQ6Ljcq3DQSEkHhAGgGXX90qo3U7mkOFZcXRb1GweH3pQFMhr0Hd7hMhogRSXHCwFBixJVZ05LvxBD+EvANAwyz/iA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=15VuHjSp6q7YbiCOqlzawGrhlRrQZiqoG9rw0z4ksRg=; b=WgVx3F8Dz6TrQmOEapdgSdxLa96rjuzxkS1ms9bQqnnOPobzXNlf2eYkQrX9dfcHNo2u2ue/GEh2dQSM+K3mkNb7ahxzo5pswp4sbccnMj9xe7nxg8BO56kYVObTeECpgzIGbr172yUgoPJgCelV3eon7n/D35bxi1WfuhiHkvRdWazARitL7TDH0DinPgywoG9kkNndBcNtBd9X4BSykNxr2PI33oEpYjF4TpOhUEKwq4tJ5WDNliMysxzdLvNcXhnfMZpyxQ7GjUh0uIO5HWTJnrlhyq3PMiHjNUQ+QoSMpnULorcP3TWtzZYnK+uu0fPeUWHIOLDl0UrbKOuCLA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo0.onmicrosoft.com; s=selector2-vivo0-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=15VuHjSp6q7YbiCOqlzawGrhlRrQZiqoG9rw0z4ksRg=; b=BDsdPeC/21WdJnq7S9po2GL8ttKHeScPm9M5CPxW0rbDA8FfcvLLK512wn8JLQvD34CONaY74NX8qK8kHGbcknsn7lT4kIG8k3xHyJLNh98y8SqSqKblNKqTVK+Rin5Rk9Wems3piYGoQvQcE0McEolMGoj7o5c891muOt05TGU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from HK2PR06MB3492.apcprd06.prod.outlook.com (2603:1096:202:2f::10) by HK2PR06MB3282.apcprd06.prod.outlook.com (2603:1096:202:33::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.27; Wed, 17 Nov 2021 12:18:54 +0000 Received: from HK2PR06MB3492.apcprd06.prod.outlook.com ([fe80::814a:4668:a3bd:768]) by HK2PR06MB3492.apcprd06.prod.outlook.com ([fe80::814a:4668:a3bd:768%7]) with mapi id 15.20.4713.021; Wed, 17 Nov 2021 12:18:54 +0000 From: Guo Zhengkui To: "Gustavo A. R. Silva" , Sam Ravnborg , Guo Zhengkui , linux-fbdev@vger.kernel.org (open list:OMAP FRAMEBUFFER SUPPORT), linux-omap@vger.kernel.org (open list:OMAP FRAMEBUFFER SUPPORT), dri-devel@lists.freedesktop.org (open list:FRAMEBUFFER LAYER), linux-kernel@vger.kernel.org (open list) Cc: kernel@vivo.com Subject: [PATCH] video: omapfb: Use scnprintf() instead of snprintf() Date: Wed, 17 Nov 2021 20:17:44 +0800 Message-Id: <20211117121829.11141-1-guozhengkui@vivo.com> X-Mailer: git-send-email 2.20.1 X-ClientProxiedBy: HK2PR02CA0200.apcprd02.prod.outlook.com (2603:1096:201:20::12) To HK2PR06MB3492.apcprd06.prod.outlook.com (2603:1096:202:2f::10) MIME-Version: 1.0 Received: from localhost.localdomain (218.213.202.190) by HK2PR02CA0200.apcprd02.prod.outlook.com (2603:1096:201:20::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.19 via Frontend Transport; Wed, 17 Nov 2021 12:18:53 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c2bed1e2-c158-4698-0f28-08d9a9c46be7 X-MS-TrafficTypeDiagnostic: HK2PR06MB3282: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:78; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NrRo9HOJqgjQSmFjhVo108yu57hAAGxMcmRD/3erhbIV39pr2mI1H5cpFLn5xE53PjvUMTjIf/QefLuC50qWW5nSQIKwNDwGPKnaEWHgmjeJAzPOS0MLogXd7vxBBiTysmNXfatK4xlzFhqxP6OFDgNXWRWZnWmpK0nVzRb0bn89Q4+uWp515xxVdWb6LBl6rIRUBKBSuuNMPNnGV9X4ySfisqCnAje5Rgo2qBkRDFnx5Qs2OS4UhURcaDevajPaJjIx04Lg8Vl7Ohk0XLXSi2EyGyvWhjCsY+6M3xxJfCbPB44QMXvZl052/FyNnmXEJe2bxIM1RezCkWxuZSgNC6qTig5+a1KZu0WdHWCqnaVeB0FzmAMPMX4g69IY97B2Ca+NxgdDdMDn9kOREBMCkr5kbXy0gSCXVk4RLUqBGCurUggt0880QLF+Evmr9ePzDp4pLBXQ+DjVto8/Xjr95pG43ETh945lyJbe/3m57Db0KbAH1qisIHishKCXMQhuAOB+ocvq/+akd7k/bKfssEon02qtWLi/HJOBujhVcJX4EqRq0PedSSHHSOy5kusZQqTJeQSs7m5w9ETpJrO43325SldaQo+fUQOln7iVVcxLj39Ru2RDenhKc+WezkNlrIzPTSS1Mnu5gJ6hB+KU8CY4kL4CZALDJupLg+foY6fKwptL1+LjMWSvVWQD+fiepFCXNLxrpNeX50gNs2tPPg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:HK2PR06MB3492.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(6666004)(86362001)(4326008)(8676002)(5660300002)(26005)(8936002)(36756003)(6512007)(6506007)(52116002)(186003)(66476007)(83380400001)(66946007)(107886003)(66556008)(508600001)(2906002)(2616005)(316002)(1076003)(38350700002)(38100700002)(6486002)(110136005)(956004);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 7M6uOWMugcm6pXf03RycBmFs4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p55Xzd+FxX227fR6uEbqbRUQGa9/4E93+noNdgyTnC1hSM7uc4KvUMg1rEw9gC2CHgnKq+88X4fY/jARfDl0clEJzCz3+scqwIfqQa2Rm+f7dXn1/uZQXbaeoujeoa8pV0a95EJ7Zih+cQPpEh9cMNpI3tb4ZzTzcmNAJZScLJJiyZnPKzvd/OFscdZqvmN7GrIQfUuCxQqz5YUbqqbt0XvBwnRIs10oyCtXdsGkdw1EKrzYY19YL3Nnf80tnpwXI55ZBXs31twsDbxFp/qgAYlP4Qza3P/v4LolHnjGVqRuILVcUkXEtzjeBEtUi1efF3cCvu3r6zOihv/NE0HiA5tF2SNlaxCvxW3wo3QiFJZvYg5kk4pJBby9wZNwn3xPH623pKo/EfWiaZbT5LQ9SwKK+EZpwQXGLA2IAFsyowmKTG1ZEXEZKXoHYjpJKIveicUjp2XpTYNstJ1FE6REjKNY8n+G4YCd95xHZUNn0i9CCgGwQkGRDDVsPbOziCJa3g2RBGIjHpq7ivHIoKthlSEN67U= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: c2bed1e2-c158-4698-0f28-08d9a9c46be7 X-MS-Exchange-CrossTenant-AuthSource: HK2PR06MB3492.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Nov 2021 12:18:54.0863 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: LXvQk2bPaW+URX+ivaEirxeD9HJ2mYE9ReoP79oMBUBHxE7rcZdxB5aYu2EECQl3eCDW91QtDi+O7ATh+XZb1w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK2PR06MB3282 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Fix following warnings: ./drivers/video/fbdev/omap/omapfb_main.c:1382:8-16: WARNING: use scnprintf or sprintf ./drivers/video/fbdev/omap/omapfb_main.c:1306:8-16: WARNING: use scnprintf or sprintf Signed-off-by: Guo Zhengkui --- drivers/video/fbdev/omap/omapfb_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/video/fbdev/omap/omapfb_main.c b/drivers/video/fbdev/omap/omapfb_main.c index b495c09e6102..a0d472943c60 100644 --- a/drivers/video/fbdev/omap/omapfb_main.c +++ b/drivers/video/fbdev/omap/omapfb_main.c @@ -1303,7 +1303,7 @@ static ssize_t omapfb_show_panel_name(struct device *dev, { struct omapfb_device *fbdev = dev_get_drvdata(dev); - return snprintf(buf, PAGE_SIZE, "%s\n", fbdev->panel->name); + return scnprintf(buf, PAGE_SIZE, "%s\n", fbdev->panel->name); } static ssize_t omapfb_show_bklight_level(struct device *dev, @@ -1314,7 +1314,7 @@ static ssize_t omapfb_show_bklight_level(struct device *dev, int r; if (fbdev->panel->get_bklight_level) { - r = snprintf(buf, PAGE_SIZE, "%d\n", + r = scnprintf(buf, PAGE_SIZE, "%d\n", fbdev->panel->get_bklight_level(fbdev->panel)); } else r = -ENODEV; @@ -1348,7 +1348,7 @@ static ssize_t omapfb_show_bklight_max(struct device *dev, int r; if (fbdev->panel->get_bklight_level) { - r = snprintf(buf, PAGE_SIZE, "%d\n", + r = scnprintf(buf, PAGE_SIZE, "%d\n", fbdev->panel->get_bklight_max(fbdev->panel)); } else r = -ENODEV; @@ -1379,7 +1379,7 @@ static ssize_t omapfb_show_ctrl_name(struct device *dev, { struct omapfb_device *fbdev = dev_get_drvdata(dev); - return snprintf(buf, PAGE_SIZE, "%s\n", fbdev->ctrl->name); + return scnprintf(buf, PAGE_SIZE, "%s\n", fbdev->ctrl->name); } static struct device_attribute dev_attr_ctrl_name =