Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1539736lqe; Mon, 8 Apr 2024 11:50:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUnsKlGQFyiyMFIpfLBf72E5/4hqfN2JPhpbkmwYiSTSSKl1bYlBLk7Yhkthq7728BmdZTVN+9sDQobnnQnu+8xV4qzCX5pObFxBTBExQ== X-Google-Smtp-Source: AGHT+IFDNT3kIkGLoSzibwMFCMtXQzKSVdcgKTmxQADrb3yIKhJof+1y3g2o9/ZZDU+h9XRvOSen X-Received: by 2002:a05:6358:1911:b0:186:2e0a:b49f with SMTP id w17-20020a056358191100b001862e0ab49fmr1973010rwm.21.1712602214769; Mon, 08 Apr 2024 11:50:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712602214; cv=pass; d=google.com; s=arc-20160816; b=K0z8yaffbrUtXDmkIT/DmOF7AtrwFQMeQNzvlx+DFNoDCDz1QAMSVO430Act880CmL nVRydbB4x+j2dYU75SS297hpcoSNiHH1Gr+Coa5hXbKw+/c4U4shYWngkya23AjPiw9I RX4bCmpQMqDA3Ts3W9cEJOMos2l1iamfXEG9+3u6dTVeaDHlUxgFzcup6M2SFONr3RZs Bv2T/PBK6WD7mjg7bOD74XYXijCq9Xhww702SxLtnpKOP+8FDgSx/CRM/bGZKbkABvVZ NIFxuxVshcas20e9iTbGYUPvP3Wxs4YvQ2yXUpxOfv2vTfz5qMx62BIR/KepxEgjAwcH lcgQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=subject:cc:to:from:date:references:in-reply-to:message-id :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:feedback-id:dkim-signature:dkim-signature; bh=uabcAv4sm9QYZcdZ/b6FrksBhz9HMv6R7WfGoejGE2M=; fh=yPiHcp60JsnEDP+mTjfvsIHLv4hbNAKMWKEFpjlBoSg=; b=eLWTeg0X26td0u9nNPrpHHQJNL/xB65/BuQfOzhEr3YQJ/ujgqTGgv8dVpXPAKhSUq VH43ykuWEoJG13SJC8p8dAmG21T4EOvKLauf1f7S2RERzcKEjEtccgDTaZ3cMU9MUWf/ eEWfpTCQLLrLj7sMzx0l7BnhH0OuX8P3FExPLYUQpp+mm+5AJO/GafXtLurUIHWl5FTE etKWeF0pmM+sQIUiRaXzFsopjYcvSVvpO3lNY+4fyvpf5C00t97s1qw9C4HB1Lrjoxto /LsG8qjVc1jFeiJK9kmGeVt8PJhA2wBC67UzF4XfnHhlaoGLPwCZaMTqgzS0dOxJDNXw +72g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b=X4lqC6PP; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b="brA1246/"; arc=pass (i=1 spf=pass spfdomain=arndb.de dkim=pass dkdomain=arndb.de dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=arndb.de); spf=pass (google.com: domain of linux-kernel+bounces-135803-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-135803-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id e7-20020a636907000000b005dc864bb6e6si6758231pgc.634.2024.04.08.11.50.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 11:50:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-135803-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b=X4lqC6PP; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b="brA1246/"; arc=pass (i=1 spf=pass spfdomain=arndb.de dkim=pass dkdomain=arndb.de dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=arndb.de); spf=pass (google.com: domain of linux-kernel+bounces-135803-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-135803-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id E4A19B2598E for ; Mon, 8 Apr 2024 18:16:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7431A1448C4; Mon, 8 Apr 2024 18:16:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b="X4lqC6PP"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="brA1246/" Received: from wfhigh7-smtp.messagingengine.com (wfhigh7-smtp.messagingengine.com [64.147.123.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EACBB143C67 for ; Mon, 8 Apr 2024 18:16:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=64.147.123.158 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712600166; cv=none; b=t2qb7o8qPYTjABuAfgdDcUhkhZsl51PVzMenRMxV7TQab2uMdTeGF0ZlVI5ZquU9cCwR0z+JmjptRJNnk9NG+j+JAPuMMIMJs9o36+e9IABwWLnOXzS4FAlWcuETKB3dgEZwCUOVyGmEM5gn20axREYWv1InB1VkXMbjJjYzBsY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712600166; c=relaxed/simple; bh=MDYifrGyvwaoGVS+wMS9G7XMJdOcFm56x3yKmUDlCjw=; h=MIME-Version:Message-Id:In-Reply-To:References:Date:From:To:Cc: Subject:Content-Type; b=cvr8IAzWJJENKdI5vlG44jA9vZ+k8MYnAyZcaltORDBnRs41N1qswDuny63EV0lE/nFA6l5FpH7CdvgDGHvXHHs664/BpNlyQ4dgiMEIqGFWC1BUpL5+cG00qwPHednxHzDgdu0hP+MYYg3gY1UqjugqwunqMUfhKuIxA/nwpjo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de; spf=pass smtp.mailfrom=arndb.de; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b=X4lqC6PP; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=brA1246/; arc=none smtp.client-ip=64.147.123.158 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arndb.de Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfhigh.west.internal (Postfix) with ESMTP id 0FFE718000A2; Mon, 8 Apr 2024 14:16:02 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Mon, 08 Apr 2024 14:16:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1712600162; x=1712686562; bh=uabcAv4sm9 QYZcdZ/b6FrksBhz9HMv6R7WfGoejGE2M=; b=X4lqC6PPRq8/BS0cG3KhmAVnat HyqBcPaVzsEiVwxpPN3rbtDmRgU9knT33j8At7hboS2MTa3cumVGjQNlivQyxAFZ L7EbB76mAopFndsMBr6RHuGUF5XcOmPchlxjgtFCyd+D/gx+aTna7a+j0t3DqjuT RpqwRCs3gc37ez6LlxXOaQOxlXNfk4OrMaL50j9snDNaixyf3hT5mTL+PxTgtMxj dZiZrfcTReOxtL5EvkK3Ueo8EeI/XVLuJ9/gfwWvI151T56yHXBrWcb7H6TSGdL8 VkW20KJQxR3KhRn6GXZDVLuLaoO0YwE5Vi28y5CNcTqA7KTjENrgTZ3VCmOA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1712600162; x=1712686562; bh=uabcAv4sm9QYZcdZ/b6FrksBhz9H Mv6R7WfGoejGE2M=; b=brA1246/ZjazOoL77tMsNgpiLQe1cwwZOea1I4nVQ8o2 B3LnC1bTfVbLaB4oq8qWOMQM8Vo1TVX0Uyc5ozULKQQdzkbgbJcW0yaVJusIz6av Ots8tZz3d82uE6Incvjvqap5+iORqpx3eIuZJzoKR2ILAO0ZI3gKmdh4WTFFjLwH 56Ab92ae/0M0cMxh5Z+VeazcLG6joIoQ9oEhEN21wTr9lavJ/j0fKV2RePHl86Pk 9WPwxMVlf2YJeFlBQQ4W1VxKcldDMgiemwLTfleOd13w1IS+nlYZXFbAS/004Yyr oPVvXlPbAkYg40PpXQj9eYFQbFtLuxwkdlvBBr6TnQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudegiedguddvvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvvefutgesthdtredtreertdenucfhrhhomhepfdet rhhnugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdruggvqeenucggtffrrg htthgvrhhnpeffheeugeetiefhgeethfejgfdtuefggeejleehjeeutefhfeeggefhkedt keetffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grrhhnugesrghrnhgusgdruggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id B6FB7B6008D; Mon, 8 Apr 2024 14:16:01 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-368-gc733b1d8df-fm-20240402.001-gc733b1d8 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <132c99af-bbac-4dad-84b7-7ed016517d0c@app.fastmail.com> In-Reply-To: References: <20240328140512.4148825-1-arnd@kernel.org> <20240328140512.4148825-10-arnd@kernel.org> Date: Mon, 08 Apr 2024 20:15:30 +0200 From: "Arnd Bergmann" To: "Justin Stitt" , "Arnd Bergmann" Cc: linux-kernel@vger.kernel.org, "Greg Kroah-Hartman" , "Nathan Chancellor" , "Nick Desaulniers" , "Bill Wendling" , "Franziska Naepelt" , "Johannes Berg" , "Yang Yingliang" , "Erick Archer" , linux-staging@lists.linux.dev, llvm@lists.linux.dev Subject: Re: [PATCH 09/11] staging: rtl8723bs: convert strncpy to strscpy Content-Type: text/plain On Fri, Mar 29, 2024, at 00:01, Justin Stitt wrote: >> Change both strncpy() instances to strscpy(), which avoids the warning as well >> as the possibly missing termination. No additional padding is needed here. > > Could you also clean up the strncpy present in > drivers/staging/rtl8723bs/os_dep/os_intfs.c so all these are cleaned > up at once? I originally tried not to mix the general conversion with the warning fixes, but it looks like it has the same issue in theory. Not sure why there is no warning for this one, I guess it's because it copies from a fixed-size source of the same length? Anyway, it's clearly related here so I've added this for v2. > Maybe we could use the new 2-argument version of strscpy() introduced > in Commit e6584c3964f2f ("string: Allow 2-argument strscpy()") for all > 3 of these too. > > It looks like: > strscpy(dest, src); > Done now, after double-checking that the sizes actually match. Thanks for the review, Arnd