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=-0.7 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 989B2C432BE for ; Thu, 12 Aug 2021 11:16:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6CE6461077 for ; Thu, 12 Aug 2021 11:16:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236790AbhHLLQe (ORCPT ); Thu, 12 Aug 2021 07:16:34 -0400 Received: from mga18.intel.com ([134.134.136.126]:28663 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232081AbhHLLQa (ORCPT ); Thu, 12 Aug 2021 07:16:30 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10073"; a="202492232" X-IronPort-AV: E=Sophos;i="5.84,315,1620716400"; d="scan'208";a="202492232" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2021 04:16:04 -0700 X-IronPort-AV: E=Sophos;i="5.84,315,1620716400"; d="scan'208";a="469725505" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2021 04:16:01 -0700 Received: from andy by smile with local (Exim 4.94.2) (envelope-from ) id 1mE8gk-008Z2D-MY; Thu, 12 Aug 2021 14:15:54 +0300 Date: Thu, 12 Aug 2021 14:15:54 +0300 From: Andy Shevchenko To: David Hildenbrand Cc: "linux-kernel@vger.kernel.org" , Arnd Bergmann , Greg Kroah-Hartman , "Michael S. Tsirkin" , Jason Wang , "Rafael J. Wysocki" , Andrew Morton , Dan Williams , Hanjun Guo , "virtualization@lists.linux-foundation.org" , "linux-mm@kvack.org" Subject: Re: [PATCH v1 3/3] kernel/resource: cleanup and optimize iomem_is_exclusive() Message-ID: References: <20210811203612.138506-1-david@redhat.com> <20210811203612.138506-4-david@redhat.com> <37179df3-13d7-9b98-4cd8-13bb7f735129@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 12, 2021 at 09:34:00AM +0200, David Hildenbrand wrote: > On 12.08.21 09:14, Andy Shevchenko wrote: > > On Thursday, August 12, 2021, David Hildenbrand > > wrote: > > On 11.08.21 22:47, Andy Shevchenko wrote: > > On Wednesday, August 11, 2021, David Hildenbrand > > > > >> wrote: > > Yes, it’s like micro optimization. If you want your way I suggest then > > to add a macro > > > > #define for_each_iomem_resource_child() \ > >  for (iomem_resource...) > > I think the only thing that really makes sense would be something like this on top (not compiled yet): Makes sense to me, thanks, go for it! -- With Best Regards, Andy Shevchenko