Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp10786039imu; Thu, 6 Dec 2018 06:48:34 -0800 (PST) X-Google-Smtp-Source: AFSGD/VL0cRAYNOkd5WK8Fo3q4Ig76v/8vLFoXOTSPXi3nyaET2MqtkDvHrJDS0NnAlcQlVFj4c4 X-Received: by 2002:a62:37c3:: with SMTP id e186mr29541793pfa.251.1544107714161; Thu, 06 Dec 2018 06:48:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544107714; cv=none; d=google.com; s=arc-20160816; b=ejqtNavVrP1JlC+z+yBQ5NDRr1RTUWsBMFmmj9yAKZ9Atw+6rYX0nPKexyMvS9hWpP ci2CoptIfJkga6OcWZ94Z1lnuk1c/qVkB8iC9lCh71Yun8w3ATcCRsek3hhr7Ziaz8To xvBfaVE6QTFvld0Z1ek76yhoa7tE3JnH+B4MSTt95SxV5GBQcJLhLygLRJFNcvxJ/JOZ bg37+SHxn9K32P+KOv2bcy2uHEjUMbsK+aAd/RWWGV8rarW56tW9+SyCz54zPcsH5tKi ukcQTtdFIVSwkRZsc3bsg0riQ4Dq9vqkAR25eusTykBrkGvXqY47c+Ulc56DTAWlKmLF bIDA== 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=D/bx99i9TW38w60ogG/nTYP1KYzZ1sdgSKt3KxqE7b8=; b=u8TxRs05Mjjijhc2HfhW1BhkiyBabPqIr8TxULhd8NG63Vk5/fU/2HIxFmfbrZK8Mg xTj2v8n17oKvmWVvKvv0Za013HacWHq23GwvHWKvkd7ipuHzNMPXzVR61Ww+eHme9Tyb DWrFmTDCi5oDtHodKKoRgcJjWNvlIcFJCs+DoaowkLsjdUpQRY+jhsDVoIh5gkeTnXMq NGGxTToKIEUve3uFK3RbaW6f6Vi4rinZR8sWuxes2GL+/dxwgHcdy+P/jbMshSP98hjS o8jjtw56vAJcsi+6dkBwwnkZEez3y7JiUgQ0n/mS4cLvSZmE0Xh7qWfEyK1hwBajetjy lnRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1oqSRRET; 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 l66si408793pfl.258.2018.12.06.06.48.18; Thu, 06 Dec 2018 06:48:34 -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=1oqSRRET; 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 S1730939AbeLFOos (ORCPT + 99 others); Thu, 6 Dec 2018 09:44:48 -0500 Received: from mail.kernel.org ([198.145.29.99]:49456 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730926AbeLFOop (ORCPT ); Thu, 6 Dec 2018 09:44:45 -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 0485E20892; Thu, 6 Dec 2018 14:44:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544107484; bh=1d2EiBSh3RaBucDrfAOGMeRh3XdBvqAlH7ggcHKPCpM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1oqSRRETB05AnI1zB8PCKwakGYx6WYrSz7MMjTYgEwAUHNSI5eDP8rnFjmUEMrkwK 4veJaaLfA78dn62mAm9cMwb6w/dJ4HFb+x6NFEZo7PsqqXFt9stsGCiJniSs4NSvaJ wsdM2zZuDY24pJrKGpV8F89X81BAuH2FkHxsGixg= 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.9 023/101] kgdboc: Fix restrict error Date: Thu, 6 Dec 2018 15:38:22 +0100 Message-Id: <20181206143012.936493654@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181206143011.174892052@linuxfoundation.org> References: <20181206143011.174892052@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.9-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;