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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 868D6C433FE for ; Thu, 21 Apr 2022 08:01:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1386338AbiDUIEG (ORCPT ); Thu, 21 Apr 2022 04:04:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344890AbiDUIEE (ORCPT ); Thu, 21 Apr 2022 04:04:04 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D06C11A811; Thu, 21 Apr 2022 01:01:15 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 8130CB822BC; Thu, 21 Apr 2022 08:01:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1EA28C385AA; Thu, 21 Apr 2022 08:01:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1650528073; bh=ifEFSZv1UM5fIRCyiaGc43+OrGh0I0CVrDw1Pe824tk=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Jxw9n3090AL4dD2aIROf5ZASfrb4qGnMntHn9OV0MR3E9rF8iS1w32M8y0P+QTcQB f8BJooistAMxQF1cKz6Xn8LnCNe5de8pFPCR2vro3T9tVXXcTHTSuO+o6QvnooXcCy e07OjhCpum5gCdaLxthe0DzzgxJlv3WJHKinRs5rQTvVXPndDQiS2Q7r5qlxrMnSZk 7mVLL6AT8WNyDR10Aj9stFSpOIP1GHwnoTZS+ZJK2cPkljol0G9qi9JKM1ufXjjXPp gilVv7PAj5XWmpwXB8kTWVl9OZyxhM8EbxZ27wzwbyb4wKnqArq5ti9OGnuiWd9fTY EJpYiYBngAQfA== Received: by mail-wm1-f50.google.com with SMTP id u17-20020a05600c211100b0038eaf4cdaaeso5306699wml.1; Thu, 21 Apr 2022 01:01:12 -0700 (PDT) X-Gm-Message-State: AOAM530WW0qI86a6L0HLOK/KkpZ6YM2gmfnmP7to8TBgP5eOkjJcAIiE c287eNqISruoq32nWnFU7jb5cjqE6GjclfO4qD8= X-Google-Smtp-Source: ABdhPJzqgi7L5ALaCLdUcSpoT2Nq18aUkuxmUof0UjJFR0/s3eAKaJPqD7JeGsY3967XuokcLCyC0mVbOg8OIiR57g4= X-Received: by 2002:a1c:f219:0:b0:38c:782c:3bb with SMTP id s25-20020a1cf219000000b0038c782c03bbmr7185525wmc.94.1650528071363; Thu, 21 Apr 2022 01:01:11 -0700 (PDT) MIME-Version: 1.0 References: <20220421074204.1284072-1-hch@lst.de> <20220421074204.1284072-5-hch@lst.de> In-Reply-To: <20220421074204.1284072-5-hch@lst.de> From: Arnd Bergmann Date: Thu, 21 Apr 2022 10:00:55 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 4/7] ARM: remove the unused virt_to_dma helper To: Christoph Hellwig Cc: Russell King , Linus Walleij , Andre Przywara , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Greg Kroah-Hartman , Alan Stern , Laurentiu Tudor , Marek Szyprowski , Robin Murphy , "open list:IOMMU DRIVERS" , Linux ARM , Linux Kernel Mailing List , USB list Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 21, 2022 at 9:42 AM Christoph Hellwig wrote: > > Signed-off-by: Christoph Hellwig I generally prefer to have at least something useful in the description, e.g. why it's now unused and what it was used for before. > -static inline dma_addr_t virt_to_dma(struct device *dev, void *addr) > -{ > - if (dev) > - return pfn_to_dma(dev, virt_to_pfn(addr)); > - > - return (dma_addr_t)__virt_to_bus((unsigned long)(addr)); > -} I think __virt_to_bus() is now unused as well and could be removed in the same step. It looks like __bus_to_virt() is still used in the ISA DMA API, but as that is only used on footbridge and rpc, the generic version of that could be moved into rpc (footbridge already has a custom version). Arnd 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 Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6194CC433F5 for ; Thu, 21 Apr 2022 08:01:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 1A79A408EC; Thu, 21 Apr 2022 08:01:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ePUvWB4z6SRH; Thu, 21 Apr 2022 08:01:18 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp4.osuosl.org (Postfix) with ESMTPS id D4118408F1; Thu, 21 Apr 2022 08:01:17 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id A34A8C0033; Thu, 21 Apr 2022 08:01:17 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) by lists.linuxfoundation.org (Postfix) with ESMTP id E35D5C002C for ; Thu, 21 Apr 2022 08:01:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id D0B184018D for ; Thu, 21 Apr 2022 08:01:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp2.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QPYHS1fHekzK for ; Thu, 21 Apr 2022 08:01:16 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by smtp2.osuosl.org (Postfix) with ESMTPS id 27DC9400E5 for ; Thu, 21 Apr 2022 08:01:15 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 6BD2CB822BA for ; Thu, 21 Apr 2022 08:01:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 19769C385A9 for ; Thu, 21 Apr 2022 08:01:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1650528073; bh=ifEFSZv1UM5fIRCyiaGc43+OrGh0I0CVrDw1Pe824tk=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Jxw9n3090AL4dD2aIROf5ZASfrb4qGnMntHn9OV0MR3E9rF8iS1w32M8y0P+QTcQB f8BJooistAMxQF1cKz6Xn8LnCNe5de8pFPCR2vro3T9tVXXcTHTSuO+o6QvnooXcCy e07OjhCpum5gCdaLxthe0DzzgxJlv3WJHKinRs5rQTvVXPndDQiS2Q7r5qlxrMnSZk 7mVLL6AT8WNyDR10Aj9stFSpOIP1GHwnoTZS+ZJK2cPkljol0G9qi9JKM1ufXjjXPp gilVv7PAj5XWmpwXB8kTWVl9OZyxhM8EbxZ27wzwbyb4wKnqArq5ti9OGnuiWd9fTY EJpYiYBngAQfA== Received: by mail-wm1-f52.google.com with SMTP id n40-20020a05600c3ba800b0038ff1939b16so2825401wms.2 for ; Thu, 21 Apr 2022 01:01:12 -0700 (PDT) X-Gm-Message-State: AOAM532lpF6B5RKXLeVGY9+yNnTKbcowW2B+Sb5gfCdlFjT0CsmsPfFy LtLz8EX+Mvv3Roenztm7f9OIyGFPX8iyNvSAy1k= X-Google-Smtp-Source: ABdhPJzqgi7L5ALaCLdUcSpoT2Nq18aUkuxmUof0UjJFR0/s3eAKaJPqD7JeGsY3967XuokcLCyC0mVbOg8OIiR57g4= X-Received: by 2002:a1c:f219:0:b0:38c:782c:3bb with SMTP id s25-20020a1cf219000000b0038c782c03bbmr7185525wmc.94.1650528071363; Thu, 21 Apr 2022 01:01:11 -0700 (PDT) MIME-Version: 1.0 References: <20220421074204.1284072-1-hch@lst.de> <20220421074204.1284072-5-hch@lst.de> In-Reply-To: <20220421074204.1284072-5-hch@lst.de> From: Arnd Bergmann Date: Thu, 21 Apr 2022 10:00:55 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 4/7] ARM: remove the unused virt_to_dma helper To: Christoph Hellwig Cc: Andrew Lunn , Andre Przywara , Linus Walleij , USB list , Russell King , Linux Kernel Mailing List , "open list:IOMMU DRIVERS" , Alan Stern , Greg Kroah-Hartman , Robin Murphy , Gregory Clement , Linux ARM , Sebastian Hesselbarth X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" On Thu, Apr 21, 2022 at 9:42 AM Christoph Hellwig wrote: > > Signed-off-by: Christoph Hellwig I generally prefer to have at least something useful in the description, e.g. why it's now unused and what it was used for before. > -static inline dma_addr_t virt_to_dma(struct device *dev, void *addr) > -{ > - if (dev) > - return pfn_to_dma(dev, virt_to_pfn(addr)); > - > - return (dma_addr_t)__virt_to_bus((unsigned long)(addr)); > -} I think __virt_to_bus() is now unused as well and could be removed in the same step. It looks like __bus_to_virt() is still used in the ISA DMA API, but as that is only used on footbridge and rpc, the generic version of that could be moved into rpc (footbridge already has a custom version). Arnd _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu 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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E6668C433EF for ; Thu, 21 Apr 2022 08:02:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=w4i71x+i3PUrRbcqqwIbPu97bfEddwiOqibA3eAFVsQ=; b=Ym0DWgdxjzhuiR eMKFMRviXHMzlkwkTqP4pX1wUFpxvb7hmMre0C+4afDkheXaXRB/8vUMjK9Pjsn2NYugJ4/PBB6go G0NCWkVRLx7xeZ7YV2VWX8dBYe8IVupz4SEgIyaYHshKTM51qqTwXVkAMe5W21QcNTv2kUJPhWFm2 kyN6GHu4BrlWeQAOy/QK5Ncs03ATaRPRv8a7deEhAcG1rNMybtULclob/cRBvLVvWorFqRk5ieAtj zJlfeDwmiaN1fVtb+icmMH4A0tgS/1MqD7d+hL58e2UUMxD7PDSIsMS5LZCTrd5KF2LGaFw9oRI4v DytRB9KQBUR2oEKi9e8Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhRkf-00CGVk-Ia; Thu, 21 Apr 2022 08:01:22 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhRkb-00CGSn-9w for linux-arm-kernel@lists.infradead.org; Thu, 21 Apr 2022 08:01:18 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 5E500B82299 for ; Thu, 21 Apr 2022 08:01:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 11456C385A5 for ; Thu, 21 Apr 2022 08:01:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1650528073; bh=ifEFSZv1UM5fIRCyiaGc43+OrGh0I0CVrDw1Pe824tk=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Jxw9n3090AL4dD2aIROf5ZASfrb4qGnMntHn9OV0MR3E9rF8iS1w32M8y0P+QTcQB f8BJooistAMxQF1cKz6Xn8LnCNe5de8pFPCR2vro3T9tVXXcTHTSuO+o6QvnooXcCy e07OjhCpum5gCdaLxthe0DzzgxJlv3WJHKinRs5rQTvVXPndDQiS2Q7r5qlxrMnSZk 7mVLL6AT8WNyDR10Aj9stFSpOIP1GHwnoTZS+ZJK2cPkljol0G9qi9JKM1ufXjjXPp gilVv7PAj5XWmpwXB8kTWVl9OZyxhM8EbxZ27wzwbyb4wKnqArq5ti9OGnuiWd9fTY EJpYiYBngAQfA== Received: by mail-wm1-f44.google.com with SMTP id q20so2676134wmq.1 for ; Thu, 21 Apr 2022 01:01:12 -0700 (PDT) X-Gm-Message-State: AOAM533jlPgrYVeaOZNdqfkgwy3ekhoE5fZxJPWjx9Qer+8CrffkxeEH uSoEBhO1ifQe7Bod0HYrbPC2lxE2Myo0KgQe2lE= X-Google-Smtp-Source: ABdhPJzqgi7L5ALaCLdUcSpoT2Nq18aUkuxmUof0UjJFR0/s3eAKaJPqD7JeGsY3967XuokcLCyC0mVbOg8OIiR57g4= X-Received: by 2002:a1c:f219:0:b0:38c:782c:3bb with SMTP id s25-20020a1cf219000000b0038c782c03bbmr7185525wmc.94.1650528071363; Thu, 21 Apr 2022 01:01:11 -0700 (PDT) MIME-Version: 1.0 References: <20220421074204.1284072-1-hch@lst.de> <20220421074204.1284072-5-hch@lst.de> In-Reply-To: <20220421074204.1284072-5-hch@lst.de> From: Arnd Bergmann Date: Thu, 21 Apr 2022 10:00:55 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 4/7] ARM: remove the unused virt_to_dma helper To: Christoph Hellwig Cc: Russell King , Linus Walleij , Andre Przywara , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Greg Kroah-Hartman , Alan Stern , Laurentiu Tudor , Marek Szyprowski , Robin Murphy , "open list:IOMMU DRIVERS" , Linux ARM , Linux Kernel Mailing List , USB list X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220421_010117_513155_ED465C26 X-CRM114-Status: GOOD ( 18.90 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Apr 21, 2022 at 9:42 AM Christoph Hellwig wrote: > > Signed-off-by: Christoph Hellwig I generally prefer to have at least something useful in the description, e.g. why it's now unused and what it was used for before. > -static inline dma_addr_t virt_to_dma(struct device *dev, void *addr) > -{ > - if (dev) > - return pfn_to_dma(dev, virt_to_pfn(addr)); > - > - return (dma_addr_t)__virt_to_bus((unsigned long)(addr)); > -} I think __virt_to_bus() is now unused as well and could be removed in the same step. It looks like __bus_to_virt() is still used in the ISA DMA API, but as that is only used on footbridge and rpc, the generic version of that could be moved into rpc (footbridge already has a custom version). Arnd _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel