Received: by 10.213.65.68 with SMTP id h4csp1076034imn; Tue, 27 Mar 2018 14:21:54 -0700 (PDT) X-Google-Smtp-Source: AIpwx482K8BFaXP1OhLYXDwk6Mp7qntI1zRacn2RWCZra+P0AD2yBTnffhtb9RdoCQe9cgEFV2F5 X-Received: by 2002:a17:902:322:: with SMTP id 31-v6mr933310pld.122.1522185714628; Tue, 27 Mar 2018 14:21:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522185714; cv=none; d=google.com; s=arc-20160816; b=Z8SPBtjNClVdJHpT33iGVOaix8ClACmzs0X85gkXz7BKEHhkm/Uue6A1vziZLU0IZ8 TtBmjzDPCqcaLzNn1voVpUoJlwQtrO6mc5xhcWvRAgWpIcO42fTQgbg3EX2GRI/vAlu+ xUmZ6C//8k+RE+yZDr9FZjxx3f5tITxmF1vqiPZJ887Dk3tWLTh11SclEAr11h3XcLcp pLaaBa02zHivLlgj6cxkChJ/b4rujv9WZu4FvJb7DrgOdp0yMVGAGK5tXVYMQWP7cy8n 7cKkKVGnGdkTN8vJClCi/n8ocAlP6chEkLw+rEGHhdTlT6TWXEtpDYaVHg9gVi/CknRX WBig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dmarc-filter :arc-authentication-results; bh=eRj/w8LR/ZawdOfOLnE/8i6bI2bCN1b6xIIR16Aymng=; b=VB0j6u/atx1gesbWOR/KdzUpGOYcGXTSki2pXJxYNz/q9/LLTUw45wQ3/3K3+d0hJ3 4NDHRjPR7CqUTkje/Q9R+YpQzCx0fq9soPjkksh28lhlujmBMYXNJhLdM524JaLjMV5g xqxx+p+z6bLvfpClzaADRRFoxGMtFKjcskUWF8onVGN8a1rqIXrG6JelBbpLqb5aD15Q tXwYdXT7AAvJ/gNODsyt12cRvkCnj1oZaYmBmT32PHvJGS/4hz8vBblnLM7vvomS0njx gcWDoSLHVR3u1wKIdvyI8QsP+rzaR+uHkLNWugHKlrp30T+Q+xxJyrytawCwmPMQUtwD 33Qw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b60-v6si2066291plc.75.2018.03.27.14.21.40; Tue, 27 Mar 2018 14:21:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752155AbeC0VUC (ORCPT + 99 others); Tue, 27 Mar 2018 17:20:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:42856 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751088AbeC0VUB (ORCPT ); Tue, 27 Mar 2018 17:20:01 -0400 Received: from mail-qt0-f177.google.com (mail-qt0-f177.google.com [209.85.216.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DD777217D8; Tue, 27 Mar 2018 21:20:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DD777217D8 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=atull@kernel.org Received: by mail-qt0-f177.google.com with SMTP id l18so419793qtj.1; Tue, 27 Mar 2018 14:20:00 -0700 (PDT) X-Gm-Message-State: AElRT7H/2rQuG9Y9T51h3kn2AljpWFIDjE67r7PXNQ2NxRFEMpKkc7Z6 GNyqNmJNfYxMQKra2l4i7ieqDaAQfvZzR/EwX6o= X-Received: by 10.200.57.228 with SMTP id v91mr1580698qte.16.1522185600037; Tue, 27 Mar 2018 14:20:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.200.27.18 with HTTP; Tue, 27 Mar 2018 14:19:19 -0700 (PDT) In-Reply-To: References: <20180327195957.3878-1-atull@kernel.org> <20180327195957.3878-3-atull@kernel.org> From: Alan Tull Date: Tue, 27 Mar 2018 16:19:19 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RESEND PATCH v3 2/4] fpga: manager: don't use drvdata in common fpga code To: Moritz Fischer Cc: Anatolij Gustschin , Matthew Gerlach , Joel Holdsworth , Florian Fainelli , Joshua Clayton , Dinh Nguyen , Linux Kernel Mailing List , linux-fpga@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 27, 2018 at 3:11 PM, Moritz Fischer wrote: > On Tue, Mar 27, 2018 at 12:59 PM, Alan Tull wrote: >> Change fpga_mgr_register to not set or use drvdata. >> >> Change the register/unregister function parameters to take the mgr >> struct: >> * int fpga_mgr_register(struct fpga_manager *mgr); >> * void fpga_mgr_unregister(struct fpga_manager *mgr); >> >> Change the drivers that call fpga_mgr_register to alloc the struct >> fpga_manager (using devm_kzalloc) and partly fill it, adding name, >> ops, parent device, and priv. >> >> The rationale is that setting drvdata is fine for DT based devices >> that will have one manager, bridge, or region per platform device. >> However PCIe based devices may have multiple FPGA mgr/bridge/regions >> under one PCIe device. Without these changes, the PCIe solution has >> to create an extra device for each child mgr/bridge/region to hold >> drvdata. >> >> Signed-off-by: Alan Tull >> Reported-by: Jiuyue Ma > Acked-by: Moritz Fischer Thanks Moritz! Alan