Received: by 2002:a05:6500:1b41:b0:1fb:d597:ff75 with SMTP id cz1csp417925lqb; Tue, 4 Jun 2024 15:53:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWGyqam4RZRzVbv27gVD0w3cIBKlURjqGgmxoC+YO2nF7gpsZYpTChVaEiwuuqUJRScwZhSDEbnbhjt5CvJZlxjzvcdMx1vhPbiilcN1Q== X-Google-Smtp-Source: AGHT+IG5iAcg1k23ZHa67VTPfP6IyDIk5pVCvjVSnvKX8M60PPiAeOQO9HOyWwfnI9AVeiVpi4/A X-Received: by 2002:a17:90b:716:b0:2b4:3659:b3f5 with SMTP id 98e67ed59e1d1-2c27dd5564emr749772a91.47.1717541596900; Tue, 04 Jun 2024 15:53:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717541596; cv=pass; d=google.com; s=arc-20160816; b=NTKMR5EfpARCYNDt1GQ5mVfuRh29yKrjSzsLyWW7sUbTSlMLeqZyfwVc/JPDS05g8N VYRpC9qo36HMJ0WA+8TMVnBjC/dIGoAzqRRauPM/6RnKGAxdVaHLOpLdrGvE8Fl3l0Bd liwJYaPwX7Nfp2MRrfVic+l9Mrq5O9ZFE5TV8Wln/4HMOj4lbdLcxB1hsSNDGXVq7wNo L1uPP0TiYycapXHZgXLWE9U+ZC3MUu3BeSp2VwsCeim1+xa3xbbkTTgk3VLQX3NTDTIW nvclc1OhAKxh41ehbL04cT0Gpmd3is+DN+K/EimuK/gCnf6/p+y1iw9psyxZzC2lYFbW Gmsw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=organization:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=8W5Rm10eRv1oG/FW5ckzGckqyR42SVPG6Yl1krqgQXA=; fh=iueWvqwL+7btX6Dg8k/tFlggxS8GCXyE4v3IeGD/uJk=; b=T0YnL3nBIKfJUC9laDRYxeCmAHPgzVSdn5mEofMoLgGSyrX5UXexSLdyz7r/Fy2PVe QnxWHm61n8slG7lCAkNQlWn9e4IDvUAZ5y3KpTRpx4YQ+mTcPosl5ZeHJmYO368rjWhj VsNFi/FycgO8mgLeVZzn+rksThNY5xWlx9mfpNhaYdDytT8nV8V5xz66jhWOpQEpbjXc JLJ7jCw7VVLD+QeyKGvIxwfoziiM1eJodNaHAXO+o/ICKeWSiKFQYfZy2ogU6ZH2V3d0 drT9YOVYgX1oM/IRERmuNvc2K178/d4FrKK4et6KB7xLMHdCpGpHTU9gyJq4o4Qt1dHC YsZA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=GK3GY3A9; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-201418-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201418-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c28063e942si79989a91.3.2024.06.04.15.53.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 15:53:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-201418-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=GK3GY3A9; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-201418-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201418-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 4B839B267E2 for ; Tue, 4 Jun 2024 21:46:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A737B14C588; Tue, 4 Jun 2024 21:46:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="GK3GY3A9" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B1AD813CABB for ; Tue, 4 Jun 2024 21:46:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717537569; cv=none; b=dD0NGQiq6Cr/S5yPCMVhcSI4pZmNK97vUh3AnyQpbyCDIq+8flCOCt1IQOONn9J5wweeCk2XgulYk+3SHT8v9vJaVTphEnMNY1mPLH+u+Xm7H3peZlmKQ9X7rsd28d1B1bqCU9KXuwojAuSELFsCiD7xKRkzGRBvWcSB2Nz/4Lg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717537569; c=relaxed/simple; bh=p50tzagc22lV4uZC19romum3y3Oh2dqEujTGg+i+WVk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=FzgPS8e9ide/qVJG9kzDJAgh+ZB42LiCTdQMRaMk7zv6KaBtMyx/5DUeOT5S0JhhMmU26C9qCWy7VVNBR7LUMXhLh40KBjcIw+ZBTkS9AB9h2u+55eh6ALI+mieN2JPED1ClKNNF1pMi++5YcOPWG6ewm+P/UOP/E3y7lgqinAw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=GK3GY3A9; arc=none smtp.client-ip=198.175.65.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717537564; x=1749073564; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=p50tzagc22lV4uZC19romum3y3Oh2dqEujTGg+i+WVk=; b=GK3GY3A9ljZP639KHChSmTObyieFPHOs4a+cClnd89B3sEsTMePqhQtB iXLxjokI7/tN4tHdZwDhMyFMs3uWu/OLC32CULGCCrIlMl9hfmwgm3AcT KBNgbozPnwf8UJLlC7OXUa6tQ0NIaH0aoBHl3vOTVwujukjUAz0BN8dC1 /dkWPYTG5QkSJe/e6wcHj6dYjEVSpnC6n3GsGYMK4VHdjiFi43PbAZKmO hcXwGWHFeU2GolUjs+C6Phu2VPt6JTpI3AETF/IUxrKvjGIwwhZJaf6u0 kW2wJg0ZhDow3CDAtm3btF+FJBFLB99SL0R7Akf52NLGb1K86q5Yy3ywV w==; X-CSE-ConnectionGUID: 0D+zsaT/QcOWEFY1mu4Cwg== X-CSE-MsgGUID: /RexKBUJQL2rDMxpJtdUjw== X-IronPort-AV: E=McAfee;i="6600,9927,11093"; a="25520793" X-IronPort-AV: E=Sophos;i="6.08,214,1712646000"; d="scan'208";a="25520793" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2024 14:46:04 -0700 X-CSE-ConnectionGUID: jKhLV0Z0S1KeE73nPNNA3Q== X-CSE-MsgGUID: C1zmRyItRESZP6ATtGXQ5w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,214,1712646000"; d="scan'208";a="41798995" Received: from smile.fi.intel.com ([10.237.72.54]) by fmviesa005.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2024 14:46:01 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1sEbyg-0000000Dfi6-3nyw; Wed, 05 Jun 2024 00:45:58 +0300 Date: Wed, 5 Jun 2024 00:45:58 +0300 From: Andy Shevchenko To: Chia-I Wu Cc: Greg Kroah-Hartman , Andrew Morton , AKASHI Takahiro , Dan Williams , Baoquan He , Alison Schofield , linux-kernel@vger.kernel.org Subject: Re: [PATCH] resource: add a basic test for walk_iomem_res_desc Message-ID: References: <20240604213200.672279-1-olvaffe@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Wed, Jun 05, 2024 at 12:38:27AM +0300, Andy Shevchenko wrote: > On Tue, Jun 04, 2024 at 02:31:46PM -0700, Chia-I Wu wrote: ... > > + res[2] = (struct resource){ > > + .start = offset, > > + .end = offset + SZ_1K - 1, > > + .name = "NESTED", > > + }; > > We have respective macros. Use them. And use explicitly hardocded start in all of them instead of coding += for offset variable. For the test cases is better when data is hardcoded, esp. when it's an expected result (just to mention, here it seems an input data). -- With Best Regards, Andy Shevchenko