Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp2685954rdb; Wed, 15 Nov 2023 07:51:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IGHEqNAzFndJFI5oU85Q0YBzleBIW3YN4n6zVk2Z+mB6KGJPA+sgKNA8hNf5i3KBdDn15eS X-Received: by 2002:a17:90b:17cb:b0:283:2612:714a with SMTP id me11-20020a17090b17cb00b002832612714amr9660235pjb.36.1700063498942; Wed, 15 Nov 2023 07:51:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700063498; cv=none; d=google.com; s=arc-20160816; b=y9fwsvn/2Y2PcE+7NXuz+hQ5mxfJFfNSaJBdbwdlNEmIVkiQHvh3a0m7uDzpvSB9oE yc7dT+rd2aKfRf8hYooL5YWGR3Y/1pwGc8bbak8DhCILeorIgRONLE5+S5+dc8zARMal +vyZhypUoAz906z6mPVZO/zSIXMINVv2Eo402PycCygEiMe/T5XoU0XOgJus+Vv9CLQz OT8vhpvRlmy/Ft5BxW9ljrCUGMKzH+tTgiOl2VmS0ROgh901YVujUNsWanbxu54yxdIR XCJlsxHG2BPI5jj/BS7OkUjoLA/udDWslZXSC9qUlCJj4qYAyPB5MeaSu54V0M55eKsF squA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=N2YDiXbSAN2FL9L7NMdA/8P4v2y+/hM7LLxfPPkpLw4=; fh=BG3rc2tX6F6U2A1M/aDY9FKtoOLe4vQznm2A17N8JnE=; b=Ab6TfIXG9IEOvM+bQk+VTNl+M6iQjk1MkEHEq+62XqTGjuZh0lTnmiJ5I4ArLCTk2H qv5L/FPunS0I+EUbRd7E9s0qrF3IPOM3xH11hsELgZZ9XCzV0cta+99O1xLa0YxSneIb ucqHVsY7K+e2CT84Hs36qfKppmlipdU8sljDAIHSG4Pju1kJ/YMlGNq29I4VTGKkk0HX sbd9GdDUlKNkHYkNzSagXOnBMYw4s4zcHtt6rlAwKbjDj4bPl65mrWZ53utlP3w7dXvw opKK4SsuZuDyAJqqDJwjIWEpU1dEC37nDLKdvIdRXW3fvNVKlwOUQZggoAijnfaUh1mS UwWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fdmo5Xxq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id b7-20020a17090a7ac700b00263eb5054f2si31090pjl.105.2023.11.15.07.51.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 07:51:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fdmo5Xxq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id B47FD8022E79; Wed, 15 Nov 2023 07:50:47 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231511AbjKOPuQ (ORCPT + 99 others); Wed, 15 Nov 2023 10:50:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231859AbjKOPuJ (ORCPT ); Wed, 15 Nov 2023 10:50:09 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE07DD44; Wed, 15 Nov 2023 07:50:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700063405; x=1731599405; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=N0fBrj4X1XqKzXRuoFSbE/zJFtv8I5jzQP8GqdgIm9M=; b=fdmo5XxqTspkeGiJum18V2VVrATVk9mpHtsyLfPSD9BMu+o+1lris+0K 1DW3HB/BaxKX9LNrtezwMZyvUivgPBVqCeZUR4Uw827jxHjMAUdXZY+AY 5FJtrC3qelqKOy1eU/VRa8EDNssYGfX1EoyfhPIsGiASEm483WKxmg/4a 3PnKgoUJyKo2lgiQ2vAUcbRCUa/w4f1rpfFqFx0krbvqv63P4gwXCKQDU zbwriMApO/1m72NYPuSx/gyKQLgqvwA24uxgGxzIWH+xDoIpad45L5+SW PJ5vqwn9d7uJijJp0GeVRUXOZz6S1Qp6yYg3AS6FOv4ro9oepdAnIGFih A==; X-IronPort-AV: E=McAfee;i="6600,9927,10895"; a="477119140" X-IronPort-AV: E=Sophos;i="6.03,305,1694761200"; d="scan'208";a="477119140" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Nov 2023 07:50:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10895"; a="741469104" X-IronPort-AV: E=Sophos;i="6.03,305,1694761200"; d="scan'208";a="741469104" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga006.jf.intel.com with ESMTP; 15 Nov 2023 07:49:59 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id F40202AC; Wed, 15 Nov 2023 17:49:57 +0200 (EET) From: Andy Shevchenko To: Andy Shevchenko , linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Tony Luck , Borislav Petkov , James Morse , Mauro Carvalho Chehab , Robert Richter Subject: [PATCH v1 1/3] EDAC, pnd2: Replace custom definition by one from sizes.h Date: Wed, 15 Nov 2023 17:49:38 +0200 Message-ID: <20231115154940.664664-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 15 Nov 2023 07:50:47 -0800 (PST) The sizes.h provides a set of common size definitions, use it. Signed-off-by: Andy Shevchenko --- drivers/edac/pnd2_edac.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/edac/pnd2_edac.c b/drivers/edac/pnd2_edac.c index 2b306f2cc605..45e3c2913d51 100644 --- a/drivers/edac/pnd2_edac.c +++ b/drivers/edac/pnd2_edac.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -109,7 +110,6 @@ static struct mem_ctl_info *pnd2_mci; #define MOT_CHAN_INTLV_BIT_1SLC_2CH 12 #define MOT_CHAN_INTLV_BIT_2SLC_2CH 13 #define SELECTOR_DISABLED (-1) -#define _4GB (1ul << 32) #define PMI_ADDRESS_WIDTH 31 #define PND_MAX_PHYS_BIT 39 @@ -587,7 +587,7 @@ static int get_registers(void) /* Get a contiguous memory address (remove the MMIO gap) */ static u64 remove_mmio_gap(u64 sys) { - return (sys < _4GB) ? sys : sys - (_4GB - top_lm); + return (sys < SZ_4G) ? sys : sys - (SZ_4G - top_lm); } /* Squeeze out one address bit, shift upper part down to fill gap */ @@ -643,7 +643,7 @@ static int sys2pmi(const u64 addr, u32 *pmiidx, u64 *pmiaddr, char *msg) /* Give up if address is out of range, or in MMIO gap */ if (addr >= (1ul << PND_MAX_PHYS_BIT) || - (addr >= top_lm && addr < _4GB) || addr >= top_hm) { + (addr >= top_lm && addr < SZ_4G) || addr >= top_hm) { snprintf(msg, PND2_MSG_SIZE, "Error address 0x%llx is not DRAM", addr); return -EINVAL; } -- 2.43.0.rc1.1.gbec44491f096