From patchwork Wed Jun 23 18:24:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rix X-Patchwork-Id: 12340307 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=-12.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 667B9C4743C for ; Wed, 23 Jun 2021 18:26:48 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 2AF6861166 for ; Wed, 23 Jun 2021 18:26:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2AF6861166 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=yMiDK0WSh8TliNzgxy2SYBNIVT7HkVc0P+JUV0MmaUA=; b=qeWzWNx+mpsqaX riM5pGVySYhILEALASUaWWqLLGfOrDwZDejN4a3VgN3qxCcVqoxwVMvwMfBr2elRXEAFJ1ksVSYTz wcThbCvFxCaJWWYEeUKArcxyx5tvhKt06UK4zYv3faNHt+0pTjkbU5SEZK6cXQb1WFnLG3ojEMabO npxOfScxIxdsgYlOxTJtUvxOVCXCyK3CYOcjb81S6mZe292TdMcMOhoDL0VgVO/HHWkTX17FLWmfc +PhN2UcMz9pyniVLuz9W4RJ3Yppp8C0lnIewyFaMl/uUSzY+wK4A8R6vkyNb+x3fKiO+hR/VL0c3p EhEUAFbSHAozAMWMtKLg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lw7Y3-00Bc9N-5R; Wed, 23 Jun 2021 18:24:27 +0000 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lw7Xz-00Bc8N-5E for linux-arm-kernel@lists.infradead.org; Wed, 23 Jun 2021 18:24:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624472661; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GrJNB3F5Xa+3Y8OXY7VwcTtiFdRpMIB1S8U9GBXw92s=; b=Rys4HDoDp0XQXWwm94m6fZMDoHgbTd9F8/Waui2qHbbTic70A7KSJ5vee/tUMcjX5v4frY y9xNNoycK427RbtvSO4BB+udWkPDtciW1o/mRHxqzYBQeaX/ZyCkYmSK5psvr7zxAfPBWg lHzKzLdVqNwJOpHuekB+UFKVpjwP41Y= Received: from mail-oi1-f198.google.com (mail-oi1-f198.google.com [209.85.167.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-589-a1WI_03UOtuCLN0ENioG8Q-1; Wed, 23 Jun 2021 14:24:19 -0400 X-MC-Unique: a1WI_03UOtuCLN0ENioG8Q-1 Received: by mail-oi1-f198.google.com with SMTP id j1-20020aca65410000b02901f1d632e208so2224766oiw.16 for ; Wed, 23 Jun 2021 11:24:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=GrJNB3F5Xa+3Y8OXY7VwcTtiFdRpMIB1S8U9GBXw92s=; b=YjWBAMawAA8rVtQYqdEZtbOPv7qkpSqT6iitP3oAHTdS+aZHr/Se5Jaasym+wX9Ld4 JrVbqhrL9O2AN/M89YmXeAp0Fp0R0E/0jOTU6Fw4e+1UyEZrJN6JSrONpWBWorl97rpu 4uX0pIx/GKHuMvt0EBx6H3fce0rSBMlbJblhYSbuz4Tf7cSUAcTMTJ1SfYBNt3ybjN7B GFM/hd6AwMH3b3bvMYCS0qn+puXq3IN3SRbj/2y3IMcst7TEtsZi78lUpFdxDGZLtJD9 iGwMl9QRKwjrBpadm515kfZqyjUiq5tknsQKw/mGPcJOA+j/EYzqWoG6g3DZUbmiFHNN MNNg== X-Gm-Message-State: AOAM532Eacmk7cqndKZxZCWVjQD+aJal0JwTYgcCYBxiYtyrZ8XJREOD fz63/Nb4o5MrH8hzxV/XxE2BQHlr/kZAKMJt80st0aecK19X0SiIbfIdperyyZ+gXQ+tq0cvWIP XyIstaZDVcCUJ0sto6JA/uygZt7BzUFbD04c= X-Received: by 2002:a9d:1b4f:: with SMTP id l73mr1114566otl.21.1624472659094; Wed, 23 Jun 2021 11:24:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzg5ir0u+uONkcYSiNdhPznngImJRhHue1OFRj781vKuQhdCxHokiOVjGkujqp5MU0GiKAItw== X-Received: by 2002:a9d:1b4f:: with SMTP id l73mr1114558otl.21.1624472658915; Wed, 23 Jun 2021 11:24:18 -0700 (PDT) Received: from localhost.localdomain.com (075-142-250-213.res.spectrum.com. [75.142.250.213]) by smtp.gmail.com with ESMTPSA id l24sm105186oii.45.2021.06.23.11.24.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Jun 2021 11:24:18 -0700 (PDT) From: trix@redhat.com To: hao.wu@intel.com, mdf@kernel.org, michal.simek@xilinx.com Cc: linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Tom Rix Subject: [PATCH v3 0/7] wrappers for fpga_manager_ops Date: Wed, 23 Jun 2021 11:24:02 -0700 Message-Id: <20210623182410.3787784-1-trix@redhat.com> X-Mailer: git-send-email 2.26.3 MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=trix@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210623_112423_336245_82A5CABA X-CRM114-Status: UNSURE ( 7.33 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Tom Rix As followup from https://lore.kernel.org/linux-fpga/06301910-10a1-0e62-45a0-d28ab5a787ed@redhat.com/ Boards should not be required to have noop functions. So improve or create fpga-mgr wrappers for the fpga_manager_ops. Remove the noop functions. Refactor fpga-mgr to use the wrappers. write_sg op was not wrapped on purpose. Its checking / use in fpga_mgr_buf_load_sg() did not warrant a wrapper. Changes from v1: commit subject,log v2: rebase to next-20210623 Tom Rix (7): fpga-mgr: wrap the write_init() op fpga-mgr: make write_complete() op optional fpga-mgr: wrap the write() op fpga-mgr: wrap the status() op fpga-mgr: wrap the state() op fpga-mgr: wrap the fpga_remove() op fpga-mgr: collect wrappers and change to inline drivers/fpga/dfl-fme-mgr.c | 6 --- drivers/fpga/fpga-mgr.c | 102 +++++++++++++++++++++++------------ drivers/fpga/stratix10-soc.c | 6 --- drivers/fpga/ts73xx-fpga.c | 6 --- drivers/fpga/zynqmp-fpga.c | 7 --- 5 files changed, 67 insertions(+), 60 deletions(-)