Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp10783811imu; Thu, 6 Dec 2018 06:46:25 -0800 (PST) X-Google-Smtp-Source: AFSGD/XwKxSKxg3lAgWXrq3ggrHHWub1gXTts/ZjSX4yqVY4j6IjTs0QUve0Pd86PVqsIFBYPUFH X-Received: by 2002:a17:902:b406:: with SMTP id x6mr27161742plr.329.1544107585545; Thu, 06 Dec 2018 06:46:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544107585; cv=none; d=google.com; s=arc-20160816; b=frugPhzXNuyjBozAd5PM4UUVE8a3uD8f3eZd1JLVpcK3niCBtylv1+TC8hgaf4NYsZ DDE4njJ8Gpw73bTeBHdcsw0G50I4GPsnkbxgrlX7kWr3Y0wc2BXc8aKghsP0SZa/WxWD 1jYN5XyN25BnwES49w1cHZ25sR5KjvPgagSIXm7T49qT+cm498ky/ntO0xqXj5gx3+Ft ZhktW2Hdejse0XVXhadv10ZaLzaV7a8tvALzaqd8elvmPkej6E993U4gf+1Bh6RZB0HG qxTuG5DqDGdS5ZVik9clAUo5plKV0kko+EbnRVEt9X85QoeUTpxaaflJLXVd88rBY2+U 1wsQ== 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=FVutDK606c7/+npRtB1sfz9QN/B/1RBdts781imywnk=; b=EPI7B5ZwlK6DnvJbBaTnauZ/BV3bow+M9GnSouWkJ+Z6jn8mT0cROwr01Tf7KCIEY6 uFGFauxVbRGBwNXWpVINeMA+gd9oClDXs/62ZaIltAslMSm7UkYd7EuPGiKtWhyMZyt0 jo2h29iCXqebKOjyHYdo4CUAUiQyZA9mNEDDSCzzOOBirlG5XT7q9dZF+uKAUjIooHDS VsNqVN4nKp1YYpXNadXDcHUc/QzaQ2oKv9ABfPpxCSu863ZsoveIcVSzNcVKQkXUkyos qHGcD3534dS9PQfzT1/y+vOSv1w2eYGQA7F1VpS+xBEUrjFEhD7NrEOyn2yPrNyooIik RnsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=OGEEZKhq; 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 m35si369776pgb.246.2018.12.06.06.45.53; Thu, 06 Dec 2018 06:46:25 -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=OGEEZKhq; 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 S1730495AbeLFOme (ORCPT + 99 others); Thu, 6 Dec 2018 09:42:34 -0500 Received: from mail.kernel.org ([198.145.29.99]:46814 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730473AbeLFOmb (ORCPT ); Thu, 6 Dec 2018 09:42:31 -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 595A021479; Thu, 6 Dec 2018 14:42:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544107350; bh=2m+cJE6Ie9DsgQyXYqbvZvbFORsttAsEPIx9879M02Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OGEEZKhq2413QsMVerI+ttirL79/2YqLNNHmlf7tzFJJ9BXM3UNpnjO9gMP9ADvG7 zqzuZdvA+PvnjZ6TeHMRHTL0/RJqzTkcG9uQF7CPnjdcNoEE9VE79LUYPgpTl0ht3R BPUup7PQydL2svozF9l4x7gpCsPsP37kMXnJ0Xdc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Laura Abbott , Daniel Thompson Subject: [PATCH 4.14 29/55] kgdboc: Fix restrict error Date: Thu, 6 Dec 2018 15:39:03 +0100 Message-Id: <20181206143003.301611791@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181206143001.749982936@linuxfoundation.org> References: <20181206143001.749982936@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: Laura Abbott commit 2dd453168643d9475028cd867c57e65956a0f7f9 upstream. There's an error when compiled with restrict: drivers/tty/serial/kgdboc.c: In function ‘configure_kgdboc’: drivers/tty/serial/kgdboc.c:137:2: error: ‘strcpy’ source argument is the same as destination [-Werror=restrict] strcpy(config, opt); ^~~~~~~~~~~~~~~~~~~ As the error implies, this is from trying to use config as both source and destination. Drop the call to the function where config is the argument since nothing else happens in the function. Signed-off-by: Laura Abbott Reviewed-by: Daniel Thompson Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/kgdboc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) --- a/drivers/tty/serial/kgdboc.c +++ b/drivers/tty/serial/kgdboc.c @@ -162,15 +162,13 @@ static int configure_kgdboc(void) { struct tty_driver *p; int tty_line = 0; - int err; + int err = -ENODEV; char *cptr = config; struct console *cons; - err = kgdboc_option_setup(config); - if (err || !strlen(config) || isspace(config[0])) + if (!strlen(config) || isspace(config[0])) goto noconfig; - err = -ENODEV; kgdboc_io_ops.is_console = 0; kgdb_tty_driver = NULL;