Received: by 2002:a05:7412:7c14:b0:fa:6e18:a558 with SMTP id ii20csp460351rdb; Mon, 22 Jan 2024 09:20:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IF6SVEkCn4zxFAWvZG1s10Lss2uzE1sLKtmPi6oqRBzbbxCm0/jDzJTyG80G5XmBThXvskG X-Received: by 2002:a05:6214:2623:b0:680:64c0:469f with SMTP id gv3-20020a056214262300b0068064c0469fmr5821152qvb.94.1705944034256; Mon, 22 Jan 2024 09:20:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705944034; cv=pass; d=google.com; s=arc-20160816; b=AIUJVlt+osHgdSSvm96QIRhPFmaoOZsUPwj0a1wF0WVnCjE6mXM8IjZURSfzMp/AxE BE0+v9HkcfJ5aydjMgur99ift13la0a1NqFG6QypH8qLuqzdYhB2ECisI97BCuJeaYrL FEG3jWaj5HX1mtjR5DFnla9rgfwR/OeQjqusI4dfjzPg3dxaGweZBi+wJIWDUTQ5Pz56 xwi8jbCEcz7PVVPW8tbXpiErlB17Hthdli5jtzM9DWUGLcTP8JvBEOIkfapWhHXWJLgd /AfB5uf2nSn2q/pZoTXVPF8Fbm+6xz1asTdcHkha58xOzbgJj3XBuSwyoLkbxER958xY a+Uw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=h7BJA4j1VBe6A3hQFnHWY0mPkglSLZd/d3MdEHRc7lk=; fh=RKFixF7TwC7J1pP4A8d483TZuQW1LyGH0vqszmRLG+k=; b=Pw/RXawtkfKC1oczeZq6AZD8sPstyT1hPSAn/QDKdn6BYd72UKKhYS7xR3zZXXfBpJ GbFDo0xCVrSBAF8phT2wpuvSe/LeBrsnDwe6gI+fm0qX2j4gNH1KIIMJzVEIcf+VVMo0 BcvY+CwhjpIOQC3YbDhsF4WCIHYXkko2xSmC6y25uKe858LICou/wKDHo/wWipIyiqeY hCOSYqYhdoUy3YAl8jIMRnpEf1sXnRX0JGcrZUaMJ6XfaoMwRE4MDDiBz9f8QfQnRRyH 2EWVkxI72CcAhZxIzabqMKoKu3ViqDeQBkFr3E4TXbZwzUCS2hFUv4MI2GsGCC5lMEUI BVVQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pM1dKqXL; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-33665-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33665-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id du31-20020a05620a47df00b0078132aff7d3si5824926qkb.536.2024.01.22.09.20.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 09:20:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-33665-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pM1dKqXL; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-33665-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33665-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 280BE1C23E16 for ; Mon, 22 Jan 2024 17:20:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3E1684F8A1; Mon, 22 Jan 2024 16:12:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="pM1dKqXL" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 6A8BC3F8E1 for ; Mon, 22 Jan 2024 16:12:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705939960; cv=none; b=uRkHaSqR1QrcZU3Pb48CUkqqU0V/1K3PoQeKKSoufH3Qa44M5iay+iKgzPA8N+YidE14KieidRukeh/+P8a86H1Z2v/AN2IBSUMkmTUAYZVoduTp4u8CjYiCwA1P1WDXHDXvvMu/u8t1T8+Wvc1EbfNGF56nP4uCmSpdELAapzw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705939960; c=relaxed/simple; bh=u40yPI1eo5OCBcJ6otQkqT3GuoiQ5GJ9+8tgn1ubg/s=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=u5/DSOkeU2SjPLX2GGH48qs9gHP+WIJBe1uF+DODX72wzgjVNZ0X2ZReCJcMZjEfylhGCF+8Aop63n+jIFAhtbjvUOPweDPzgtzo9K4sJSSs8N2VAtVPn98BkcqvL0zR9/Sk5XgXXp9aigYrGGbtqUh62ZYLqoT+2nnVsSmxVPw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=pM1dKqXL; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 049F9C43390; Mon, 22 Jan 2024 16:12:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705939959; bh=u40yPI1eo5OCBcJ6otQkqT3GuoiQ5GJ9+8tgn1ubg/s=; h=From:To:Cc:Subject:Date:From; b=pM1dKqXL0D39T4s644c17DUpE9aVRYMCKqL2DY9cAHmf7KA70sKxHCbT6ZZhifHk7 yzdaiA8XHCVk8NfFE8lNI+/bw4f5Kt9VmTjhBII3SDeGPyxI35pctal+49+XjHn0g6 8G2/p9p3a+MinQq6vII2pli08Lf7iwTQ12+ilub5Rhu6xvMCtvk8fExWs0XhPZ+lxO j8Fuj0gl2aUeDCe34MpT+uxbmnszi6/1g40H8Y95deHzg3Yoj5u0JBT6503P133d/w Q6F74z+6A8zlqEcwa1ceG4Z9xG/cjQ61zdpKsyCsz2thqSzEepUn4i2BB31Ke9KGkf lWCPhFqKQZ2Ow== From: Arnd Bergmann To: Alyssa Rosenzweig Cc: Arnd Bergmann , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Janne Grunau , =?UTF-8?q?Martin=20Povi=C5=A1er?= , Hector Martin , Sven Peter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm: apple: use strscpy() in place of strlcpy() Date: Mon, 22 Jan 2024 17:11:55 +0100 Message-Id: <20240122161233.125192-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Arnd Bergmann Since commit d26270061ae6 ("string: Remove strlcpy()"), the strlcpy() function causes a build failure. Since the return value is ignored, changing it to the strscpy() causes no change in behavior but fixes the build failure. Fixes: f237c83e4302 ("drm: apple: DCP AFK/EPIC support") Signed-off-by: Arnd Bergmann --- The apple drm driver is not in mainline linux yet, this patch is against https://github.com/AsahiLinux/linux/tree/bits/200-dcp --- drivers/gpu/drm/apple/afk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/apple/afk.c b/drivers/gpu/drm/apple/afk.c index 99d579d5ce47..9fbcd18878e8 100644 --- a/drivers/gpu/drm/apple/afk.c +++ b/drivers/gpu/drm/apple/afk.c @@ -236,7 +236,7 @@ static void afk_recv_handle_init(struct apple_dcp_afkep *ep, u32 channel, return; } - strlcpy(name, payload, sizeof(name)); + strscpy(name, payload, sizeof(name)); /* * in DCP firmware 13.2 DCP reports interface-name as name which starts -- 2.39.2