Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp559011pxb; Wed, 29 Sep 2021 05:11:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzo6yS9mWd5TnpCXyJiNU1O/i5HTPix3eyLCdiSmZ32vhwkMBhBSbW4BedZJRuPcd7oSurY X-Received: by 2002:aa7:d619:: with SMTP id c25mr14550213edr.365.1632917487309; Wed, 29 Sep 2021 05:11:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632917487; cv=none; d=google.com; s=arc-20160816; b=KA8dkAMyHQT34m9ANFzovZoSaqLk3Dq88aaYvu0rVNraJFreylybD+jBOen1gG+8C9 cbRAPoclM19U0CASsTYEx+ursblZm92JqYNE5NzvFPJAGCDs05JOH0zm1dbyo84z4Jkm e/SZV+qHmgaaZBeYQQKxe1du/mUwUrMDpOXIVciXGLGWeyQ4k6ZLjxHiaIPaitWUCVQT b1RbREGo+OEA3iOFe8vyVkwfLPj4TbhSh43+QKuBD8l4HfBDTvG3eFuFvAntsgbScXVu 7gOTUpUNNo2zQ3XVB4XpDVGYdbeegiW1LERKNrNG7Ls7ZbmhI08pcmksR55ngiRqvsZj BOLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=Dp0+XGwWDjAOB1QuEwuRgqdMmOinEz8HL8XSPgFzooo=; b=r40aqdzUZDsH1wPSUuPBsoYBgPtFohaMoZBu1DvuvbWLEwyiJfQrZjbWRMrHLmzosL ytWpoxeLDWjvzyypQUEVoG0/GZPmsOxyVCTKEPKrOxq+qAhRvGF+o8GgExG1YfpVI/J5 MwFRF9zuI7CfO4xw0SJVbxw7MpINR8hLjriezkfMqnGAe4ay44y8r5pwYNZiNAJLZPxP 9rpp6EF6kAgLHntTk8Nh99rrvYY/VDO7X0cdakNG9yBmjoZSawxS6Blm/6BjdVMM5R63 mIE3i9FNq6S+EeKWRQylR2SVLJANa3CePknwlMtFSD1fEsqwosbgZFC0gyP+y7+O+L4I sD5Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y2si2253527edq.564.2021.09.29.05.11.02; Wed, 29 Sep 2021 05:11:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343571AbhI2MK2 (ORCPT + 99 others); Wed, 29 Sep 2021 08:10:28 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:46349 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343584AbhI2MKR (ORCPT ); Wed, 29 Sep 2021 08:10:17 -0400 Received: from mail-wr1-f52.google.com ([209.85.221.52]) by mrelayeu.kundenserver.de (mreue109 [213.165.67.113]) with ESMTPSA (Nemesis) id 1Md6V3-1n5i9R2Lsh-00aIRr for ; Wed, 29 Sep 2021 14:08:34 +0200 Received: by mail-wr1-f52.google.com with SMTP id t18so3955844wrb.0 for ; Wed, 29 Sep 2021 05:08:34 -0700 (PDT) X-Gm-Message-State: AOAM5317NhO7rJO23dqORS6u5aznnqEmoQMrhQF7WwQ5Y1fYw2JnmSA1 O424SPeJb3DNRKGVRKEmcPcSadEFSV8EC4i3+wo= X-Received: by 2002:a05:6000:1561:: with SMTP id 1mr6276909wrz.369.1632917314213; Wed, 29 Sep 2021 05:08:34 -0700 (PDT) MIME-Version: 1.0 References: <20210929094442.46383-1-eli.billauer@gmail.com> In-Reply-To: <20210929094442.46383-1-eli.billauer@gmail.com> From: Arnd Bergmann Date: Wed, 29 Sep 2021 14:08:18 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] char: xillybus: Eliminate redundant wrappers to DMA related calls To: Eli Billauer Cc: gregkh , Arnd Bergmann , Linux Kernel Mailing List , Christophe JAILLET Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:WVsqfSpCCnEY+duubj/1BK9nI0N+RvrIUNtYxi2kklqYPwHzqeY ukIDhgMZupoXaIJbfGXAPURuldB4p1E3xyuSb/cErTebrVrYAnCdDHwm8XX5fv49JDXFjMv Faan535S2iyYApYDl4pMgEHDAIQIPYPSZhU7PqGd2bAZY6jFYAMxbFEzuLy6J8Wo65niRja oXih5u37MGNDZ4k2+P/Gg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:SxLPokYcn+g=:Qtqoar/jNcPawDklADAeqi aMuqOjzFUpblFFcwbCMZx2ehDQvSJZdzRB8U/zw+KU5aQZk8qCw+RZ5AoETLhvqy8/cPPc1ZZ H2kgRzHx2IPT3+DKbI4l+jJrejHmQVgGTWULa9n37qFmgH4/VI0F6M4aDf4pCDWXK61nflI1A +/sceOQ2eAzeEa+Qqbg8h4khhBhkaqwTOtQmMDJJSGeeNH2DIkfQ4bkGu96czRZv2/T5Mpd9z 4eAqwBii+2OZLShOBzUPezOiYWvBuAqIs2znQa/+sQWvfTeqWVeuS0RkM8co/Rdhz4SwgoNkw ueLeXaQjKQ6+1iSPTPtd/2edUcXByDhvGtCLhqlN83FxMVNKuR1XLqiuMfg4D9iOkuFm3PMTa z6ltQtk3h27gcHGPxHAD8Bj5yu98JL2bfqAhstoO+yiMFnryH2OTbqrQSbM6fwRnkheshnMyx BCIWT1+Wj5PsS83y9H/JNl0aIyeOR/PbgngqqXbNzrGOQhR2H95QVgOcZKWEO2jT38LAZqnOn wPAASNCQ0u8YLebiL5j35xW6ctU5NcKyflMCT1QE6oxlZ0ga4RL4bu/TVA4V6itg4GKEw/4ta eVEuA+sIDzBJbf90LB7kn7h1w4L9evrETkN7u5nXSV4YSTOfV4o/E97502PTkkib3qOYEXFHy cjwZxCubWE3MPCtfgV9QJZVz4Zw8+87HXKTfpOAJ1urbStlgJUnqatG1x/72gWa6qlCtK8sqU QSxVZB2KoMi1ZS3uCU/vWeXXD+Ei6+ZHGeuv9A== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 29, 2021 at 11:44 AM wrote: > > From: Eli Billauer > > The driver was originally written with the assumption that a different > API must be used for DMA-related functions if the device is PCIe based > or if not. Since Xillybus' driver supports devices on a PCIe bus (with > xillybus_pcie) as well as connected directly to the processor (with > xillybus_of), it originally used wrapper functions that ensure that > a different API is used for each. > > This patch eliminates the said wrapper functions, as all use the same > dma_* API now. This is most notable by the code deleted in xillybus_pcie.c > and xillybus_of.c. > > It also eliminates the OF driver's check for a "dma-coherent" attribute > in the device's OF entry, since this is taken care of by the kernel's > implementation of dma_sync_single_for_*(). > > There is however still need for one wrapper function, which is merged > from xillybus_pcie.c and xillybus_of.c into xillybus_core.c: The call to > dma_map_single() is wrapped by a function that uses the Managed Device > (devres) framework, in the absence of a relevant function in the current > kernel's API. > > Suggested-by: Christophe JAILLET > Suggested-by: Arnd Bergmann > Signed-off-by: Eli Billauer Reviewed-by: Arnd Bergmann