From patchwork Tue Jun 8 19:54:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rix X-Patchwork-Id: 12308061 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=-11.9 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,URIBL_BLOCKED,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 7B0D2C47082 for ; Tue, 8 Jun 2021 19:57:30 +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 49C9D61375 for ; Tue, 8 Jun 2021 19:57:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 49C9D61375 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=h8VG2ddXL2QKbVub/6jEMBvslvdPykT19cf/Tq8UUNo=; b=Vx7DNZ9GQfEWsK CJBjoRCvkNVRE8WFRRLOTihFwzgx8KFBpncdLuJoLrr5P/un5dVfxk93xF1mjoyyGwBuIA86/eZ4g s2ikQHdXNqb6BOsyDq+hoN5Sac8oUZMqobn0gSCzBD/HIH4gYLCccWDVVLvA8HnprjCrn/hXMowY4 FTb8Y4vt/DJEYCxJxXwb+vYUA4YJTOWcOW0YoPltm1qkHs7gDaNZmqvOq8FKPsBQOS171h2kwsMi0 TDowM6pfcF8rrgGvXBY64dN1lAaGjZxDVuIhkugSwNfh+brOxnD3u9bqGSWZCoNUHV8KzwYwn0sUk Pa4pEkObGvGrj00SBIdA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqhok-00AIhM-4z; Tue, 08 Jun 2021 19:55:18 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqhog-00AIdI-1r for linux-arm-kernel@lists.infradead.org; Tue, 08 Jun 2021 19:55:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623182113; 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=g/+OD7OvS+76UUwXsW39r3R0qwsEt76jbnvntpEkAgY=; b=bz/+PDi6KroohPfOe2OGlMqZ3ALAefO4I+0XZMy9/mXwcxArJnQGxCg37FRAocmQVWGZwY Tdo6b0ercW7ljksGe4RGpHmsX/tyFzr4cnjoMwjTu6nxZUK5D7SXveFNQ68inRBXdZDxUL /RlgX6m2oRm0ccpT2q3a4nd1sGnBeIA= Received: from mail-ot1-f69.google.com (mail-ot1-f69.google.com [209.85.210.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-404-Gl_y5CjhOp-RDRBd-LzaTA-1; Tue, 08 Jun 2021 15:55:11 -0400 X-MC-Unique: Gl_y5CjhOp-RDRBd-LzaTA-1 Received: by mail-ot1-f69.google.com with SMTP id r16-20020a0568301350b0290363e6a9392fso14673902otq.13 for ; Tue, 08 Jun 2021 12:55:11 -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=g/+OD7OvS+76UUwXsW39r3R0qwsEt76jbnvntpEkAgY=; b=KzodRj9b+IFsE2x0KVoyK5CdMinH06hCzyB3SJUeBJ9i/bwifxjsTyGRcbFJImLk02 ADTRYiAjaMcvkNRqhkv86lzHiIHrywhXk4f/UcsnYs3KNP29xMqUl0Jk1MPyp2DQDfbY rEhBd/BqNIZSA4HonhSDULFVqLGsK8bsyaII3t2HzHm0CyP3TM/6N4Fspu1gIs8V3heu u6IkNXc48wXitUVWQ072BflpIOh7yGSZtDi+psRMxXZZ1BcnktM8EaO3CRJDN0QW5wqE jtt+xHId+4PvEK0CpMfR02eOPbT9AfpAjP9oHzr1GBUePZI92MDeHI2526tHw9aTAX7z itxQ== X-Gm-Message-State: AOAM5326eITeMhJvq4XSWHXeOgKB7mUQgEr172m+LUWce61CAsnwELuo NUb74K+hA8WZBd+4ANrJUQdwxOcESdAbxANxrsppZYvR6hCE6K1Qc9Xik2D12AFr19F15RWQNI/ UW3OM41/pemDW81muyh04gRPz33SDzrlesAE= X-Received: by 2002:a4a:a843:: with SMTP id p3mr18458767oom.29.1623182111169; Tue, 08 Jun 2021 12:55:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7iFsOk+xHbLD3KsS/d+cS++jYnbcHd1SPwdO/kpmBt2w1RQcd/Tt8SvWaTnz4Ft10DJ6acg== X-Received: by 2002:a4a:a843:: with SMTP id p3mr18458754oom.29.1623182110927; Tue, 08 Jun 2021 12:55:10 -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 s17sm3024046oog.31.2021.06.08.12.55.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Jun 2021 12:55:10 -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 v2 0/7] wrappers for fpga_manager_ops Date: Tue, 8 Jun 2021 12:54:58 -0700 Message-Id: <20210608195506.3022550-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-20210608_125514_199711_4D874EC6 X-CRM114-Status: UNSURE ( 7.41 ) 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 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(-)