Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4811105imu; Tue, 15 Jan 2019 06:26:44 -0800 (PST) X-Google-Smtp-Source: ALg8bN4jf2G5h6513Lugf7nU9UDNgwWqZ9X/NYENkvMtupQpobDJAT3fGh6lZFq2pNMlyTRX13gm X-Received: by 2002:a17:902:28aa:: with SMTP id f39mr4382439plb.297.1547562404794; Tue, 15 Jan 2019 06:26:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547562404; cv=none; d=google.com; s=arc-20160816; b=0T4bTRtQC/FmuyYjp1A7E+n0JQGGq2gWU/GePASdBY4mb2XXWMQeRgos3nmoY5OQmq 0LyjxF4UyFG0EEIHttRmb6UTmcvRUFfTeQ7ERiZZvko9wsfo1YmDsPFA7T32DQoHpWpQ 2AfZMIrKSztWZbgwDAJbkA8FO42alNdF+KzBJnWuOvF9N2SD56oWAGIvxSp6MWzozNlr CRG92CZAA/+vwV7aBgcsKIVkVSV86TPlvy8fO6MIVnO/omFB2hf1SJM3r8qEBcpY9i+U q25Dq0P0yw1N6bdN2KHJPc8hBJZ8GAx+4m8rhsTaRe49qoaLo0wC4hvSmbep8N98D/w9 WMbA== 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=aRkE2XKwgx+US2i4/SZJa75bs+mE6Hzq8tUIKF//QYk=; b=mOpsipziP9czZHFPeSfu0stEjaPHA8i03QLHnArJ8DHM8xxWXRXeEpAU47d0Y4sovp c5NwuYHJMHQQali5pu3St9xxXPVK25FRBsHYGEAhbUBmbYGYt4BvBeRlzTWyyGXSETEf xLYRnMV8niz8uJkosxbjKRUOedEJ3tv9XFJYRA+Nxih1f/78sQDZJEw7GTDoTF56dKPy QGIVqVR5suUliCU3cWol19aUotqNZSroNTuCVbACfLS8WbNMLaQKpoP9ckn1dQfQcTkJ 0xoscTAccqQ61JyBWdKYtJnka9ubN0yIOErJkJmGZnIrcScuk8JUeOpcr7STusK1cCXl QzGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=phEn8ijR; 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 g20si3327685pgh.241.2019.01.15.06.26.26; Tue, 15 Jan 2019 06:26:44 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=phEn8ijR; 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 S1730035AbfAONys (ORCPT + 99 others); Tue, 15 Jan 2019 08:54:48 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:34298 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729127AbfAONys (ORCPT ); Tue, 15 Jan 2019 08:54:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender: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=aRkE2XKwgx+US2i4/SZJa75bs+mE6Hzq8tUIKF//QYk=; b=phEn8ijRTNMnfjlmvXOcMJnGP QGmTDrdPTGw9nStwVNHwtOapmcffeIceTzT4cu37bSSIMbRUtMb8272ugiOdUrGdVLAeVSRBQtZhQ jcggw1rBrmztug3De3ePlRFK/edJjRLv+kO5RLq1brDwMNE2dL6P8c6+syJw6K7sumQR4BWoXdTN/ 5l7GY6QDhX6C3s7MJmjTqHUu6TrxDMOkCwZFhxqHlUKOHDdvFR43qyopWnFWwfrzUc9l296d/zV/H crEvJW4ioOIhVfg07Jlb7bNzLDcQmyRZ1TNZyaVGhfyrebSDQVtTurgGjqaz4M8EOMh3KhzbnFbkH ho7zLGYAA==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1gjPAv-0001yp-D7; Tue, 15 Jan 2019 13:54:41 +0000 Date: Tue, 15 Jan 2019 05:54:41 -0800 From: Christoph Hellwig To: Atish Patra Cc: linux-riscv@lists.infradead.org, Patrick =?iso-8859-1?Q?St=E4hlin?= , Albert Ou , Jason Cooper , Alan Kao , Dmitriy Cherkasov , Anup Patel , Daniel Lezcano , linux-kernel@vger.kernel.org, Michael Clark , Palmer Dabbelt , Andreas Schwab , Marc Zyngier , Thomas Gleixner , Zong Li Subject: Re: [PATCH v2 6/8] RISC-V: Add required checks during clock source init Message-ID: <20190115135441.GF28946@infradead.org> References: <1546940318-9752-1-git-send-email-atish.patra@wdc.com> <1546940318-9752-7-git-send-email-atish.patra@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1546940318-9752-7-git-send-email-atish.patra@wdc.com> User-Agent: Mutt/1.9.2 (2017-12-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > hartid = riscv_of_processor_hartid(n); > + if (hartid < 0) { > + pr_warn("Not valid hartid for node [%pOF] error = [%d]\n", > + n, hartid); > + return hartid; > + } > cpuid = riscv_hartid_to_cpuid(hartid); > > + if (cpuid < 0) { > + pr_warn("Invalid cpuid for hartid [%d]\n", hartid); > + return cpuid; > + } > + No need for the empty line after the riscv_hartid_to_cpuid call. > - clocksource_register_hz(cs, riscv_timebase); > + error = clocksource_register_hz(cs, riscv_timebase); > > + if (error) { Same here.