Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3129174ybz; Mon, 27 Apr 2020 10:28:16 -0700 (PDT) X-Google-Smtp-Source: APiQypKhwRVOD2Cq9kG6khrTviSa9T2LCIrq7QMn74KCHKrzMpHk0UFJKGmGapEhLDulqrwWLeVz X-Received: by 2002:a17:906:7f0c:: with SMTP id d12mr20261251ejr.40.1588008495859; Mon, 27 Apr 2020 10:28:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588008495; cv=none; d=google.com; s=arc-20160816; b=dVYq/XEKuqNGTy7FrOjbsvAQJ5Gbm2QN1gFL4cKp8tQXX28riGCYBIGW5hPPuxf3rJ lyzA3vrvzpWG4FBcEsOstYLGAQYoX2/b9alaVsKdyx1fRYxGjVNVU/Z8SRZhasjmWmWk oYjk5SOZ7Iqp9nfih2Z4f8ecll6DUJ9Nhnj8k5lJ3Xf+PUtqWU57TSXr9jAHxw9Vn+eK 2kZFmQ6TNtTuVXn+H5/Ua6WxSVGbbiLmOkL6IvtUOAs/8T+JlMVxcQkZS+9S8cn7PBPj RgmMP0ujsIDkPFeSecnYyrBQC/nTCkhhPwpJKvoZWckzdzbomuA90rDmOvUA7R8QreLG YoOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=GwqEQ9Gp7hl3c0zEd3jaNfM52eScQUG1t8rIvtjiN7Y=; b=y0+yBJHKydmsh8lMTHpRXFsFveHqzrCj4mODUdHV6tlmMPLmfEmJTV1I6Q+NrUg+LO v+A3bXLy06+5k3x8yhzheASZ51Ws4Nh5NVfqCZXMDwRwJ87c0uJenL0zJiXI3FqoyUcg CawJIXXyoKM4kOqmAC8eMzBoYwedc5MuBSDj5OZRlxRWisbGv+55Fv0gAZs/4eYCYB4L 0n3qPWY6ZYafv6FQ1xA4Vw9TwchnDAgVwJE9E8YDsxUgOgkj1c4Wub9LhuE92IUZtNBO IF+a6Gh8BGZdeSj3eWA4ncMiXz1ZYpvsdwMI55AygkHFwUYTcB5YgWxAmhFy3QNzzZiD FXug== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x4si104096edc.351.2020.04.27.10.27.51; Mon, 27 Apr 2020 10:28:15 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726362AbgD0RYJ (ORCPT + 99 others); Mon, 27 Apr 2020 13:24:09 -0400 Received: from mga12.intel.com ([192.55.52.136]:20457 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725980AbgD0RYJ (ORCPT ); Mon, 27 Apr 2020 13:24:09 -0400 IronPort-SDR: KI+QSblsX4clCLDdctlfk6DDuBox++UdzurSoYnZku3EjXUNoWsLyQA1/iylYwVlSk/kVmA5ai JLYemdJFKGJw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Apr 2020 10:24:09 -0700 IronPort-SDR: t4+pw8a0fxZyPc1F3AXiaSD2C1lYZ9vgoM9lrl0bsUyiLHWf89FKzZOpBJiuDk9FkrbNPa/XTO ZUAL6LBPshgw== X-IronPort-AV: E=Sophos;i="5.73,324,1583222400"; d="scan'208";a="458457221" Received: from agluck-desk2.sc.intel.com (HELO agluck-desk2.amr.corp.intel.com) ([10.3.52.68]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Apr 2020 10:24:09 -0700 Date: Mon, 27 Apr 2020 10:24:08 -0700 From: "Luck, Tony" To: Borislav Petkov Cc: Robert Richter , Mauro Carvalho Chehab , James Morse , Aristeu Rozanski , Matthias Brugger , linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 06/10] EDAC/ghes: Remove local variable rdr_mask in ghes_edac_dmidecode() Message-ID: <20200427172408.GA13177@agluck-desk2.amr.corp.intel.com> References: <20200422115814.22205-1-rrichter@marvell.com> <20200422115814.22205-7-rrichter@marvell.com> <20200427070802.GA11036@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200427070802.GA11036@zn.tnic> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 27, 2020 at 09:08:02AM +0200, Borislav Petkov wrote: > > if (entry->type_detail & BIT(6)) > > dimm->mtype = MEM_RMBS; > > - else if ((entry->type_detail & rdr_mask) == rdr_mask) > > + else if ((entry->type_detail & BIT(7)) && > > + (entry->type_detail & BIT(13))) > > Well, "checks some bits" doesn't make it more telling than checking a > descriptive name like "rdr_mask" but ok, since we're assigning MEM_RDR > here, it is still clear what the check does. > > Btw, please write it like this: > > else if (entry->type_detail & (BIT(7) | BIT(13))) That isn't the same. The previous version checked that BOTH bits 7 and 13 were set. Your version checks for either bit. Looks like the original with the local variable was checking for both bits set. -Tony