Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3330617pxb; Sun, 31 Jan 2021 12:09:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJyJRrrp9419bvfcckexPtl8PqnFga4Ma+1n2vFhYqjuQmf45umSo75iyHgvszf5/HzYCLDB X-Received: by 2002:a17:907:20bb:: with SMTP id pw27mr14247244ejb.102.1612123764893; Sun, 31 Jan 2021 12:09:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612123764; cv=none; d=google.com; s=arc-20160816; b=tnY7eDzoHZgu5swGeeByqzEvEhY7aRVVBjXGwQ1CUyOidUz69SpvsPpI5hG0wvFghX +ahhN+Cl+++/7cCYCemWTd5FHMHxvXNeofrDIYc7DRtH7/Y7lqIPGqjeyY1XboT6gONH F1iDZTqi3jS4zEWRE50GK+Js4YI7NowJ8x7uq6eRoMdt2qELGZuph1x6Uv2iOkWeq0iq nE56DIa3XPOolMF0FsUwHX4V+yNpr1T1bGUbfkAqj9kB2ObMFwj2Th0M2Ig1kTrCen1D iDR4M+uTP+2g0yD4c3+PSd8mgklVtHGqej182jLpPrTPotIFo7z1zK24xCn06vv34I6j g0uw== 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=KL4ClHuz/7I8c1v93iqBuHCJ0LGBrBIt4lTt0h3HcoY=; b=z6qTfTsaHBeiIvejpQgj0BtfGxEnem63CLFbKxroUj0gR3PkL7/eDVveeUzarM8hHH pK1uKffwGDAhevq0+YZkzSw/al+E53S5SaN6zgoiNrjgKAExSVyoup79mlrZGrGrxcsT aZXx64VaTZhoH4dNY4VkM8WYj+k8/8xxHOXtNhL0Z2xgyCf7WgN914R40A4yZ1qdc0tl 6LrKDDPzhFvrEFaEah6GsW689U+RzI3BAExDgjJLX9LculSXDJ6d/Ur3TkIPHPFipwJ5 kuje41Fgv8Bf+eYyi3KhjNrhuefbo8t1jaE1zVLNZ5XODJdFVGW+w/4R/X62MiRuz1ey 4unw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="N/B6V8BD"; 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 t21si12862723edi.424.2021.01.31.12.08.59; Sun, 31 Jan 2021 12:09:24 -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="N/B6V8BD"; 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 S231666AbhAaTyU (ORCPT + 99 others); Sun, 31 Jan 2021 14:54:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231158AbhAaTgN (ORCPT ); Sun, 31 Jan 2021 14:36:13 -0500 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B42BC0617AB; Sun, 31 Jan 2021 09:32:27 -0800 (PST) Received: by mail-pg1-x543.google.com with SMTP id s23so9152003pgh.11; Sun, 31 Jan 2021 09:32:27 -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=KL4ClHuz/7I8c1v93iqBuHCJ0LGBrBIt4lTt0h3HcoY=; b=N/B6V8BD5XiYvAupdqW1vbawkg3gyLvdAlZeMM0bF/xLOQGjMnDlOWSSkBZFul0+f5 EP7QtNlUMFjALXak6Sx5W/LhQa8wUdSw2zzV814nawqfyffFp/qzHxk5oFDD6LvxhwNC KuSBJKr5QRBMUi8quKx2XQA6OahBrMn1fCrb+5AzTrcXPfhieGh3yelskc/1ShXYudWm mpfa/YeCPiJGRU9Fvc+eAnLd7rkgNuPbq8cbM6hchVCZYs055YHO2nTXx4SybPNyHmhE hc5ykRlg+XSnQtHL/8NcEqkoeVrLLMWUj9I0NvDGNSv5BuvZUymDt0LKcmlBYwPKVwHe gUBw== 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=KL4ClHuz/7I8c1v93iqBuHCJ0LGBrBIt4lTt0h3HcoY=; b=F8nnL0DcHgpS5flvK+RApQICLKbLwraXysv0TWS5P4CFBHJpGXCO9a5ZpCcgQSxGJY GnSfwI8sn2Cwpsa26DDHj7vL0i8XlRSBEDO9NZDQxoNUdTlodn57k+9uQao0T1DlNff5 KaTcLIz2+IWn9/lnRIC1NqAzrjUgrQ3U6zUwd8fSWtXeT8cPMGdLu2UwsQtv/MT8N+r6 +AGMEJESTDoSQ/dis6sWqEZfRyYSxpgCfLY0XQvf4/w6OrVU3WQpk6ExK5WwZ6nwQAlP VT5lpUaaJHXZ5A7chKq41uiBQfBlYymX02KHuz23raJipW5vK+HAbHiRxp9qdG61eurJ o0ew== X-Gm-Message-State: AOAM532IWy0Rr5kXxbS+AUSxHKYFHR7Z/RDkYC7JBFNcMgIAqdlp6iRl HtjbD3STyl7YldoLyybQjSAe8Xi5YB91oQ== X-Received: by 2002:a62:aa0a:0:b029:1c2:1baa:eaea with SMTP id e10-20020a62aa0a0000b02901c21baaeaeamr12833472pff.52.1612114347133; Sun, 31 Jan 2021 09:32:27 -0800 (PST) Received: from localhost ([2402:3a80:11ea:e144:a2a4:c5ff:fe20:7222]) by smtp.gmail.com with ESMTPSA id b24sm1597174pjp.12.2021.01.31.09.32.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 Jan 2021 09:32:26 -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 , Thomas Gleixner , Mike Rapoport , Al Viro , Florian Fainelli , Robert Richter , William Cohen , greybus-dev@lists.linaro.org, ac100@lists.launchpad.net, linux-tegra@vger.kernel.org, linux-fbdev@vger.kernel.org Subject: [PATCH 08/13] staging: rtl8188eu: Switch from strlcpy to strscpy Date: Sun, 31 Jan 2021 22:58:29 +0530 Message-Id: <20210131172838.146706-9-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/rtl8188eu/os_dep/ioctl_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c index 6f42f13a7..bf22f130d 100644 --- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c @@ -1865,7 +1865,7 @@ static int rtw_wx_set_enc_ext(struct net_device *dev, goto exit; } - strlcpy((char *)param->u.crypt.alg, alg_name, IEEE_CRYPT_ALG_NAME_LEN); + strscpy((char *)param->u.crypt.alg, alg_name, IEEE_CRYPT_ALG_NAME_LEN); if (pext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY) param->u.crypt.set_tx = 1; -- 2.29.2