Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A785C6FD1F for ; Tue, 14 Mar 2023 18:46:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230518AbjCNSqD (ORCPT ); Tue, 14 Mar 2023 14:46:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229446AbjCNSpz (ORCPT ); Tue, 14 Mar 2023 14:45:55 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FC56B6D3A; Tue, 14 Mar 2023 11:45:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678819522; x=1710355522; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=HcDoA6lnkNndAAvLyrmktLzn4ToTWYKaGtwl/HFFUFk=; b=KPUTQdnCkD5ypddDXopgGnyQFn2g/Ffkpt9rh9jtiA+WfCKtJN9nDtSP YAxWpzCCC6/13YybF9jCNf95omwQhm+NICCritGKvJJ6ycKCB/RVhO7DJ k+igcf2l29y1dQcZH6lZXvH/ro0r5N8yeW4XFjtOx9S7evzUjCkGFRu+C 8t2ZWL31nR6B7ctO/SrI56MSbAvbnV2q4leF9ViDPDPfklu7KsZqSgpJn uoyC98AK20Mpx1Q2PxaR9nkt12jAzrSYEsaVR0hh8JmNgawdDTlpZ46fn l7J8jwlDIpleosq0wsFHqx0OHkrohvWKVP/+6lfOCVn83+qMlqFMl7ngk Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10649"; a="365185424" X-IronPort-AV: E=Sophos;i="5.98,260,1673942400"; d="scan'208";a="365185424" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Mar 2023 11:43:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10649"; a="802973476" X-IronPort-AV: E=Sophos;i="5.98,260,1673942400"; d="scan'208";a="802973476" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga004.jf.intel.com with ESMTP; 14 Mar 2023 11:43:32 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1pc9cO-003NLi-0Q; Tue, 14 Mar 2023 20:43:28 +0200 Date: Tue, 14 Mar 2023 20:43:27 +0200 From: Andy Shevchenko To: Dan Carpenter Cc: oe-kbuild@lists.linux.dev, =?iso-8859-1?Q?Micka=EBl_Sala=FCn?= , Mika Westerberg , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Michael Ellerman , Randy Dunlap , Arnd Bergmann , Bjorn Helgaas , "Rafael J. Wysocki" , Niklas Schnelle , Pali =?iso-8859-1?Q?Roh=E1r?= , "Maciej W. Rozycki" , Juergen Gross , Dominik Brodowski , linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-pci@vger.kernel.org, xen-devel@lists.xenproject.org, linux-acpi@vger.kernel.org, lkp@intel.com, oe-kbuild-all@lists.linux.dev, Miguel Ojeda , Richard Henderson , Ivan Kokshaysky , Matt Turner , Russell King , Andrew Lunn Subject: Re: [PATCH v4 1/4] PCI: Introduce pci_dev_for_each_resource() Message-ID: References: <20230310171416.23356-2-andriy.shevchenko@linux.intel.com> 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 11, 2023 at 04:54:32PM +0300, Dan Carpenter wrote: > 059b4a086017fb Mika Westerberg 2023-03-10 246 unsigned long type = resource_type(r); > 999ed65ad12e37 Rene Herman 2008-07-25 247 > 059b4a086017fb Mika Westerberg 2023-03-10 @248 if (type != IORESOURCE_IO || type != IORESOURCE_MEM || > ^^ > This || needs to be &&. This loop will always hit the continue path > without doing anything. > > 059b4a086017fb Mika Westerberg 2023-03-10 249 resource_size(r) == 0) > 0509ad5e1a7d92 Bjorn Helgaas 2008-03-11 250 continue; Thanks, I'll fix in v5. -- With Best Regards, Andy Shevchenko