From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2E3A6C4338F for ; Thu, 19 Aug 2021 21:05:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1246B610A1 for ; Thu, 19 Aug 2021 21:05:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235388AbhHSVGE (ORCPT ); Thu, 19 Aug 2021 17:06:04 -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