Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp12108036rwd; Fri, 23 Jun 2023 01:13:21 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7820BTxYag0SQxdfrTmGUC5krrZhUsk35q2DEEWo3sRGUMy4xPdk7Gv0kLIjzWsY0Ow377 X-Received: by 2002:a17:90b:98:b0:25b:cc96:a91a with SMTP id bb24-20020a17090b009800b0025bcc96a91amr16272972pjb.39.1687508001102; Fri, 23 Jun 2023 01:13:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687508001; cv=none; d=google.com; s=arc-20160816; b=imQ6p1AEOyyRhUaTugL21gTBXfHKOp6i0gba8pSwYoCciNbHnU2qz3OGKLaRmHthjz LKwU5tvCWMwffcmdDavgr4wJBJ7aHXKpHzj/TVIkbBESGVHfDHZl0DTs3WoX6wzR7Tao XMXKuD9mZ4NTRd47Guz9TTvQDX2FAM1NJbioGs8+BvvgW8t3rLhrCYKm/Ij3botrhmLB 8N4mNxpsrd4kEoB7EqkSWTclTdpkjrg/D4yozvuJ6ebBstUDSEFfZDXCw48FWRadzBKY UrqDzjnmejOEwTjkUBZEYggfrltdLGoqUrokI0GLN5iDgfGHlwDddAbsRIugHzUh1xeG LlhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=afzpoupdHBz4t80yeY68UW7BcSr6J0mUzcvK1xv8c1M=; b=yAGwjFNfHKvvpJNDjl360ihW1gIEpG7wDOZ71IJE4FYdfcGD2ZeWbhygejrSWeZwla LMFF655P2lU5EoVdmCvxwAASk9kcBeYT40CH9V2JGY7lN6UxYCeOMlZn1pib6GyxlIRV II1ddMuVrJI2LArnS+AT568nkyg83c7bYEoy2V7YYgsmWj4A2Q58r9yUFTCkKYRXnBFM os/xyTGYYlOQ1brf54BxFk+2HDYbaxW0Y57hBXuk4ic9eQ4oDdBd3DUPci6c9fDJ5f3h rxAjoOq8NXpTvrlNcIDgGDgtU/oT1TOIQPlaf8WsD9ZvKEatmXYoG42XAphinE59pNbw mLdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@resnulli-us.20221208.gappssmtp.com header.s=20221208 header.b=y839S9kx; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d2-20020a17090a2a4200b00251e16303f2si1441794pjg.86.2023.06.23.01.13.09; Fri, 23 Jun 2023 01:13:21 -0700 (PDT) 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=@resnulli-us.20221208.gappssmtp.com header.s=20221208 header.b=y839S9kx; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231571AbjFWHsJ (ORCPT + 99 others); Fri, 23 Jun 2023 03:48:09 -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-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: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 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 > >> >>> >>>[...]