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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9FD98EB64D7 for ; Fri, 23 Jun 2023 07:48:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231655AbjFWHsK (ORCPT ); Fri, 23 Jun 2023 03:48:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231586AbjFWHsG (ORCPT ); Fri, 23 Jun 2023 03:48:06 -0400 Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BE64170E for ; Fri, 23 Jun 2023 00:48:04 -0700 (PDT) Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-2b466073e19so5597601fa.1 for ; Fri, 23 Jun 2023 00:48:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20221208.gappssmtp.com; s=20221208; t=1687506482; x=1690098482; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=afzpoupdHBz4t80yeY68UW7BcSr6J0mUzcvK1xv8c1M=; b=y839S9kxd09ThLEfxmxC6oII3nMiQTOEHF9PojI9kiub9AcAU9VwNCWsdUi79zoGrL I53edaB4DcMZQQ0qflpJAUkvrrMC34ACSDUt0ujxI5pBdzcViBCk6n9FKsQqZhEr33/O VvEBWTcxrI6FtHpJuHeokazRCXKF4vksYk5o+OAae6lurukOLI6tXHVLSfb+Q+V7FEV/ sf8imt+RlLt6Lat5yCvrtngprbPt26rUBnApAtbvCEbqlIgaWoDJC9mFHQOn0JbF41dG AZbWjTZ98aLp9MgUn+gURDvYq4bO/7X5+p/tQDFnf5y1CNMOL2mMEGQ/vOQjVcpXlF7u UTbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687506482; x=1690098482; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=afzpoupdHBz4t80yeY68UW7BcSr6J0mUzcvK1xv8c1M=; b=U/FdnX62qwYXewfE0Hmh2FFZEFJF/MYUVo49V/3rQ+cynDvrr2neM9Yvm6nqTzHgmn dt/RDG8BaT9sWZJbe1yBsmkVhuZPMUcUlXUtRyGs1fTZeAhHOgVqIivQgQmu/jg9eJ3L D8RZJXMtYnYaT1Qz3iKVKuRGGADk3fy//1pQJX+xKks5oiISU1ZS4Pxb/3j1URUtOF5b mivkfSKKYctc+AQ55Vcb+gS2miFSxrPNEcGj2BlpUwEXtV8ktv3rcJp6MaZnXFaWy7qm hZg+HJpLEK3WFmEq2Im6U1lJRchQOyLe6uc2xatfTDTowWOCxugpItGXggGfIYC18GDA 5yOw== X-Gm-Message-State: AC+VfDyS+7y8W+OvvtSCIam5roHrFf7kVRLuf4NINGzzUqwNeBPYhcXn d1GVieVkrq/uCW+vVhIKwOBxiQ== X-Google-Smtp-Source: ACHHUZ60rNJlS88ekBpJsTiP/YnYc408Z0GlUIj/k7KV/RQOAUp7f7ExOF4ZyFZ2IcPQ5FADHxaxYg== X-Received: by 2002:a2e:9944:0:b0:2b4:6a20:f12b with SMTP id r4-20020a2e9944000000b002b46a20f12bmr13920987ljj.22.1687506482431; Fri, 23 Jun 2023 00:48:02 -0700 (PDT) Received: from localhost (host-213-179-129-39.customer.m-online.net. [213.179.129.39]) by smtp.gmail.com with ESMTPSA id b18-20020aa7cd12000000b0051bf49e258bsm666413edw.22.2023.06.23.00.48.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jun 2023 00:48:01 -0700 (PDT) Date: Fri, 23 Jun 2023 09:48:00 +0200 From: Jiri Pirko To: "Kubalewski, Arkadiusz" Cc: poros , "kuba@kernel.org" , "vadfed@meta.com" , "jonathan.lemon@gmail.com" , "pabeni@redhat.com" , "corbet@lwn.net" , "davem@davemloft.net" , "edumazet@google.com" , "vadfed@fb.com" , "Brandeburg, Jesse" , "Nguyen, Anthony L" , "M, Saeed" , "leon@kernel.org" , "richardcochran@gmail.com" , "sj@kernel.org" , "javierm@redhat.com" , "ricardo.canuelo@collabora.com" , "mst@redhat.com" , "tzimmermann@suse.de" , "Michalik, Michal" , "gregkh@linuxfoundation.org" , "jacek.lawrynowicz@linux.intel.com" , "airlied@redhat.com" , "ogabbay@kernel.org" , "arnd@arndb.de" , "nipun.gupta@amd.com" , "axboe@kernel.dk" , "linux@zary.sk" , "masahiroy@kernel.org" , "benjamin.tissoires@redhat.com" , "geert+renesas@glider.be" , "Olech, Milena" , "kuniyu@amazon.com" , "liuhangbin@gmail.com" , "hkallweit1@gmail.com" , "andy.ren@getcruise.com" , "razor@blackwall.org" , "idosch@nvidia.com" , "lucien.xin@gmail.com" , "nicolas.dichtel@6wind.com" , "phil@nwl.cc" , "claudiajkang@gmail.com" , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" , "intel-wired-lan@lists.osuosl.org" , "linux-rdma@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , mschmidt , "linux-clk@vger.kernel.org" , "vadim.fedorenko@linux.dev" Subject: Re: [RFC PATCH v8 04/10] dpll: netlink: Add DPLL framework base functions Message-ID: References: <20230609121853.3607724-1-arkadiusz.kubalewski@intel.com> <20230609121853.3607724-5-arkadiusz.kubalewski@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fri, Jun 23, 2023 at 02:56:24AM CEST, arkadiusz.kubalewski@intel.com wrote: >>From: Jiri Pirko >>Sent: Wednesday, June 21, 2023 3:08 PM >> >>Wed, Jun 21, 2023 at 01:53:24PM CEST, jiri@resnulli.us wrote: >>>Wed, Jun 21, 2023 at 01:18:59PM CEST, poros@redhat.com wrote: >>>>Arkadiusz Kubalewski píše v Pá 09. 06. 2023 v 14:18 +0200: >>>>> From: Vadim Fedorenko >>> >>>[...] >>> >>>Could you perhaps cut out the text you don't comment? Saves some time >>>finding your reply. >>> >>> >>>>> +static int >>>>> +dpll_set_from_nlattr(struct dpll_device *dpll, struct genl_info >>>>> *info) >>>>> +{ >>>>> +       const struct dpll_device_ops *ops = dpll_device_ops(dpll); >>>>> +       struct nlattr *tb[DPLL_A_MAX + 1]; >>>>> +       int ret = 0; >>>>> + >>>>> +       nla_parse(tb, DPLL_A_MAX, genlmsg_data(info->genlhdr), >>>>> +                 genlmsg_len(info->genlhdr), NULL, info->extack); >>>>> +       if (tb[DPLL_A_MODE]) { >>>>Hi, >>>> >>>>Here should be something like: >>>> if (!ops->mode_set) >>>> return -EOPNOTSUPP; >>> >>>Why? All drivers implement that. >>>I believe that it's actullaly better that way. For a called setting up >>>the same mode it is the dpll in, there should be 0 return by the driver. >>>Note that driver holds this value. I'd like to keep this code as it is. >> >>Actually, you are correct Petr, my mistake. Actually, no driver >>implements this. Arkadiusz, could you please remove this op and >>possibly any other unused op? It will be added when needed. >> >>Thanks! >> > >Sorry, didn't have time for such change, added only check as suggested by >Petr. >If you think this is a big issue, we could change it for next version. It's odd to carry on ops which are unused. I would prefer that to be removed now and only introduced when they are actually needed. > >Thank you! >Arkadiusz > >> >>> >>>[...]