Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4178397ybg; Tue, 29 Oct 2019 03:22:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqykohKj20FUH2FrRgXge/WtoFPQRaMrsTgXvdzuZ7SUWTrzUmSerpe2GhbHUOGTBFWFS4Dy X-Received: by 2002:aa7:d8c8:: with SMTP id k8mr24300472eds.246.1572344563513; Tue, 29 Oct 2019 03:22:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572344563; cv=none; d=google.com; s=arc-20160816; b=CM5caOyVQsRoeT30fu7aSsIpu+/etZqrlqn/izzgZbLVtIecQJNlLqws4PRpELS5EZ qYHVRxccs0RmXVREw9nc4jtGLEELPXWYgXpaMTvE50l86yCLXhkmZsIFmiFJku/m++76 5JPryuhtqVJJdpzcT7v4+1ZIFXi7eQfyvTHiTwGgE+fEzqDxiHwig3x6PzBNxLMucWQo xbcmbLgU+BuZJzIE6crsn78CR9b7Z2Tflr2/3bmy4UkeTiMvDe5Ftbdz0lcN9F6Bmya3 ZA6P2NVVOGD1Tt13pOedGoEJ3r+AXA07F0j3PICYxLLOP765TuxvEyQc+cako9bGuqeI UFqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=iENbg+FdOJeAwjiRGinPqnU5SrOnnqln7JfFosCjnn4=; b=1GwIMlBNkoV2WKiGX0O5qWwXvXisv44hWQsLkFUFIJYyH5KbgxnCKz65igBXlYmJrQ KxB0MSvzi1egzqX8p8xqSFsjjsW1p2whGA/gh0En6VHkVcHnJsmn0EDaGvCTPu7HyJax cDQm1R0FKW+UOsP8YMVmyG5kEtA5P/h8wMgiKekoSNTEhA6TXqjzA72iPN3iBCtR3fOf m9BSyKWdWVO1yKclCvuwfgfBt+meU0C8a8J9Oylu1loAry8rS1ZMO7ZKsuyNofgkx5E8 S7BbUHGe+oiSgauRcjBH5GzTEukfCiRZWEjdW44YwFSg8LmDoDUjaUFMyBi96DFyjMRV OIOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=H3JkTksc; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a26si2965975eju.33.2019.10.29.03.22.19; Tue, 29 Oct 2019 03:22:43 -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; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=H3JkTksc; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731382AbfJ2JPN (ORCPT + 99 others); Tue, 29 Oct 2019 05:15:13 -0400 Received: from pandora.armlinux.org.uk ([78.32.30.218]:41732 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729876AbfJ2JPN (ORCPT ); Tue, 29 Oct 2019 05:15:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=iENbg+FdOJeAwjiRGinPqnU5SrOnnqln7JfFosCjnn4=; b=H3JkTkscyd9P7wDj27DHoHwRV ZRLlduecjL1PLM71TFPypN4uUjukvtpEwLe45Re5UyWtlmfQ55pC0oEwBwzNSBGA9mdpSKkar7DvS C8uZI25CEO34oBSLmWGrDtIOw8+XhRSUPcWrRS1VqFAnl6QiWXMCnSNRKG2I/w+l5yeK8Ve6ccaFd 1kjTwJQC0uIRYBCqvwAKUUVFcjzl7zH1qSQfaUZ74Sd5xHV7727LW8I9aOM+ZO9u6CTKqyVE9H+5l yGLChwVob0lycs2Ve0oYi0oEp7pS8SKVsAdUf5ucOk+GdclZo0OQre6e+Gxy0LKFV0L1PNZImYAr5 eJT2c0JBw==; Received: from shell.armlinux.org.uk ([2001:4d48:ad52:3201:5054:ff:fe00:4ec]:48926) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1iPNaK-0000fQ-HD; Tue, 29 Oct 2019 09:14:40 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1iPNaD-0004Vk-Up; Tue, 29 Oct 2019 09:14:33 +0000 Date: Tue, 29 Oct 2019 09:14:33 +0000 From: Russell King - ARM Linux admin To: Saurav Girepunje Cc: joern@lazybastard.org, dwmw2@infradead.org, computersforpeace@gmail.com, marek.vasut@gmail.com, miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com, gregkh@linuxfoundation.org, tglx@linutronix.de, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, saurav.girepunje@hotmail.com Subject: Re: [PATCH] mtd: devices: phram.c: Fix use true/false for bool type Message-ID: <20191029091433.GG25745@shell.armlinux.org.uk> References: <20191029032142.GA6758@saurav> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191029032142.GA6758@saurav> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 29, 2019 at 08:51:42AM +0530, Saurav Girepunje wrote: > Return type for security_extensions_enabled() is bool > so use true/false. This doesn't seem to bear any resemblence to the subject line. > Signed-off-by: Saurav Girepunje > --- > arch/arm/mm/nommu.c | 2 +- > drivers/mtd/devices/phram.c | 11 +++++------ > 2 files changed, 6 insertions(+), 7 deletions(-) > > diff --git a/arch/arm/mm/nommu.c b/arch/arm/mm/nommu.c > index 24ecf8d30a1e..1fed74f93c66 100644 > --- a/arch/arm/mm/nommu.c > +++ b/arch/arm/mm/nommu.c > @@ -56,7 +56,7 @@ static inline bool security_extensions_enabled(void) > if ((read_cpuid_id() & 0x000f0000) == 0x000f0000) > return cpuid_feature_extract(CPUID_EXT_PFR1, 4) || > cpuid_feature_extract(CPUID_EXT_PFR1, 20); > - return 0; > + return true; This isn't explained in the commit. You explain why it should return true or false, but you don't explain why converting this from returning 0, aka false, to returning true is necessary. > } > > unsigned long setup_vectors_base(void) > diff --git a/drivers/mtd/devices/phram.c b/drivers/mtd/devices/phram.c > index 86ae13b756b5..931e5c2481b5 100644 > --- a/drivers/mtd/devices/phram.c > +++ b/drivers/mtd/devices/phram.c > @@ -239,27 +239,26 @@ static int phram_setup(const char *val) > > ret = parse_name(&name, token[0]); > if (ret) > - goto exit; > + return ret; > > ret = parse_num64(&start, token[1]); > if (ret) { > + kfree(name); > parse_err("illegal start address\n"); > - goto parse_err; > } > > ret = parse_num64(&len, token[2]); > if (ret) { > + kfree(name); > parse_err("illegal device length\n"); > - goto parse_err; > } > > ret = register_device(name, start, len); > if (!ret) > pr_info("%s device: %#llx at %#llx\n", name, len, start); > + else > + kfree(name); > > -parse_err: > - kfree(name); > -exit: > return ret; > } At least this partially matches the subject line but it looks unrelated to the other changes. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up According to speedtest.net: 11.9Mbps down 500kbps up