Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2610055imu; Thu, 17 Jan 2019 18:11:06 -0800 (PST) X-Google-Smtp-Source: ALg8bN4nrOu00Yu/fzRiaEJ+HfFYKgAZCjXdQ3cPK5fCLFTKO72yuXafBuwmUMtVs825jz/gaY9i X-Received: by 2002:a63:d34a:: with SMTP id u10mr15950436pgi.301.1547777466003; Thu, 17 Jan 2019 18:11:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547777465; cv=none; d=google.com; s=arc-20160816; b=ph8Xha6LxABRvZOiuJRYWNTJFSzErCgCb9wWJbETFfzYna9AMsxjn53enX2xh/Fzem zmgdK/A6pkJ7aT105Bvz/JGrLuw043RsjBXFpC4WGfHYYE9X6sOGo+SBKH9B1KLixxAa cALeUudHnvmhSWf3mC9UQeSgl5yvYpCTFxfSxK7ect4Lhcf+m4hiI7S5z+PJIXpzJ9Mi Num0Q73buUiujp9ji+N5mPhJvkKULKdksIRzKO75uxx/DJvxAJa1m5J6r6RG8xWj9fSo WB6KirgVZ9MS+XBgd5et6eevg3Xima/yd3Npz3nLNWuV+9gOK7XwgtjL8tIiJH4kJmI1 BI7w== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=paluYHDkyOnHQspJAMYbAjdsmLDqwddiOV/tHcBvaXI=; b=Az21fX4VuxpskzcA6ou+Hwxk/44vQUkVwVNawSmRTdC2VCs639w1r80Nm9rkj1vntV BCrjny6x9s15zMUgzd/LdI6BkJ/sG9A79S+TmPSVA26QetOT5xcVOgT5090SnzNl293g MS2q75apy88PuhCpKa/YqfptfVQIlOpSAkgP4ObCNPUSUP2iuZ3fw1qLKW5IZl0Xp0o2 VUIDVicLSS/NBEPH+EiQr/pBPXbBF5isj6/Mq8N/ZE8mGIAgCwIRRRZIFwC6BqCapBHk Wqj8Y+PYzsaMaCP3jbrjJsMsDT0b2PizEPoH6IKiWNuyuVpvHur+5d/9sUqIDNusxxuD 5Xqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=OlrKycMN; 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=wdc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p189si3475166pfb.0.2019.01.17.18.10.50; Thu, 17 Jan 2019 18:11:05 -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=@wdc.com header.s=dkim.wdc.com header.b=OlrKycMN; 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=wdc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726972AbfARCIg (ORCPT + 99 others); Thu, 17 Jan 2019 21:08:36 -0500 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:12945 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726329AbfARCIg (ORCPT ); Thu, 17 Jan 2019 21:08:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1547777316; x=1579313316; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=nUzTQsPZiSZq/mJIX/AY5MQuROuAFQ9ZS3mpZfR5e/k=; b=OlrKycMN85fm5KJny8ya+mNFRqwBW441covWwpXycsVuLlKbaxa+eOwd qwnKdeFlDuvNloxonHgrQydUgo7TZ4Xlw2o6eQlggCIXTdbyI07WHmrOF rYGMMG7Zr2GfOt6hODbSHGJpjRvzgWzvMsMVTco4X6zZ+tkEwN3Ys1LjC wGmKRA1xpnDi3Rpx5OVAeHTTJPGYUj91Zczc2nH16t/CFyA15RdRonvO0 7iNkJBlNa5/SH+lI/h1zWng/D4QgTCX0SU5UyLaqNiVbdOumsJ8pnEGHX qDBVZiajVjI0TJ266QEoAdoqouzYhMoB6BvwKHhQ5bJR9RGY1ANEcNLGz g==; X-IronPort-AV: E=Sophos;i="5.56,489,1539619200"; d="scan'208";a="99142786" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 18 Jan 2019 10:08:12 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP; 17 Jan 2019 17:47:52 -0800 Received: from c02v91rdhtd5.sdcorp.global.sandisk.com (HELO [10.111.68.123]) ([10.111.68.123]) by uls-op-cesaip02.wdc.com with ESMTP; 17 Jan 2019 18:08:12 -0800 Subject: Re: [PATCH v2 2/8] RISC-V: Move cpuid to hartid mapping to SMP. To: Christoph Hellwig Cc: "linux-riscv@lists.infradead.org" , =?UTF-8?Q?Patrick_St=c3=a4hlin?= , 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 References: <1546940318-9752-1-git-send-email-atish.patra@wdc.com> <1546940318-9752-3-git-send-email-atish.patra@wdc.com> <20190115135229.GB28946@infradead.org> From: Atish Patra Message-ID: Date: Thu, 17 Jan 2019 18:08:11 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20190115135229.GB28946@infradead.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/15/19 5:52 AM, Christoph Hellwig wrote: >> + if (hartid == boot_cpu_hartid) >> + return 0; >> + else >> + return -1; > > No need for an else after a return statement. > Correct. Will update it. >> +} >> +static inline unsigned long cpuid_to_hartid_map(int cpu) >> +{ >> + >> + return boot_cpu_hartid; > > spurious empty line above. > Sorry for that. Will fix it. Regards, Atish