Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp797253imu; Tue, 11 Dec 2018 07:44:56 -0800 (PST) X-Google-Smtp-Source: AFSGD/XFuY1wD0mS3vv0iI3683K5MWs0CteDYAPA9c+4CYGl6FKQjRU+IiDrgRkBmhMbhy2UCUeB X-Received: by 2002:a17:902:d697:: with SMTP id v23mr16216128ply.261.1544543096414; Tue, 11 Dec 2018 07:44:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544543096; cv=none; d=google.com; s=arc-20160816; b=zu2fZlFsZ5JmB91L7g4bge6msUeTXRV6ZhAS4FNgJKwrPGRxThfG0RWgcMV8GA7bY8 Sdwc8oQppci7e3TTHpN+sjJtN/uIDFxsQH8lNTl7jJi7VtWpMV7LOiqIulCepyuCGmUg Jard7zVuFEbozzquaERY1Aiz9iT4PVlSda7l6gRPczR37z1Llv/e0glI9JW3MpOCpkKG oJkL0s/wT9rXg64H0HqCcg464mXe8RjiczYVGFDT9wbYHjNQ9mvZ6kb+8lVUPV3YsQRh DFf2DBQeKCshbvAJ5Rr1fRKzaY66yEKbBKcEK9+Et5ZXpfXVOr5rav2V5Lr/iPaxFjN0 tDRA== 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=F7nSeukPvLiE4VZnyZHtAOLCnNpNJ0NSb1bJ9Un63fs=; b=U6QudeT+OGVT+ccSTkCuC42ACIgJhKp2UlKjMHZWAUgqEXB37Ka8eAbM6MvkoT37LC 8/J48sTibQ6CjaSHMPHmlbLfYiQBLgVC5/VgAMSSn8kGdH4rO+7+Cwjp4PbdmzkNY9R5 3nkB7UamFbvqRrcTQ3+OFqo6CLbeoj3s5fT8RT8Xcfd3gfCM3sGycd3H59Wo223cOAWC 7Do4IWGJFe6MUftzFEMOseatZwn41IQfrcc8FTvx09kM4Lpj9yamyq0Cn+O2uWvRNLnH ByIdqXY0W/OenA4J5dVhS0lx5NqNYWWIUrXX1SlhJMYJo0jVRRMwA67zAZ3KZFo/KQFJ YJ6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MNy11VyU; 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 q128si14041334pfc.179.2018.12.11.07.44.41; Tue, 11 Dec 2018 07:44:56 -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=MNy11VyU; 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 S1727515AbeLKPnZ (ORCPT + 99 others); Tue, 11 Dec 2018 10:43:25 -0500 Received: from mail.kernel.org ([198.145.29.99]:59882 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727489AbeLKPnX (ORCPT ); Tue, 11 Dec 2018 10:43:23 -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 730D020855; Tue, 11 Dec 2018 15:43:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544543002; bh=S7P26MtZgC4AoJw1JZzJkgETHDwy+5JjFUO43f4T/X0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MNy11VyUqjSkzT15TrXwOi2vl6RUWlDcHzKewCMS+xB0VLqmvSnWgpmzlaX8ar2pF 2Wm4bzz8wxG7JNHz1CGeDvqi2CDRX16TdCL7oMIX6T2Aw2LmlWaBT92BCLaquqVuRx XQm90SD8x/D1l3bmPVTI6P50s9r+Ld05Hg5cY1Lg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Laura Abbott , Daniel Thompson Subject: [PATCH 3.18 29/54] kgdboc: Fix restrict error Date: Tue, 11 Dec 2018 16:41:17 +0100 Message-Id: <20181211151547.771680149@linuxfoundation.org> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20181211151546.010073210@linuxfoundation.org> References: <20181211151546.010073210@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 3.18-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;