Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp570323ybm; Thu, 28 May 2020 09:40:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6x7ygzcBGtAZHy8YP/UlAS02Q70vG/JzcNSXO1JNQFNHYp8TODxHwMhYDPLOnSHub6/TW X-Received: by 2002:a17:906:29d9:: with SMTP id y25mr3637331eje.198.1590684034991; Thu, 28 May 2020 09:40:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590684034; cv=none; d=google.com; s=arc-20160816; b=dtj20Sdnzwwe/dfcikNk4aFVgWTeY5MQm/PR69kzd//YcHgFRSMPor9NumTtyXK3/f K/gQ6yyatbKr09vt1Nm7k042B2zKWN0VWAMUCBG6ocf4pN/21VfHjW26cBufxQVLRbQR ECOlRkx2f7IANImZXyE+1jqxNULpSf+gmtyzLpl3ObE2HY0eyZ9BZQrAaiDGKhNWy63c QCGxEsKopWh8fvmQbLk8xmK+b04QbbQkqBvzF58lB4DUkOUBQI+tNxm4MOxrHAVYWmPt WeYuVil+baFQpOZEjJsIgTWZShAw8mI3y5tvuzklRScO2Us+Nq4fGadR8TUAb2Nw/oCP 9lZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=r4fH8GnfT5np+6+/8QGsW+4na11L1zq7o3d2PKdoUmo=; b=tnvEJH3JWfMgtWcAp7gbfIuTDkG0Ybqtbr9YSY1lQ6yf+knrhrxJZLKqpomzYnruP0 Gi0HgFPh0ac+sZPefPPbfZlRfU2d+dVGzz4Kie884LnQLvpWUufqSIcgI/reJyqA1kY8 dhu0NEEoz3LXrN4Wrm3HI12dJM7hMKsgj7YRULAarTFoIhbciDgaEBRtnv8IOcZKU5Ay J9SDnqqufz5K284GE6aqUMKktcUFc3eXiD0vIbxKlnkOiuqiZOfwRMWQknexlbDLp50B D04nCAClLco4e0N+EwddaILYvdJQARVtGcTN6xxccaiM1/sZZLp319eDIeAOorHWSuxg /Pvw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 89si3991328edo.209.2020.05.28.09.40.11; Thu, 28 May 2020 09:40:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405105AbgE1QgT (ORCPT + 99 others); Thu, 28 May 2020 12:36:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405021AbgE1QgS (ORCPT ); Thu, 28 May 2020 12:36:18 -0400 Received: from Galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D037EC08C5C6; Thu, 28 May 2020 09:36:17 -0700 (PDT) Received: from p5de0bf0b.dip0.t-ipconnect.de ([93.224.191.11] helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1jeLVl-0004mm-VY; Thu, 28 May 2020 18:36:06 +0200 Received: by nanos.tec.linutronix.de (Postfix, from userid 1000) id 3A4C7100D01; Thu, 28 May 2020 18:36:05 +0200 (CEST) From: Thomas Gleixner To: Jianyong Wu , netdev@vger.kernel.org, yangbo.lu@nxp.com, john.stultz@linaro.org, pbonzini@redhat.com, sean.j.christopherson@intel.com, maz@kernel.org, richardcochran@gmail.com, Mark.Rutland@arm.com, will@kernel.org, suzuki.poulose@arm.com, steven.price@arm.com Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, Steve.Capper@arm.com, Kaly.Xin@arm.com, justin.he@arm.com, Wei.Chen@arm.com, jianyong.wu@arm.com, nd@arm.com Subject: Re: [RFC PATCH v12 05/11] time: Add mechanism to recognize clocksource in time_get_snapshot In-Reply-To: <20200522083724.38182-6-jianyong.wu@arm.com> References: <20200522083724.38182-1-jianyong.wu@arm.com> <20200522083724.38182-6-jianyong.wu@arm.com> Date: Thu, 28 May 2020 18:36:05 +0200 Message-ID: <87tv00nhje.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jianyong Wu writes: > From: Thomas Gleixner > diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c > index 7cb09c4cf21c..a8f65b3e4ec8 100644 > --- a/kernel/time/clocksource.c > +++ b/kernel/time/clocksource.c > @@ -928,6 +928,9 @@ int __clocksource_register_scale(struct clocksource *cs, u32 scale, u32 freq) > > clocksource_arch_init(cs); > > +if (WARN_ON_ONCE((unsigned int)cs->id >= CSID_MAX)) > + cs->id = CSID_GENERIC; > + This is white space damaged and certainly not from me.