Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp893486pxb; Thu, 19 Aug 2021 14:07:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxy1K/fCx5aP1xUsH8hURUziENu9zuVTC/KZfHrwroi99gQ6IgAYVAXwLdHM+SRFqMT8XRb X-Received: by 2002:a92:cd0a:: with SMTP id z10mr10938672iln.137.1629407240534; Thu, 19 Aug 2021 14:07:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629407240; cv=none; d=google.com; s=arc-20160816; b=Z0zArk3pLXS5oyXCnL+9OYsjZC8r2TLyITwA+dhh0/lv2CQqkp+numjsVOouWF0N// KejY6JImb2hceD0mNUm2CZBSCoZhiUzL6meeslPqKmHjBPxpkvORuKnpw8biKvLIo850 sBHQI+22N3LsLMr4QA0o8sSl3kk7EGQ8JI4LAp0Qdsrja+I+JPNgxpZHMPx1ryOhKdLw P6fDb0P6jdeicnacBNecw7+0f0feU6gsMtkOb1ryew083t0kJdJurPD7eC3rEUjK8t9V lMpEwZoyktXRiAwszCH0sBmlc/mJDjjkErWka6/e4fyfn1NvUUL8gW3GbKRTd0A7oZsD EmlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ed4mXwmRVqLclUiNXnj7DXqaHYC42Xp4b2eHflFyFHg=; b=0OcCLH73YDEqC6uP9nL6djNG2S+FwzlTktx9biP9BE7pOzRerMFeTwnBdlIAZBKK6o pDF/slqB9jNpZgLo8/daJ/WtgLp262biJA4NY2ErGAvk52WeM7FsybFqD2l0IDp1mxXr 8KdYEaFoVw1Iu9dm/DPDgrnOy/IMNi5/yjOxktAudYfDrzNb0zA7PeeY0bUQmmL57lU0 HUwTJ8AG64Puy89H/hFRDJGMEMCChLomz1ZUxtYJ0p0kuUU0ZTX9yqsNfaCsR1xcN++e gUb25I3J+zRVXXldwX8gifBJRFMAM5U/ynOBOeSpqzh6t6YJDRNbpvH86P1XfuAk/Jw2 7yvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=sRBztmFa; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z41si4263629jah.89.2021.08.19.14.07.08; Thu, 19 Aug 2021 14:07:20 -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; dkim=pass header.i=@alien8.de header.s=dkim header.b=sRBztmFa; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235105AbhHSVGC (ORCPT + 99 others); Thu, 19 Aug 2021 17:06:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231134AbhHSVGB (ORCPT ); Thu, 19 Aug 2021 17:06:01 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9568C061575 for ; Thu, 19 Aug 2021 14:05:24 -0700 (PDT) Received: from zn.tnic (p200300ec2f0f6a00c0b6242459a20f3a.dip0.t-ipconnect.de [IPv6:2003:ec:2f0f:6a00:c0b6:2424:59a2:f3a]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id E943A1EC0588; Thu, 19 Aug 2021 23:05:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1629407119; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=ed4mXwmRVqLclUiNXnj7DXqaHYC42Xp4b2eHflFyFHg=; b=sRBztmFayDjLguvromcB5N4O75dmPHYZEtz1HPOVKzaOcAdC5sdQtJIePgw9o8wDFlOHOO RkfwaSPShkwPTJwH7ubD4ecrtbyLun/JC7m7BjkTyh7SvQ/kczfkxP3YIow0y9p2KNdGLZ joS9pS5+7wi5TLjnqjuGcqITPvT2ADI= Date: Thu, 19 Aug 2021 23:05:57 +0200 From: Borislav Petkov To: Reinette Chatre , Babu Moger Cc: "Chen, Rong A" , kernel test robot , x86-ml , linux-kernel@vger.kernel.org Subject: Re: [tip:x86/urgent] BUILD SUCCESS WITH WARNING 064855a69003c24bd6b473b367d364e418c57625 Message-ID: References: <6118d218.4ZZRXYKZCzQSq1Km%lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 19, 2021 at 01:39:46PM -0700, Reinette Chatre wrote: > I can confirm that the removed comment explains why m would be initialized > when used in the code that follows. > > How would you prefer to address this? We could add just the comment back in > support of future reports or perhaps by adding the default case back with > the same error that would be returned earlier when there is an invalid > EVENT_ID. Something like: > > ---8<--- > diff --git a/arch/x86/kernel/cpu/resctrl/monitor.c > b/arch/x86/kernel/cpu/resctrl/monitor.c > index 57e4bb695ff9..05b99e4d621c 100644 > --- a/arch/x86/kernel/cpu/resctrl/monitor.c > +++ b/arch/x86/kernel/cpu/resctrl/monitor.c > @@ -304,6 +304,12 @@ static u64 __mon_event_count(u32 rmid, struct rmid_read > *rr) > case QOS_L3_MBM_LOCAL_EVENT_ID: > m = &rr->d->mbm_local[rmid]; > break; > + default: > + /* > + * Code would never reach here because > + * an invalid event id would fail the __rmid_read. > + */ > + return RMID_VAL_ERROR; > } > > if (rr->first) { Right, I would normally not take a patch just to fix a tool because it cannot see it correctly. But Babu has another use case which breaks the build so I guess that's serious enough to make an exception. Babu, can you please explain? Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette