Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6002131rwd; Mon, 19 Jun 2023 00:22:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6CGAjLnC34aDNL631InxfniEZ0dBTlsvG0NAi4AhDhue/9y1BscUf27WA7MC45P+Xx3EFW X-Received: by 2002:a17:902:c948:b0:1b3:e184:70c5 with SMTP id i8-20020a170902c94800b001b3e18470c5mr20070180pla.11.1687159361881; Mon, 19 Jun 2023 00:22:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687159361; cv=none; d=google.com; s=arc-20160816; b=XSlJYgNillZQCBH0XQhURLX57p3x4PUbkQOT+fQop1Rb6mKDc2gQ+FWWG59jr8hjPn xd70bQ+r4AoPNHHLZRi7NUPJK5+V1MhdohqJepsCDE3vOIE4oHqm3BUwpU/8j1L6CCCM rmAtcvLjVpnytwX2bcw4teGYaAhQiwmwTmUF8S7O8ptc9m03a0IKOM3yjWNQOvbDDVon 3RrNwxW0ze8eMwkYKV2w3DPeDVPzxs1i6c3oSo0sgEc9SpsO++zhbmN6aiQNcrRk1UUu icBilZFtGj7X30rsUDaVKBdOHPRpFS8uYixljkFQ95KxmDM3PlmGtfX4jp0t83YfPRKV EWQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=/mUeepgJ1O9cz8Kl0I6X55iLETdP0NbFcT/ejiaDsQQ=; b=C1YEimXZ5CCMcysAY90tdEFpc2NMl2ep9+AiTzQAqT8VjWIUc4x1wgAlQ45ohecmUf urGi3Dx4cD3YRHCngf8sw7OC2ztcJaaGboGeNEhg5PmhfueujUv39H++tnwPX/kDoGyu MlUaabkjbCC2eomt0v3tABLOn6VipS0EvBFCyMrkAqV0OKX30jLtNMhO9x9rjhvElGWz bhTSrvBC9EkzGbseddRSJAB9Lg+54qjV0i1MZK5LiUwaLn8WIDWu0k13KzNxutIKUst7 ADDhgC64Gb8LJgQvFhQRzScKNr3ddBtEgfC9pXHETaJQX65wqwKwjfC06KI52GUs3whK 2BUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JbRn+7Od; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s68-20020a637747000000b0054ff3f3e675si9761749pgc.648.2023.06.19.00.22.26; Mon, 19 Jun 2023 00:22:41 -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=@linaro.org header.s=google header.b=JbRn+7Od; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229769AbjFSHLh (ORCPT + 99 others); Mon, 19 Jun 2023 03:11:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229657AbjFSHLg (ORCPT ); Mon, 19 Jun 2023 03:11:36 -0400 Received: from mail-yb1-xb2e.google.com (mail-yb1-xb2e.google.com [IPv6:2607:f8b0:4864:20::b2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E41DF4 for ; Mon, 19 Jun 2023 00:11:35 -0700 (PDT) Received: by mail-yb1-xb2e.google.com with SMTP id 3f1490d57ef6-bf3934ee767so891878276.0 for ; Mon, 19 Jun 2023 00:11:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687158694; x=1689750694; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=/mUeepgJ1O9cz8Kl0I6X55iLETdP0NbFcT/ejiaDsQQ=; b=JbRn+7OdF7AufnePj+eplT2mGaIj2u1IwBrwOH6tnkiQ+PZs8GHeMz+PSQgw3KJbFB xLLVUWLWKC5i2olWlGi0A4no/0w434x+iT7QrlYxMTSwpkiEoR1P6OY/rDGxx24DsZk0 eN8/IbplZdrdxgrKBNffqxm5JKSiz9UG9L2y6lR0Pe5yhIbCpionZUJvsDqI9ncqFMmn VHcIp+cHlQdu75zAARyI0bsaRnRk2BQ1G0FUjyVD+gLE+TeieFyYvOYUSmXa+o9Nefx1 wtgpPZNZNam/ViY6NA69hdLRJNfIzoP6N63WH3BYNsThMSwwGjsCrbiZioR+XdYjJ5yI LU+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687158694; x=1689750694; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/mUeepgJ1O9cz8Kl0I6X55iLETdP0NbFcT/ejiaDsQQ=; b=FNe5qEYy0LvpFkAZOVwJ9WbiKmYy2fS7LubbcW/zN3g4b0yvjCn8G00Mt3MLp3oeFh 4J67cutvIho9ESPAU376EaacmOYSkjt0yiz0wd7Vazs+FM2AEvCTwCF4TgAKgdBIR3DK 1Zk+W4txz2yy3RS3bRUWW7jjrSYSDEshkJk+xG97Afx0QZe28zE3IG2tyFbNyr4+kU7W skxrw3zc78RMFbgsAwoY+Yeen/X99jkrgrFK7lqusk0ch8TJXUPk3BFu4uqrEmAuNxiu MsBk/0KzlFqSUFauymsAc06F9f1llTIAI8grqkzFBAY/HYk0iiFLCysW1TvSPGno0aha 1Fgg== X-Gm-Message-State: AC+VfDw4r+pR7Dh3jq4Hhvb/jGW299x2lo2y7RGWruBWS71+w7CPOIed X9ABw+yBdVTtfDk25wqZos17UA517LOOMTAbfOUfvA== X-Received: by 2002:a25:6a43:0:b0:ba8:2a74:155 with SMTP id f64-20020a256a43000000b00ba82a740155mr5461790ybc.32.1687158694570; Mon, 19 Jun 2023 00:11:34 -0700 (PDT) MIME-Version: 1.0 References: <20230417-ux500-sram-v2-0-6e62ad551faa@linaro.org> <20230417-ux500-sram-v2-2-6e62ad551faa@linaro.org> In-Reply-To: From: Linus Walleij Date: Mon, 19 Jun 2023 09:11:23 +0200 Message-ID: Subject: Re: [PATCH v2 2/2] misc: sram: Generate unique names for subpools To: Dmitry Osipenko Cc: Rob Herring , Krzysztof Kozlowski , Arnd Bergmann , Greg Kroah-Hartman , Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Sun, Jun 18, 2023 at 11:33=E2=80=AFPM Dmitry Osipenko = wrote: > > if (!label) > > - label =3D child->name; > > - > > - block->label =3D devm_kstrdup(sram->dev, > > - label, GFP_KERNEL); > > + block->label =3D devm_kasprintf(sram->dev= , GFP_KERNEL, > > + "%s", dev_n= ame(sram->dev)); > > This broke device-trees that have no label property. Which system is affected? Asking so I can inspect the DTS file and figure out how this needs to work. > The SRAM DT binding says: > > " > label: > description: > The name for the reserved partition, if omitted, the label is tak= en > from the node name excluding the unit address. > " > > Not sure whether breakage was on purpose, otherwise doc needs to be > updated or there should be explicit check for the duplicated node names. > > Secondly, AFAICS, the dev_name(sram->dev) is the name of the parent SRAM > device and not of the children sub-nodes, hence it's now always the same > dev_name(sram->dev) for all sub-nodes. Sounds like I should go back to the original approach in patch v1: https://lore.kernel.org/linux-devicetree/20230417-ux500-sram-v1-2-5924988bb= 835@linaro.org/ and also augment the DTS binding text to say it uses the full node name including the address. Does that look OK to you, or will this regress your system as well? Yours, Linus Walleij