Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp4423817rwj; Tue, 20 Dec 2022 09:54:45 -0800 (PST) X-Google-Smtp-Source: AA0mqf4l7lpgCj/zlqbUkLh8irECffZf9e2gMMKxa4Jg/ej8GZ4dggJum3NU/GTlhpZCT5n3lsoH X-Received: by 2002:a05:6402:1550:b0:46c:43ff:697b with SMTP id p16-20020a056402155000b0046c43ff697bmr39696726edx.3.1671558885016; Tue, 20 Dec 2022 09:54:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671558885; cv=none; d=google.com; s=arc-20160816; b=evCNU01v0Stx5RqIENiCCriYGccvk4udwM3wfVG+RwHfB/a1XoDxFqn4Aute1rH/80 3C+EEScGhp+w+1ftzXkEdX4LcfeMxxZtergilW9QvLR06TuX3hdOy2G6atK9L7/ji5bs QhpeufOSmsFxzVzaBv1/HwWCAgXzABELKkfyicg95yXh5pz5g/xrWfWRjMQjkB3fNsJG bFzDpI5NNVy1qSs0Clc51d6nj91rXtDuQoyzKIuiSi1z//vrBxG6ryQInKRjxE/F+Cd1 +/AVsT3WtXRCritwKhZlfbzZqds6xs+E/sma8DT+Mp6RdI5MEh/PeJclR8vr2+6+0Jol qjBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Zm88BvoeNx7GEbRInlh0fCVNb5XN7G5Eb+RL2adW4q8=; b=qyytYAEFHCHqdtL1ypN68uTg6cZTVQ/mdt8qil9hf50mxN+JQOoPfxqypirCSON6H8 6Q0RJUbIe4H2trR+bMUeb2AE265s3cy6xByBnz1GD7f5xpDnVUDDvw3NdHhKuUTM5WNX TYgDQjB0g1erJtf8vZUkLQ25zKa3/iIT61Ys51hJmFlUOsMXf/3P6Om3uJ7RkUVQo7C+ 8oBS0fvh++8B0t4E+Q1U2ThSZTJoAbnJ8x8gbDKy86Huig9Mcz1pfq1uxrRfSFubuxq8 dJfkG0nS86TmuoAAv94bjGJk2xdsC4zKPaN63F16Aq7FrwUejZOJ9Kc7UEbP7XoNe016 5WEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=kZ2uRO1I; 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 bx8-20020a0564020b4800b0046c0ff54c7csi11037422edb.189.2022.12.20.09.54.28; Tue, 20 Dec 2022 09:54:44 -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=kZ2uRO1I; 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 S233669AbiLTRPE (ORCPT + 69 others); Tue, 20 Dec 2022 12:15:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232195AbiLTROm (ORCPT ); Tue, 20 Dec 2022 12:14:42 -0500 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE283E4F; Tue, 20 Dec 2022 09:14:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1671556470; x=1703092470; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=9d1nJaAzSfJTMXVymi/H0f1f3ZOMiYblofLgN80VI2Y=; b=kZ2uRO1Ijw7zVrxG1za+CMINZHxhmW25l/sU1D9f9FrpOtqUATkWly1w pw2C30G9N0ZiJd6baSgNBIl5c0h7czddLbKpnHh07eN42zgwItY64bK0H NopmKlxixpHKFtKYhbAZk5F5+hNuP1SZm4eLiaXGjfp9C4WQIvf4VDPn5 Txc56VRJw/USCIPhRE33C4bqL5VmbMy42HDx3PP6kYXp97oPshsHLRqtT EYpyJL/LgPOj4aDGTpGuNF1vVrss8xBkKpXDnf9A0I3vP+RqoLQV+C3V6 UpPDnS9K05bt0vxVP2BR8fV4r3sb71VfFm3yC83iZjGR4qbx7MF/tK9ye g==; X-IronPort-AV: E=McAfee;i="6500,9779,10567"; a="299337927" X-IronPort-AV: E=Sophos;i="5.96,259,1665471600"; d="scan'208";a="299337927" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Dec 2022 09:09:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10567"; a="775401914" X-IronPort-AV: E=Sophos;i="5.96,259,1665471600"; d="scan'208";a="775401914" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga004.jf.intel.com with ESMTP; 20 Dec 2022 09:09:23 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1p7g7E-00D1Kc-1b; Tue, 20 Dec 2022 19:09:20 +0200 Date: Tue, 20 Dec 2022 19:09:20 +0200 From: Andy Shevchenko To: matthew.gerlach@linux.intel.com 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 v7 4/4] tty: serial: 8250: add DFL bus driver for Altera 16550. Message-ID: References: <20221220163652.499831-1-matthew.gerlach@linux.intel.com> <20221220163652.499831-5-matthew.gerlach@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221220163652.499831-5-matthew.gerlach@linux.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo 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,SPF_HELO_PASS, 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, Dec 20, 2022 at 08:36:52AM -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. In general the code here looks good to me, but one thing to discuss due to comment to the previous patch(es). ... > + u64 *p; > + > + p = dfh_find_param(dfl_dev, DFHv1_PARAM_ID_CLK_FRQ); > + if (!p) > + return dev_err_probe(dev, -EINVAL, "missing CLK_FRQ param\n"); > + > + p++; > + uart->port.uartclk = *p; So, here and the below is using always the second u64 from the returned data. Does it mean: - we always skip the first u64 from the returned buffer and hence... (see below) - we may actually return the second u64 as a plain number (not a pointer) from (an additional?) API? In such case we would not need to take care about this p++; lines here and there. - we have fixed length of the data, returned by find_param(), i.e. 2 u64 words? -- With Best Regards, Andy Shevchenko