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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ED813C7EE22 for ; Wed, 3 May 2023 08:10:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=2fL6qYcK6DSmQ+e4cZ++T1/x5Tlt8qqCoSRoWO1WIng=; b=OpsEG/wEh+46Zg 0JFlP+o60f0O5FsGL4XCvzfk2d6VwdrWAw3FwUOzyhYk74VcYH9lsVg91tTF5FeM6hysU44KgEY/L PHdMrqeEdPirjLz9XX479/0f0azEG72q6vHUsnEB3Sg/VOCqwEQ43GbrtUHDTBqKpZEHMxjySARa+ 3Rhufdgsrz6qC4btgetVjfXpNq5Lo67feLT+4QLwuGllxJh0QWkhG46767HL5iui0EdzAzKb63JmA yJ1QJHKWzAUAUwy8CejOXOMiCEpkWxm+9a2ubPy/m9gUNapKBExp7QyKB9y3CkmkJAa5UvOREg19F 4zLA87QoNmnxf+AToIpQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pu7Xy-003mAj-0a; Wed, 03 May 2023 08:09:10 +0000 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pu7Xu-003m90-08 for linux-arm-kernel@lists.infradead.org; Wed, 03 May 2023 08:09:07 +0000 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-95f4c5cb755so935177066b.0 for ; Wed, 03 May 2023 01:09:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20221208.gappssmtp.com; s=20221208; t=1683101342; x=1685693342; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=jFzfNEO9N0rAd0IFSTlhL/1/k8fjRgZbN+iRGB6LEKU=; b=lKN7VlvPrYcsCywJxCAEmjv2pVo5SdKgxV9kxVicMrTQ+TkD4FDlZpTaeSZSqVziBk L0apNiNKvoZFNrq7aqkxz5aT4W7OnzkBcggtyrDaTxzqSjsh/R75GM9SDtHnuCiYDeLf cLQiVyAbzhSyZYHrpTKOl0ADkvr+d0UL+N/lrs16ZIAdEQdNpsqP0RApBXY3Sr4yNI+l Fw8HiwNCb9WmNyw4WDcyoQt7lO/el8ozB6ZqltT/LFA/MdCq6ZNmX9dPTUKKw4imF3PX AclElk8u7kwnWmfsJMhW+lbKTgZt2KYQcfIiBzK+rn+W3bguMqU/iqCX9BXDSQzqMW57 LmGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683101342; x=1685693342; h=in-reply-to: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=jFzfNEO9N0rAd0IFSTlhL/1/k8fjRgZbN+iRGB6LEKU=; b=Al2gg9SPqq/vy4kE3PNDr/i5ZVeuKpghoOlQEw76SUxwG/Vx93i1Z9sCG3XjRxZvwD vcgIrwvVTSNcP3QPJ1t2xWCU7v8vuJfbf3vcFSZV7JfslpmZmwABfLp0zEJac1e8zUDv YMpQ4xx5FCuyyHAONL0Byjrbb88gipt0F7NbNsGWS8zuhanpmadGDAnN4Nnt8RVrtd/L fHacyJ+x1ld6oWinBpMv/lSmzwKRNJui3XM9Uhubtm7RYZrYU1nIkIC7P5+Uv99WZ2+c nfleY0c3kk8ewjBj9WigeInc/JorbM1aoyG0nOLHVYAv22KQSSSFelHe154eIbZmIIyd 4iZg== X-Gm-Message-State: AC+VfDy6q9epXiU8RC7uVoR9iImKoPx5/9FoCWiRno/IQwO61EX8BGYU jT1j+PVCujE/9AVKZYconLa7pg== X-Google-Smtp-Source: ACHHUZ5n2wZ9MUJaRcjAEgAzJu51k/4LrzZRMOXMfsvy1FLjJyPTF9duZadCiXNMd/IA+v5s4ajGZQ== X-Received: by 2002:a17:907:9288:b0:953:3e29:f35c with SMTP id bw8-20020a170907928800b009533e29f35cmr2175425ejc.45.1683101341714; Wed, 03 May 2023 01:09:01 -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 bo2-20020a0564020b2200b0050bc6983041sm416801edb.96.2023.05.03.01.09.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 May 2023 01:09:01 -0700 (PDT) Date: Wed, 3 May 2023 10:09:00 +0200 From: Jiri Pirko To: Vadim Fedorenko Cc: Jakub Kicinski , Arkadiusz Kubalewski , Jonathan Lemon , Paolo Abeni , Milena Olech , Michal Michalik , linux-arm-kernel@lists.infradead.org, Vadim Fedorenko , poros@redhat.com, mschmidt@redhat.com, netdev@vger.kernel.org, linux-clk@vger.kernel.org Subject: Re: [RFC PATCH v7 2/8] dpll: Add DPLL framework base functions Message-ID: References: <20230428002009.2948020-1-vadfed@meta.com> <20230428002009.2948020-3-vadfed@meta.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230428002009.2948020-3-vadfed@meta.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230503_010906_073466_8895AD09 X-CRM114-Status: UNSURE ( 9.20 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Fri, Apr 28, 2023 at 02:20:03AM CEST, vadfed@meta.com wrote: >From: Vadim Fedorenko [...] >+static struct dpll_pin * >+dpll_pin_alloc(u64 clock_id, u8 pin_idx, struct module *module, >+ const struct dpll_pin_properties *prop) >+{ >+ struct dpll_pin *pin; >+ int ret, fs_size; >+ >+ pin = kzalloc(sizeof(*pin), GFP_KERNEL); >+ if (!pin) >+ return ERR_PTR(-ENOMEM); >+ pin->pin_idx = pin_idx; >+ pin->clock_id = clock_id; >+ pin->module = module; >+ refcount_set(&pin->refcount, 1); >+ if (WARN_ON(!prop->label)) { Why exactly label has to be mandatory? In mlx5, I have no use for it. Please make it optional. IIRC, I asked for this in the last review as well. >+ ret = -EINVAL; >+ goto err; >+ } >+ pin->prop.label = kstrdup(prop->label, GFP_KERNEL); Labels should be static const string. Do you see a usecase when you need to dup it? If not, remove this please. >+ if (!pin->prop.label) { >+ ret = -ENOMEM; >+ goto err; >+ } [...] _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel