From patchwork Wed Nov 17 12:17:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guo Zhengkui X-Patchwork-Id: 518338 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 68069C433FE for ; Wed, 17 Nov 2021 12:19:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4C6EF610CA for ; Wed, 17 Nov 2021 12:19:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236374AbhKQMWG (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 S236430AbhKQMWB (ORCPT ); Wed, 17 Nov 2021 07:22:01 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eU5BSP/cR9otxIGZ4y0f05ZjZ0VeVVtFOWS9w7wM94IyP39mVm9BzLIRYfEXZEjJb7YU5PGjZdrw8skETIAf+3eE0Evb1wSyjPjCO6HV6RWZl/9jXjghg/CJ/HSBqIiM/9wagjUKpeSq9r7FmqaMg2NtcRk+ldTIXvk2jV0WA6R67yhUAWXPyNWotl8eccp5cWkpiub7BO0xSkFDwOql0gMZpIVaTtOfsVBi65XTZ9tAPZkz2kegqJvyOxiFxOwMt0q2Ww6WkYYNG6JsMQgG4mM5+D2gbqJrRnTVv2xqg6d3oqJnl7cAyKthN1XA8y0fBX9+dLUMdBEILS0GrMMw1Q== 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=cIA0FNOIZdGAS4e7EpeSMC2swt/VX/8yAw2WXQE7d8TJsHxZ3G1KiNqldqu0tNimeoa5UVYfQO4T/zb7pMk2GRJ2h6bhPCBIylay214CkQbLRevEdfLZn2mGSePZZvUY6pMRe1CZkq+fSBEiIq12s6W+U+tN2ujlpw87cvVsUVFQ5CySyygDG9w6e+Dyq/4A6HrkDTtXNpqx0yV5TxxHJlM194h9GE6drqe50jQO2qBWlo8GMco/ls3LLp377z8A/5GoX27fmLRe4kcav7ldH24j/tOE6Mzf9RaSTyNBY4zKjAo/Ca9p58lJRKhNQS/KluIcsA6pZ+OhwuxjdZ9bBg== 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=nHWMZNEZdi62zT+fDhsizBpWiZ2fsDA6k1ThKVY/4DeoAcDT3tHi0xBU3AtvmPfqgAx6Hy699GGc3+PqgBpnEzDnFv0P9iiJwYmE0CcytQIUc3c8lFhaQI950TwhPXWPgnaH7DgQ4/m4PBqHLNuqYCfItehGtL+pfPN/ngp1Bs8= 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:19:00 +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:19:00 +0000 From: Guo Zhengkui To: Sam Ravnborg , "Gustavo A. R. Silva" , 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:45 +0800 Message-Id: <20211117121829.11141-2-guozhengkui@vivo.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20211117121829.11141-1-guozhengkui@vivo.com> References: <20211117121829.11141-1-guozhengkui@vivo.com> 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:59 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 364a57db-6904-417b-ca77-08d9a9c46fa6 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: XQW/BFf4DtdVs8GC+nXY1BQ4jXItzIj92sZzEelxxWzB86VvVRy33NmpTfWoFQKFo2Ga48EHcMEV2DZsUpXjo2OZYCPi/691BFUPLzudnDtWTAdp+K0jz+i1BFlGWWq455HNX5Khg6XxcDYEYfTO1twNLimViG+a9eY5f0qwq17iSryeQxExZL/XayA03bMbVCAER4INqPlcMEUuzSR/KMQAewZVCr7XW4me88F7gSnGv6UY9ZSFq/LkHdFQmdYbemqK7jYqDsOaLk4/oJ1FXnIvKrxR4GRdDcT0kksMXGrOFrZeOms7UGQ+dOsUY4QuDE87OpV0iEjLdHIorRlbiUlecqXFIc5RQYtsFGg7bcZcx/ngZdjyCDuB+LL6Tdhx8E/EGCoVuPjt6Odhy8le583HXd5++5JWPHRwVW7jnyLiakLgnuWZVSL4a52oVOnNcFVLuROx8bp1KjicuEFr77mE4hl9929HC33GoYpC22nGKiaAJ9ZpVg7TtBElhWiVx/vOyL4RfzScqeDlSRyHtMWKXayAdXTMUcdaNgU5gfffaXB8NHrM+zJWJQU3OJoYwcFvccI5moJ4PG1TixNXc9XLOt6I7/aYjhaNPvz/Ibz4kT3p227AJLSqIX3lq1MYoLHxoIdttrdyeX7OKd0RRkuZ7Y/7uGLs6VKPAIfc21NG1sVWIbVuO90hnYwdNvqtq/zNaRTCgz8KG6+HZj0ICw== 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: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NDZQy8+I3Y3Ongf6v1YEu5iNj3yZFCqJ4Zao6nImdgxwy3yZlkiksFZAzyEoa7o8XZ8gYzLYlziEJBRgJKjHsOwBSHm3aQZFtsSZGWPtMvCTinLC0iuMAQTBEoL8KHVW4Qon9/EUvvsoz+lzaL608Pesn1hoIt8NCHt4qT0ZvXYvC37R2esQYdTUhwVHdLveJvWAtN8mX6MKcBNDRWm5Ve+YOAd1PTvQS5ApX2oAtGzQEHwycINAxKYy/NthLHqwC8M7ZGjIId7arOTzFwcsBhZ41JnUtccTSZL4RWtcAkdV675qwgKHCPTAxYy7kXWQbmqpPLQQ31KwSyQb/KMqFcSgvA+0j68jZWRzQ6sQHc8cqdaTGS45XZDqhY6xSDwP2Ea8O4hxhDWu55noGuHlpx2cMIYoYk5z5Kj32yxPALKK+0ZqEZDx4N3/4MOQqx66nePtoEHqsIPXeEvJlUCU9ABTyCoVOLQ3/O4Y3c1AnaBhiAF2RUCYAtk/v0cOwtlqsW1L4SDwGRGA0lld1HIpQ7F+Dy44/UCtkJI7m1istYmS+QBkomXbVxIw/+UpYCPkEo7ZtMTuWNasgrKWl5kVhFQjDZjPVF44E0PxZGfFtQ4TdVyv0= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 364a57db-6904-417b-ca77-08d9a9c46fa6 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:19:00.3760 (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: BGsv/FWlFqOVk0DUc6T0/Ex2yH5soLMBjV57CNJYDznyiK+wJ8DqJYHwpLjbTyrtZJQI5m/UmSlAuPxMTfBOBg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK2PR06MB3282 Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@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 =