Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp8490878rwl; Tue, 10 Jan 2023 14:29:51 -0800 (PST) X-Google-Smtp-Source: AMrXdXtCGW4qBwDlIzF7N1gKY/o/XNimjo+FV1ldbgCxB01AUWRkZQFxz7OKm4UCKWN8lGbYQh8N X-Received: by 2002:a05:6a21:2d09:b0:a4:aa40:2253 with SMTP id tw9-20020a056a212d0900b000a4aa402253mr82516526pzb.21.1673389790959; Tue, 10 Jan 2023 14:29:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673389790; cv=none; d=google.com; s=arc-20160816; b=Wed/rHS4tWw3sosBu1MA/vqlKwSyIqsK6Xl5EX/vE5OIz2ldPK8dNUC+8k1QTR+Hm5 mePkopt57MQzoZw8bAFwKFBqeGHLyPzpDsxbhsd7npWkjOamACz58jcYQoYcjqjZmMRU pKOyVweBdXidXnnmgShvKqyPO84z3fTErkkxUDsOL8Lw5/kvBk8Wr8kLLRTVPUXG9WZv RrC87D4rgMPT3vqxvyq7k2xfEyt7qcmibxY+7OBctldYP9UqFvx5rwIRDemzF6U5UW6j ow5FoRbLlFCtd+UvBJ5mJiSKZwi0tsGTxX00JfV59DEReo3/ltQbO9fkk+yTTJ+RlkZ2 4Fxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=CXG21j99BEf1kFPb8AaLME/8QtDd6HUasOqEjbBNQt4=; b=LGX+0u6DxRiQf2XkB8UYmtuycwZkKPelKHFI7zUyf5O2aLS705LNTG1qWHHulXz4H/ rbPpDwiS5iL+wg9YeR2OWVKs6w4qYinSAO8TCfq4D5xHx1xouxe66MrGOSbvVh/5/gOD rGItwyEvUfbntxavnT2UdX6JEv1WRD/nsRBYEwlPmHma/sk+/gNMV0dKJtpPpbMzFd3c 2rhG4KsgDEbzd4EoZtH+r98nArxZ0jMzy205vg8aQGd0CL4Cd6nm0IOia78c/ziqqDDI eXPcHEKGzICg1ZLAJbVQ4jkV1FgVtiEz/DhDjui6wX9K3ZICk7i78TpztXEhzV6/TBSq B8lA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Uay20aZo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t5-20020a6564c5000000b0045a73a1790asi12209069pgv.613.2023.01.10.14.29.44; Tue, 10 Jan 2023 14:29:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Uay20aZo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230389AbjAJWQu (ORCPT + 54 others); Tue, 10 Jan 2023 17:16:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233271AbjAJWQs (ORCPT ); Tue, 10 Jan 2023 17:16:48 -0500 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCB754D4A9; Tue, 10 Jan 2023 14:16:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673389007; x=1704925007; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=SRaBXAGBYCqYgqYsrdvN0StqVlMBENfsuHhSzhILO40=; b=Uay20aZowSESnu0Uh17f55zkfpF2qP7Ukgi8b5BxwKjhGDlC1Te2ZDl6 q1KaVoah5GBGJY1VLToUGetz3vATkRMapTOeK1PcpTPYUyV3pMFzcH3qE WdB8R202Exxu+Tx3lhcNDMmgomw7HCPysRYr3sMVCKAL+njo2winGgzJO KH6ekfwsBXcCIk6Xn7xnAwNJ8DZdwXSnUrPRqEnKkJOwJIQWh7zr8vBOq 107jvX1R8bEr87XaDIx8wMRUZK/Kf88rjL2ETTMw3JNF6d6BQmH/7LKHr ge25poa92auaB8b1Y1tOn+GSsQ0NRquYQv445jJOOVaSc5Xx/qvZR7MuX A==; X-IronPort-AV: E=McAfee;i="6500,9779,10586"; a="350496639" X-IronPort-AV: E=Sophos;i="5.96,315,1665471600"; d="scan'208";a="350496639" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jan 2023 14:16:33 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10586"; a="831143562" X-IronPort-AV: E=Sophos;i="5.96,315,1665471600"; d="scan'208";a="831143562" Received: from rhweight-wrk1.ra.intel.com ([137.102.106.43]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jan 2023 14:16:32 -0800 Date: Tue, 10 Jan 2023 14:17:10 -0800 (PST) From: matthew.gerlach@linux.intel.com X-X-Sender: mgerlach@rhweight-WRK1 To: Andy Shevchenko cc: hao.wu@intel.com, yilun.xu@intel.com, russell.h.weight@intel.com, basheer.ahmed.muddebihal@intel.com, trix@redhat.com, mdf@kernel.org, linux-fpga@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, tianfei.zhang@intel.com, corbet@lwn.net, gregkh@linuxfoundation.org, linux-serial@vger.kernel.org, jirislaby@kernel.org, geert+renesas@glider.be, niklas.soderlund+renesas@ragnatech.se, macro@orcam.me.uk, johan@kernel.org, lukas@wunner.de, ilpo.jarvinen@linux.intel.com, marpagan@redhat.com, bagasdotme@gmail.com Subject: Re: [PATCH v10 4/4] tty: serial: 8250: add DFL bus driver for Altera 16550. In-Reply-To: Message-ID: References: <20230110003029.806022-1-matthew.gerlach@linux.intel.com> <20230110003029.806022-5-matthew.gerlach@linux.intel.com> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 10 Jan 2023, Andy Shevchenko wrote: > On Mon, Jan 09, 2023 at 04:30:29PM -0800, matthew.gerlach@linux.intel.com wrote: >> From: Matthew Gerlach >> >> Add a Device Feature List (DFL) bus driver for the Altera >> 16550 implementation of UART. > > ... > >> +static int dfh_get_u64_param_val(struct dfl_device *dfl_dev, int param_id, u64 *pval) >> +{ >> + size_t psize; >> + u64 *p; >> + >> + p = dfh_find_param(dfl_dev, param_id, &psize); >> + if (IS_ERR(p)) >> + return PTR_ERR(p); > >> + if (psize != sizeof(u64)) >> + return -EINVAL; > > If this code stays in the newer versions, make it more robust against changes, > i.e. by using sizeof(*pval). Yes, sizeof(*pval) would be more robust if this ode stays in the newer versions. > >> + *pval = *p; >> + >> + return 0; >> +} > > ... > >> +config SERIAL_8250_DFL >> + tristate "DFL bus driver for Altera 16550 UART" > > 5 > >> + depends on SERIAL_8250 && FPGA_DFL >> + help >> + This option enables support for a Device Feature List (DFL) bus >> + driver for the Altera 16650 UART. One or more Altera 16650 UARTs > > 6 > > Which one is correct? Great catch! The typo has been there since v1. I will update to 16550. Thanks, Matthew Gerlach > >> + can be instantiated in a FPGA and then be discovered during >> + enumeration of the DFL bus. >> + >> + To compile this driver as a module, chose M here: the >> + module will be called 8250_dfl. > > -- > With Best Regards, > Andy Shevchenko > > >