Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp380689rdh; Thu, 23 Nov 2023 06:31:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IERQHJh8IkiUKligZnzfJGxBINRNqcOrMvUtGNZ4EJbS1GUp8y0PphgjtQzNJYg1inHo5pS X-Received: by 2002:a05:6a00:3992:b0:6c4:e7a0:af4a with SMTP id fi18-20020a056a00399200b006c4e7a0af4amr6432755pfb.32.1700749861022; Thu, 23 Nov 2023 06:31:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700749861; cv=none; d=google.com; s=arc-20160816; b=Jeh4xhifX4aFsH8jw0KlsiiUuJ/xrzBe1jVtN/wWis2HnpxlufXZYNZAMwfyQgmOD+ a2CVilbRQlrkueygWl61zuI/9/w3TMvrbuB3T2H79q5uYjuK2LBzWouIGel8xP/cV9dH snGdxyUti6M3naDMnsRQ+ps/KeGisMeENJHr96lAx5jKbD1mghSENEK7S3kUTUyS8egj TjSNgF3ytDcQcAcBy9n7pf2vUn0YIg6RqLtpKsiEjYjtmRpjEjEpSfMVe6iBO7j/4065 kfvToP+uJ/4ScT/UUI7oW3WHo12lPxADwChbQUxQ2YjgJPloxqbxrwoM594aoQslF+uw 4eeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=uVWrJ5X1b3EvFgEKYAbOEJsfdYVCcuWpRjKZ4dxggss=; fh=vuZ217VkHDDHEko/aJHZ6PFji7Kg1VLteEEtLw5FVpQ=; b=kW5rjDHVsnDgT6nQB7pw4xkHezb+HEgfi2Ifk1+KOMVX+P5s0lbtHM2reRlOxqGYOU r/jF3Hm8Zdno3GecsXHZKhKBc1Bab8xhCn3+gX6uuq4sYQYcUx/buWBlOYSlb/7/g2n+ lZcJkKkdBtoSohxQQ4kiXJ/9nMK0MUfxMPTGAQzwaSOsCw3VmZZtrHorp0bXCLTwi0FT wIiDofiH9FprdS/hGeaw+8rbE1K3j3vTSaxR5JlTTbWwBWez74Q8q58xCgL8pzkGrj45 MYxmxiYifnkECKEBFICD54OaNs2kaUJZOFzf6C7EGhqRivh+ZJWtH3FNnQDxUt8Zk27b PvGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=WQPdD5jp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id y192-20020a638ac9000000b005bdbe64cc26si1368219pgd.535.2023.11.23.06.31.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 06:31:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=WQPdD5jp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (Postfix) with ESMTP id 1D124808727C; Thu, 23 Nov 2023 06:30:53 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345772AbjKWOaZ (ORCPT + 99 others); Thu, 23 Nov 2023 09:30:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345736AbjKWOaY (ORCPT ); Thu, 23 Nov 2023 09:30:24 -0500 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80D62B9; Thu, 23 Nov 2023 06:30:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700749830; x=1732285830; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=GOtJ/wPUcjOXSBk7IRQC4DD2WhaZ57quY1cxcixvzmw=; b=WQPdD5jpJ5VpeXbj1PeyepxUNSvl33+RIsLezS0Q1xdItJs9n6Ie2sft 1BPBXErLFbFVWzXX86aNajnZXEPUoP7k7HXjmCj/8iu8ASQqRV6xpKC3g SBz5DNAc7BGyrOTpZpWfVZjrWjsP3WUuqFX9MonfA7KVaKpwsgZhlLO2K Ucd93Ny54vY+ba7J/1KmoxrYqHbch4vF/xSLQ3eP2sLXjGkiLHZnmn7io 62caroeYZezXEUH2JcNI7uSvFMfsNzZZ3ngQB6+u4mPH7Fsbh6CZBwO4U t79uWOphJLc6j01VjmkvyKZPG7LUpNdbQcAFuYVj3cbKSmRKZNq76B9LH A==; X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="382678115" X-IronPort-AV: E=Sophos;i="6.04,221,1695711600"; d="scan'208";a="382678115" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Nov 2023 06:30:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="717071779" X-IronPort-AV: E=Sophos;i="6.04,221,1695711600"; d="scan'208";a="717071779" Received: from mstrobel-mobl.ger.corp.intel.com ([10.252.40.70]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Nov 2023 06:30:28 -0800 Date: Thu, 23 Nov 2023 16:30:25 +0200 (EET) From: =?ISO-8859-15?Q?Ilpo_J=E4rvinen?= To: "David E. Box" cc: LKML , platform-driver-x86@vger.kernel.org, rajvi.jingar@linux.intel.com, dave.hansen@linux.intel.com, peterz@infradead.org Subject: Re: [PATCH V5 12/20] asm-generic/io.h: iounmap/ioport_unmap cleanup.h support In-Reply-To: <20231123040355.82139-13-david.e.box@linux.intel.com> Message-ID: References: <20231123040355.82139-1-david.e.box@linux.intel.com> <20231123040355.82139-13-david.e.box@linux.intel.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-872993958-1700749829=:1676" X-Spam-Status: No, score=-0.8 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 pete.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 (pete.vger.email [0.0.0.0]); Thu, 23 Nov 2023 06:30:53 -0800 (PST) This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-872993958-1700749829=:1676 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT On Wed, 22 Nov 2023, David E. Box wrote: > Add auto-release cleanups for iounmap() and ioport_unmap(). > > Signed-off-by: David E. Box > Suggested-by: Ilpo Järvinen > --- > V2 - Move from linux/io.h to asm-generic/io.h. Adds iounmap cleanup if > iounmap() is defined. Adds ioport_unmap cleanup if CONFIG_IOPORT_MAP > is defined. > > include/asm-generic/io.h | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h > index bac63e874c7b..9ef0332490b1 100644 > --- a/include/asm-generic/io.h > +++ b/include/asm-generic/io.h > @@ -8,6 +8,7 @@ > #define __ASM_GENERIC_IO_H > > #include /* I/O is all done through memory accesses */ > +#include > #include /* for memset() and memcpy() */ > #include > #include > @@ -1065,6 +1066,10 @@ static inline void __iomem *ioremap(phys_addr_t addr, size_t size) > #endif > #endif /* !CONFIG_MMU || CONFIG_GENERIC_IOREMAP */ > > +#ifdef iounmap > +DEFINE_FREE(iounmap, void __iomem *, iounmap(_T)); > +#endif > + > #ifndef ioremap_wc > #define ioremap_wc ioremap > #endif > @@ -1127,6 +1132,7 @@ static inline void ioport_unmap(void __iomem *p) > extern void __iomem *ioport_map(unsigned long port, unsigned int nr); > extern void ioport_unmap(void __iomem *p); > #endif /* CONFIG_GENERIC_IOMAP */ > +DEFINE_FREE(ioport_unmap, void __iomem *, ioport_unmap(_T)); > #endif /* CONFIG_HAS_IOPORT_MAP */ > > #ifndef CONFIG_GENERIC_IOMAP Has this now built successfully with LKP? (I don't think we get success notifications from LKP for patch submissions, only failures). There were some odd errors last time but I think all they were unrelated to this change (besides the checkpatch false positive, I mean). -- i. --8323329-872993958-1700749829=:1676--