Received: by 10.213.65.68 with SMTP id h4csp895200imn; Tue, 27 Mar 2018 10:44:46 -0700 (PDT) X-Google-Smtp-Source: AIpwx48n9GalFBVLl08CKL535Blj7eKqdsxvYTMIwJI9OozQEqfTBWmOhzd2Kc+XjN3APkjyWW4q X-Received: by 10.99.105.202 with SMTP id e193mr187453pgc.84.1522172686738; Tue, 27 Mar 2018 10:44:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522172686; cv=none; d=google.com; s=arc-20160816; b=KyldiA06DwWod5Zh6RBk/i9bIjDjPZuDdBgAkD5NHppIypFd5YZNIcCy/OMn7fOeux wvzTyC3cYl6pSMz2rHTIx7c0+/sIYisea7rL9cg23eVTfPON1vtfsZRah2fLLssiQwNM 0QVAI1syVEzImJZYCnvp55rIMq79aZaYfpJzi85sEdvbKAPjUBWEzwUhPDCpu2dH9CBz I6DLpsXEAIvunpKCDkuSzQLIwbsnwgL8BHF11aglCmXQId8xf6O5zZUCNlwO5jMirPSY 9jBOiXsjVdW6FuocMbSm73SXqYLin/5OlKGbkFfSl5hZMkcbvzUWJoNmZmEVbE+TAO1b liVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=+qjv+ACRAvyxpugN60O9cqJTB+GPm+OlBV9AnrCO/uo=; b=Zf3XeWXKyDRtwOm6Ujq8I39ozlhRlmAepSShYVeru9lnxdTL9qJVtrwWwUZhqqejzA iygtv4kvrzsXNPMQeyfbvjpun8/at5NauXt+92upN22ADcnqErlm2yHPJVgL0jnSDaKU yxw/vUa/B8kJw+0WXeCuCGJgV2AYZsA5KwWIul5d+WJY2kPYzWm6LOIg3ndCo5sK0sRI /8mfhiNBIxnvpG+y96e44ekKxycF5HWEPsUOt7y1kfuFqzYmNT1KJMOyfOkwl1pi8fKD SYrTWgIZfmfi5BimgYN/ZG2G/SfeNpuoP6YhEwdKmM26I6y3ogJQ7dXUMLet8hnOvY11 cwBg== ARC-Authentication-Results: i=1; mx.google.com; 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 j91-v6si1632718pld.14.2018.03.27.10.44.32; Tue, 27 Mar 2018 10:44:46 -0700 (PDT) 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; 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 S1753136AbeC0Rmb (ORCPT + 99 others); Tue, 27 Mar 2018 13:42:31 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:44068 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754040AbeC0Qdt (ORCPT ); Tue, 27 Mar 2018 12:33:49 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 7B5FD11C0; Tue, 27 Mar 2018 16:33:48 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, NeilBrown , John Crispin , Ralf Baechle , linux-mips@linux-mips.org, James Hogan Subject: [PATCH 4.14 001/101] MIPS: ralink: Remove ralink_halt() Date: Tue, 27 Mar 2018 18:26:33 +0200 Message-Id: <20180327162750.092111711@linuxfoundation.org> X-Mailer: git-send-email 2.16.3 In-Reply-To: <20180327162749.993880276@linuxfoundation.org> References: <20180327162749.993880276@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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: NeilBrown commit 891731f6a5dbe508d12443175a7e166a2fba616a upstream. ralink_halt() does nothing that machine_halt() doesn't already do, so it adds no value. It actually causes incorrect behaviour due to the "unreachable()" at the end. This tells the compiler that the end of the function will never be reached, which isn't true. The compiler responds by not adding a 'return' instruction, so control simply moves on to whatever bytes come afterwards in memory. In my tested, that was the ralink_restart() function. This means that an attempt to 'halt' the machine would actually cause a reboot. So remove ralink_halt() so that a 'halt' really does halt. Fixes: c06e836ada59 ("MIPS: ralink: adds reset code") Signed-off-by: NeilBrown Cc: John Crispin Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: # 3.9+ Patchwork: https://patchwork.linux-mips.org/patch/18851/ Signed-off-by: James Hogan Signed-off-by: Greg Kroah-Hartman --- arch/mips/ralink/reset.c | 7 ------- 1 file changed, 7 deletions(-) --- a/arch/mips/ralink/reset.c +++ b/arch/mips/ralink/reset.c @@ -96,16 +96,9 @@ static void ralink_restart(char *command unreachable(); } -static void ralink_halt(void) -{ - local_irq_disable(); - unreachable(); -} - static int __init mips_reboot_setup(void) { _machine_restart = ralink_restart; - _machine_halt = ralink_halt; return 0; }