Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp828664imu; Tue, 11 Dec 2018 08:11:40 -0800 (PST) X-Google-Smtp-Source: AFSGD/Wf7QQ6BbUsZ4J1QMbCKq5InMocPOgxePMFP2yFNxgr+CynD1zAA6VpPd3ldkflbf4bIJ69 X-Received: by 2002:a17:902:28aa:: with SMTP id f39mr16746042plb.297.1544544700666; Tue, 11 Dec 2018 08:11:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544544700; cv=none; d=google.com; s=arc-20160816; b=Ho3H/yR3q+i63W14xhSHLogyaUsx1nMMa77pXZZMqboLaHMb7RF7j0UxFjZWePIC09 6UUYfeXf4LnoJLai16nusS0b9JIqegYr132w7HZCDc6KlL5Sk7nwfnt4VhpLDN1NHOFU NDgDoe0bfiZWtgzQU+fOlVsfnaJSpM7noPPeCj4fgOZK1LBUjaSsr8Pu4Ucp1OWE/ixK bA3LLUG2CQX13CqOhxcCz0argMjRNQFi3ZAq/t/ms7fhPt5Vekq6PZesB6c0ZTCMRg1a WFoUq3v/vEO62cu97fU3aJH5mGyya0riarEyzIGutD7Nn9TgnHASi7i24yFDE8Swcuju A+SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=PhzwI/51KD+16bvCeEx/avp37sQO8yT8HJFIYzdtFVo=; b=DyExZZ6N2iphDXLcOKXtnlo5wLq4grFq6FSgP6V/PbO5fpZEmN/PskGRL95XjuRvpm x4+CcFuEdExLewIi/vGpXv6pqgP8IalI6PxTWHLEnW17k+NUVvuJF937RW+3R5Z7D7YB 0cBPdYhd1ExcEhSc4gz+qlHHAVLz7ZSK6YDbNlP1lgSy+7mFwOcmr5TonQYdfvgEW0nD HnIPwT7o6czZBdBF4/xiRIkdijiz2aoRL+tMY1mmRtLup+epdjiViYu0yLZ7BcOutMu4 LK7o0J8P83SbV7TUlGM9A39FMFqC66eajjIC5XeuW14OP1Ay9Gb0WOAXE1YCnsO+fk86 hBTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RtMAMuVE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 16si13085659pgh.58.2018.12.11.08.11.25; Tue, 11 Dec 2018 08:11:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RtMAMuVE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729844AbeLKPxD (ORCPT + 99 others); Tue, 11 Dec 2018 10:53:03 -0500 Received: from mail.kernel.org ([198.145.29.99]:41658 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729335AbeLKPw7 (ORCPT ); Tue, 11 Dec 2018 10:52:59 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0B51F20855; Tue, 11 Dec 2018 15:52:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544543578; bh=1R0kPdxQ+hHjkduxaehpqdU/cbaHqwiuEfqk5QpAe+o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RtMAMuVEeYPhipkSCskFX4cK9CFad0ji5Yne2wqtNe/w6uNnEmx3OHp6mR/cjMGjZ sYXCuaNjRPLfnmwND1GbMNKYxkT24xQ2fhASiFcoG9EGGcko2XAwAIFtckwZ0eeBhZ iWoLI/JxEFc1LHmMfSrMBjN3buRHKAjS4gonqW6A= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org Subject: [PATCH 4.14 52/67] staging: atomisp: remove "fun" strncpy warning Date: Tue, 11 Dec 2018 16:41:52 +0100 Message-Id: <20181211151633.021294573@linuxfoundation.org> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20181211151630.378216233@linuxfoundation.org> References: <20181211151630.378216233@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Greg Kroah-Hartman [for older kernels only, atomisp has been removed from upstream] gcc-8 rightfully warns that this instance of strncpy is just copying from the source, to the same source, for a few bytes. Meaning this call does nothing. As the author of the code obviously meant it to do something, but this code must be working properly, just replace the call to the kernel internal strscpy() which gcc doesn't know about, so the warning goes away. As this driver was deleted from newer kernel versions, none of this really matters but now at least we do not have to worry about a build warning in the stable trees. Signed-off-by: Greg Kroah-Hartman --- drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/debug/src/ia_css_debug.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/debug/src/ia_css_debug.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/debug/src/ia_css_debug.c @@ -2860,9 +2860,7 @@ ia_css_debug_pipe_graph_dump_stage( if (l <= ENABLE_LINE_MAX_LENGTH) { /* It fits on one line, copy string and init */ /* other helper strings with empty string */ - strcpy_s(enable_info, - sizeof(enable_info), - ei); + strscpy(enable_info, ei, sizeof(enable_info)); } else { /* Too big for one line, find last comma */ p = ENABLE_LINE_MAX_LENGTH;