Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3332308pxb; Sun, 31 Jan 2021 12:12:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJzLunMlY+XBMfZCF41dAa2JJQQmDGA2jV/gdSPb1oWTCytT01V90CPfM5duyek7zLQurZWP X-Received: by 2002:a17:906:653:: with SMTP id t19mr14637525ejb.44.1612123967465; Sun, 31 Jan 2021 12:12:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612123967; cv=none; d=google.com; s=arc-20160816; b=gWEGdem/tIOBcKmi3jAnoxXTnj4MFzGoBLcKtWjSk990iiIVPDth9CtdeSDDQcxfN3 tl5bl9hlgM6Yz1Y2eOLQ9Qht0RwN5zYLn2jew09/zfType4s4wXh6yfdEA2JgW161jY1 ahpuT8RYTo11U2FP1iGRw7eWgKOQ+4gkf26koKZ4OX6Mh11jNrQjhU27WwO0/ANhhdsA FBbJGsa9XFkdkZD2GshL9OEs6HzDgX8tlGjMUdQzQO0yanCcHdh7VXb9Q3gVWm7/YRwH fC5MJAanvtKYrUwSminUPNQemsXZljeeo2pOM4qMoDot5zoJcyuXkj+1wjA1o6uZ/37L 9nrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=OCqlwfO8Y29nGZpydwpkYYTLuT/Y0WSarB/5hJMpIrI=; b=W5MiH8er9jyYXqFlKcun5ygnBaLmICRskhVfUsGvhCSw/gU2+6O+J/ZVkOqKH+E70o RJ526NAH1sDkoY+a2kGla1MFWdlzm7VmKV/1n60MT3tnYJzSmMvw+QQ5SSxN/Ky1L/vU aMLKcsgdB8oWoKD6qQNFOOa+ivM/wXw91MNA0VYMzcYSugE/VguGxW5EDR8LhF13CmcF 6K1UkxHIvlalcywqXdOujKfRj9beI/6fsWUcjEwKHXilRpNnPGIQJOMWrWtltljDtGvP DFmDfNjGnvONs1TDHvFX05CIV2VXaalD8tddxVPrf3Mir9zy0M0946Gte3RY8i67Grwv elGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=clsAZXvx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id eb13si3933572edb.385.2021.01.31.12.12.22; Sun, 31 Jan 2021 12:12:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=clsAZXvx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231825AbhAaUF6 (ORCPT + 99 others); Sun, 31 Jan 2021 15:05:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231545AbhAaTsB (ORCPT ); Sun, 31 Jan 2021 14:48:01 -0500 Received: from mail-pj1-x1041.google.com (mail-pj1-x1041.google.com [IPv6:2607:f8b0:4864:20::1041]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7895CC061354; Sun, 31 Jan 2021 09:33:10 -0800 (PST) Received: by mail-pj1-x1041.google.com with SMTP id s23so2652553pjz.4; Sun, 31 Jan 2021 09:33:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OCqlwfO8Y29nGZpydwpkYYTLuT/Y0WSarB/5hJMpIrI=; b=clsAZXvxgZ/QYBDXDbtJ4ra1untXoh43m/JKXpoj36mFm0NTF9xDZ4Fi6UUWdXVLU2 Y2NyRER0oiHmVIINV0iIbfMP9jEN2oswqdjlsA1PdtxmpvHogl3KEFRiiDRXet3IjpbY VX3bdj8TnT2DO6FEoc42Z8aIfClVIJYWI7V2GHHaSuLUfbuysrEWnA0dSiQGnbyrMlyD vNHavG8UTyA6Td5n4FOSphSDHxBAKT5qDWSqn5jhKXAgY8hmM12i0jDOe3eZGqJB/NBF RVsZrpV19eW5wedv6j6jw+usPKIlLbfw2s9RmT+uUdu1qcbzBci4hKPzE6jSCgCGR32f +JLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OCqlwfO8Y29nGZpydwpkYYTLuT/Y0WSarB/5hJMpIrI=; b=RWHFWUTSTU1tL78jJhoCUtI87LEshoIQzKoc84NbN6JrB5cNnUcF4zlkVAuH1+PZ3b EeWZbtdeRU7joIfFDK9X6innwxeaX/iAOcOvnfRbzYlSzMLf0qrdYdEZBF0dk7yCfN1Y Hl3x3xMSlt+u/Dkgc/xHgWjrE1cmgIm8OulHpoi0+elEG54ONuPA68AdEmWvJAgEZRxC Ut2WEi3kFdYqnM48JmGsKDJLYcs+FlfbIeEQ1Fm+rPiZyNGwfA6POd+aLzyItsf3mAz3 ptRII1NhcKqhLersIVgrlCtdISWTIiVJh1FJtosIsoTDHRWlHUx2zGNwmC5J2yf8VrPi a4Eg== X-Gm-Message-State: AOAM5301/zAedlFEgaD13lCaz9sEfo+ODp0rWpb+ZEZD2TW5LWiMYPXM k0P3kHgMGCeiwU2ZBX0ZpP4= X-Received: by 2002:a17:90b:1955:: with SMTP id nk21mr8221442pjb.206.1612114390012; Sun, 31 Jan 2021 09:33:10 -0800 (PST) Received: from localhost ([2402:3a80:11ea:e144:a2a4:c5ff:fe20:7222]) by smtp.gmail.com with ESMTPSA id r5sm14566058pfl.165.2021.01.31.09.33.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 Jan 2021 09:33:09 -0800 (PST) From: Kumar Kartikeya Dwivedi To: devel@driverdev.osuosl.org, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Cc: Kumar Kartikeya Dwivedi , Ian Abbott , H Hartley Sweeten , Ioana Radulescu , Ioana Ciornei , Johan Hovold , Alex Elder , Vaibhav Agarwal , Mark Greer , Rui Miguel Silva , Viresh Kumar , Marc Dietrich , Jens Frederich , Daniel Drake , Jon Nettleton , Larry Finger , Florian Schilhabel , Sudip Mukherjee , Teddy Wang , Stephen Rothwell , Andrew Morton , Robert Richter , William Cohen , Florian Fainelli , Mike Rapoport , Thomas Gleixner , Al Viro , greybus-dev@lists.linaro.org, ac100@lists.launchpad.net, linux-tegra@vger.kernel.org, linux-fbdev@vger.kernel.org Subject: [PATCH 12/13] staging: sm750fb: Switch from strlcpy to strscpy Date: Sun, 31 Jan 2021 22:58:33 +0530 Message-Id: <20210131172838.146706-13-memxor@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210131172838.146706-1-memxor@gmail.com> References: <20210131172838.146706-1-memxor@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org strlcpy is marked as deprecated in Documentation/process/deprecated.rst, and there is no functional difference when the caller expects truncation (when not checking the return value). strscpy is relatively better as it also avoids scanning the whole source string. This silences the related checkpatch warnings from: 5dbdb2d87c29 ("checkpatch: prefer strscpy to strlcpy") Signed-off-by: Kumar Kartikeya Dwivedi --- drivers/staging/sm750fb/sm750.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c index 029f0d09e..c237a8f8e 100644 --- a/drivers/staging/sm750fb/sm750.c +++ b/drivers/staging/sm750fb/sm750.c @@ -814,7 +814,7 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index) fix->ywrapstep = crtc->ywrapstep; fix->accel = FB_ACCEL_SMI; - strlcpy(fix->id, fixId[index], sizeof(fix->id)); + strscpy(fix->id, fixId[index], sizeof(fix->id)); fix->smem_start = crtc->oScreen + sm750_dev->vidmem_start; pr_info("fix->smem_start = %lx\n", fix->smem_start); -- 2.29.2