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 X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 E5C80C2D0A3 for ; Tue, 3 Nov 2020 07:40:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8C2D0223BD for ; Tue, 3 Nov 2020 07:40:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604389202; bh=68e0Vnu+CK8B/azleFfgALzJ4Qv/7o7FExD2eTflWFI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=u5fFiwejvQKOshgkoCifrvLAPk/7L7wSsqz14XGqFvb6R7V8+mtWy60UBoAAjO5AY e4jNEDiI5U/yR10iud59Ec1Yy8d9W5x/ZwvVvnogqJqiTK75ygsQlM0eTXWEa8eeh8 O0cGexwUT3pDTO/G5tUTTwMq5clZ0SYl80dFZw1c= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727760AbgKCHkC (ORCPT ); Tue, 3 Nov 2020 02:40:02 -0500 Received: from mail.kernel.org ([198.145.29.99]:58436 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725958AbgKCHkC (ORCPT ); Tue, 3 Nov 2020 02:40:02 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8B9AC2222B; Tue, 3 Nov 2020 07:39:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604389200; bh=68e0Vnu+CK8B/azleFfgALzJ4Qv/7o7FExD2eTflWFI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Ak+Z5GJF6dpgJbLaAOKqC+77mK+lknB2t1cRB/svjvsnMVeZu2SQFd7vJ1NwFz8MN BBv844pTekTiWrzlE3LGncBJnCcQUC4vu1Odyj4MWElWHJt3F9yr1SzSNFRkloDx7E mnGWr+d7uu88UJ8b3Y5IfGNAFUWQt2guXoxhlcLg= Date: Tue, 3 Nov 2020 08:40:53 +0100 From: Greg KH To: Moritz Fischer Cc: linux-fpga@vger.kernel.org, Xu Yilun , Wu Hao , Matthew Gerlach , Russ Weight , Tom Rix Subject: Re: [PATCH 2/4] fpga: dfl: move dfl_device_id to mod_devicetable.h Message-ID: <20201103074053.GC2500572@kroah.com> References: <20201103072104.12361-1-mdf@kernel.org> <20201103072104.12361-3-mdf@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201103072104.12361-3-mdf@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-fpga@vger.kernel.org On Mon, Nov 02, 2020 at 11:21:02PM -0800, Moritz Fischer wrote: > From: Xu Yilun > > In order to support MODULE_DEVICE_TABLE() for dfl device driver, this > patch moves struct dfl_device_id to mod_devicetable.h > > Some brief description for DFL (Device Feature List) is added to make > the DFL known to the whole kernel. > > Signed-off-by: Xu Yilun > Signed-off-by: Wu Hao > Signed-off-by: Matthew Gerlach > Signed-off-by: Russ Weight > Reviewed-by: Tom Rix > Acked-by: Wu Hao > Signed-off-by: Moritz Fischer > --- > drivers/fpga/dfl.h | 13 +------------ > include/linux/mod_devicetable.h | 24 ++++++++++++++++++++++++ > 2 files changed, 25 insertions(+), 12 deletions(-) > > diff --git a/drivers/fpga/dfl.h b/drivers/fpga/dfl.h > index ac373b1fcff9..549c7900dcfd 100644 > --- a/drivers/fpga/dfl.h > +++ b/drivers/fpga/dfl.h > @@ -22,6 +22,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -525,18 +526,6 @@ enum dfl_id_type { > DFL_ID_MAX, > }; > > -/** > - * struct dfl_device_id - dfl device identifier > - * @type: DFL FIU type of the device. See enum dfl_id_type. > - * @feature_id: feature identifier local to its DFL FIU type. > - * @driver_data: driver specific data. > - */ > -struct dfl_device_id { > - u16 type; > - u16 feature_id; > - unsigned long driver_data; > -}; > - > /** > * struct dfl_device - represent an dfl device on dfl bus > * > diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h > index 5b08a473cdba..e4870e5d3ea8 100644 > --- a/include/linux/mod_devicetable.h > +++ b/include/linux/mod_devicetable.h > @@ -838,4 +838,28 @@ struct mhi_device_id { > kernel_ulong_t driver_data; > }; > > +/* > + * DFL (Device Feature List) > + * > + * DFL defines a linked list of feature headers within the device MMIO space to > + * provide an extensible way of adding features. Software can walk through these > + * predefined data structures to enumerate features. It is now used in the FPGA. > + * See Documentation/fpga/dfl.rst for more information. > + * > + * The dfl bus type is introduced to match the individual feature devices (dfl > + * devices) for specific dfl drivers. > + */ > + > +/** > + * struct dfl_device_id - dfl device identifier > + * @type: DFL FIU type of the device. See enum dfl_id_type. > + * @feature_id: feature identifier local to its DFL FIU type. > + * @driver_data: driver specific data. > + */ > +struct dfl_device_id { > + __u16 type; > + __u16 feature_id; > + unsigned long driver_data; This is the wrong type for driver_data now that it goes to userspace :( {sigh}