Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp939039imu; Tue, 11 Dec 2018 09:52:46 -0800 (PST) X-Google-Smtp-Source: AFSGD/Xsq5bTj2vUfBOAr6cXz8OL93tuu0y6y70wEe0Vdtm/OMdjPoK6mr/pHtj0UTOtsbaS3/ML X-Received: by 2002:a62:1f53:: with SMTP id f80mr17127195pff.92.1544550766328; Tue, 11 Dec 2018 09:52:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544550766; cv=none; d=google.com; s=arc-20160816; b=nJjg1SbgT4zG1jQdgZnTQJgcmqB22ONEgUSX36BAcf1ACPOrpb1FTeEr5n/v0RxC5/ BQkov2UIPKmrPwwcnGBj4S13+HMZVT0ZmJTRf36ln7M8zYqp1pOSWXYtXGem/cRqzdqL LFA5+aI72v4VU1+kDDA5WH5wZZf0hXeF4PLkpfQXZVgYJM3LBGZtE+0Ddwlvm80rQu5A 7KtN3xPiKkMAnA3pJoZuHlIyd/0Y/IKX89rxIdY7CRrvxsXxQuEcj2bNGsfKQ+ZOaToy BXzvggqRpdly70f4jAucYYlwrKxZdoVEE70G5/jCVFYfEEa2MDuxDpFwD2mlNWfnLFbI rYqA== 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=BWt26ngLX28I0LLb6EZxtcbMPj1d2wk8FDkEqoMyXMI=; b=FtuatBsQwMywBPuOktWAM7X/dBoWg2uFYgraSuaKv9gHYczGF2NrFxCMaNsHFpGw3R 3M1PMhUi9Wt9HefT71Z2S/tjAJdwMz46wGvCC6dNziMsaGGN5o7C6XkKJ2gJEQqSyA9U CxTmIB8nr9xfO5xWNTngdmxtAT+8fyXBgkKlLIiX6GU0+TVoTx+Mf5q6/898UFxST8EZ +sGRs+4SnylcMWB4ZOgIyuwiTB4cxQ7DVrb/Sr/TwUkJPya0hJeKiEcnwf2hpNHkHXIe 4SLvJ7o4ohYRRfwmPYjaiZdkyfr8WGXbu7aIPNAXc3UDUijDJQ/IusTh7Kowv8bw+ygV Rkag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BknMEHFV; 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 i39si12994644plb.256.2018.12.11.09.52.13; Tue, 11 Dec 2018 09:52:46 -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=BknMEHFV; 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 S1728321AbeLKPqT (ORCPT + 99 others); Tue, 11 Dec 2018 10:46:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:34662 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728295AbeLKPqO (ORCPT ); Tue, 11 Dec 2018 10:46:14 -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 2CA212087F; Tue, 11 Dec 2018 15:46:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544543173; bh=FN0nVgiizvVtNgxqljH4hMf2nWkcV5pSPsehAz0hfGY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BknMEHFVVAXdb2/IvW0W2v9OLSn6dIylJtIFiWUUec7Cr0XkaW/0QnnZqzuUjiaQO HL3Ckdvsdsz36AyYiSxcahSkAdJBWA1GoK6fI0U09SKAq9QJNHgWMq0kAE+DrNEFp9 ujmA2TZFalS9ubRvO7xkB/tmXNKyO08ALhSUWJvs= 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.4 40/91] kgdboc: Fix restrict error Date: Tue, 11 Dec 2018 16:40:59 +0100 Message-Id: <20181211151609.155918034@linuxfoundation.org> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20181211151606.026852373@linuxfoundation.org> References: <20181211151606.026852373@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.4-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;