Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp7491094rwd; Tue, 20 Jun 2023 01:52:11 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ75ssT89ArjtA6MhwJ34mjr4kcY1CJV/WP3wZ6jZYXaWZt0goL/q/6l57seqddAAUwfVjW6 X-Received: by 2002:a05:6808:2014:b0:398:5893:f0c5 with SMTP id q20-20020a056808201400b003985893f0c5mr12675358oiw.37.1687251131082; Tue, 20 Jun 2023 01:52:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687251131; cv=none; d=google.com; s=arc-20160816; b=aq7CfITane+Ddchwf1fpTWDpCRxlIuYmTD3mfrhUm1a6nSb2KMRLP/4gSGeMKKMTXx 4RpzZh3iiBdgpPZbmynqB53nCUcSgF3SAowTiBZm9X7ACvgPKOITRUaRDMn6azS4ph9X UHCmRtZXHlqNWDEICcrulh8D2IUtK+IKE3GL7n252ZkfN9Q/8XC8co7sG9B2T+b0vKkR Rt0HY25Yp+eHRb1w9WxLQseuvONkTn+gD8e+E07UnK6qcI7WTcxVJXk1p9mMh0DG7kl8 tFFE+Qg9gJ32acgr37Iky3lp/l2OC/ZMJTMCh8EziQxBx8dms/vPsnKwepDBAH1YfjwM s4ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=oSwcddgL+qqUejqCx92zoa7QNLnR9PVFOH6496qT1bw=; b=jepfFX5nIc4M2rGnW6Elroc4J6ZGlupnEmOcPBhN5EZrkZMemkwkoY97sRaHRHKfAk e+ske4DXVYAMGnSmLSpUnA1r++yBYJl1p7l6Cq0eiE7Rq3G4xT4QqfdG+R6LhMbbCKgb W3J59HRrN6My63aAfQpcgCg4nvZJkYrU1sLCTYj1fovAvA1h25L2BAgcVXZsfiVUT+Mo WiAxpCBbEzOLFRiSV+TqmfBlejDpcsIWURnpBNfyvWLyCXGDEbWYhffqOV2vyehOdLQb M8SmA4itctWQpLjkxLHIUaoCa3Q/woKFjw7B+OUV77rJfGUFlcggmMcGDKxxkV6sbZ5h NwCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=ldU4s8X0; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v18-20020a17090ae99200b00259b2f52633si1468555pjy.166.2023.06.20.01.51.59; Tue, 20 Jun 2023 01:52:11 -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=@gmail.com header.s=20221208 header.b=ldU4s8X0; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231876AbjFTIXx (ORCPT + 99 others); Tue, 20 Jun 2023 04:23:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229683AbjFTIXw (ORCPT ); Tue, 20 Jun 2023 04:23:52 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C89DDD; Tue, 20 Jun 2023 01:23:50 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-4f866a3d8e4so3778093e87.0; Tue, 20 Jun 2023 01:23:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687249427; x=1689841427; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=oSwcddgL+qqUejqCx92zoa7QNLnR9PVFOH6496qT1bw=; b=ldU4s8X0AvhotU7qiojJNp+Zyd5E/gkMCSAC5LGEWmGIEFUzYY5v+Cvc/Z2h5lQJQ/ 5AIWdvY58f2TEDyyIyC5BdS+Gi2dyam95EHa87vlUmJyK0FkWnFhRZqT/XqzBB6XbcC2 7S6f2C68/MpmjNiT6z/5TLkAoU4uF+Sk22TlT2u9b0B85dOT0R58eBu4TWtCpYVLfQyD SY8OwSXxoMjDDbn+vvyZo5bbo0wndOMDx0N2rM9eelbNGuZ46IMgpwsF2APvJR0Go218 B2R7vx2SWb9qDi5huSwrk13Su/Pja43HqfmY9o+2vY8Su27BRtu07y+gvjrNjjrTJvfe ikBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687249427; x=1689841427; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=oSwcddgL+qqUejqCx92zoa7QNLnR9PVFOH6496qT1bw=; b=gTa0QX1GG+xon6YOQ4pwWcx8Xt7GeJHh66CB7ickcw3mBFl64EIz7Hxs7mdFOx38jd O5SHRJTZRGaHB9r1Bn0KBSmf5nE3+7vdAS9FwYj3p4PPAaf5nXqHFymhJzAMwEtT6JDc O40ZWYR76gVO6qk/+PHKhO4yrbOmUShry3sTWBvdXoeIFDuKTVbnFjuOJI3mxUM8veXH kqG8lH5aWGEVZRw05lzN8c65ossmOvqxJwFtruhh9oS9nixCvG3MAmbiZ1qoQi0E37Fz xrS+sjvHVbKSETSrYenOnxgpP9RQFKq0tnBaGwZqmQUJ3wAdwu/D/2G+scvuFNzfsKoA Jp0g== X-Gm-Message-State: AC+VfDzF7UJgLBbzYx9nnXLVkQZR+0fD3yRj6lcdMehZ/8BU4csdtkua TAi+HqeMhzPHuhvNZ1UP916AbpkmU5E= X-Received: by 2002:a19:e001:0:b0:4f8:66e1:14e8 with SMTP id x1-20020a19e001000000b004f866e114e8mr4675950lfg.69.1687249426418; Tue, 20 Jun 2023 01:23:46 -0700 (PDT) Received: from [192.168.2.145] (109-252-154-132.dynamic.spd-mgts.ru. [109.252.154.132]) by smtp.googlemail.com with ESMTPSA id w5-20020ac254a5000000b004f3b319ed4bsm270518lfk.120.2023.06.20.01.23.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Jun 2023 01:23:45 -0700 (PDT) Message-ID: Date: Tue, 20 Jun 2023 11:23:41 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: [PATCH v2 2/2] misc: sram: Generate unique names for subpools To: Linus Walleij Cc: Rob Herring , Krzysztof Kozlowski , Arnd Bergmann , Greg Kroah-Hartman , Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230417-ux500-sram-v2-0-6e62ad551faa@linaro.org> <20230417-ux500-sram-v2-2-6e62ad551faa@linaro.org> Content-Language: en-US From: Dmitry Osipenko In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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 19.06.2023 10:11, Linus Walleij пишет: > On Sun, Jun 18, 2023 at 11:33 PM Dmitry Osipenko wrote: > >>> if (!label) >>> - label = child->name; >>> - >>> - block->label = devm_kstrdup(sram->dev, >>> - label, GFP_KERNEL); >>> + block->label = devm_kasprintf(sram->dev, GFP_KERNEL, >>> + "%s", dev_name(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. NVIDIA Tegra2/3 video decoder driver fails to probe with this change. https://elixir.bootlin.com/linux/latest/source/drivers/media/platform/nvidia/tegra-vde/vde.c#L312 https://elixir.bootlin.com/linux/latest/source/arch/arm/boot/dts/tegra20.dtsi#L347 >> The SRAM DT binding says: >> >> " >> label: >> description: >> The name for the reserved partition, if omitted, the label is taken >> 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-5924988bb835@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? That may work, but then seems you'll also need to update of_gen_pool_get() to use np_pool->full_name instead of np_pool->name. https://elixir.bootlin.com/linux/latest/source/lib/genalloc.c#L898