Received: by 2002:ac8:6d01:0:b0:423:7e07:f8e4 with SMTP id o1csp6634270qtt; Mon, 18 Dec 2023 02:12:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IF3L1lYdIPZ56WH7EuPOPQWaJwllMn/iahaiehOd9eaIVnIStmFiH9dBEyx8BMIzfbtbcAc X-Received: by 2002:a05:6300:8084:b0:194:134e:baf7 with SMTP id ap4-20020a056300808400b00194134ebaf7mr4088628pzc.112.1702894350549; Mon, 18 Dec 2023 02:12:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702894350; cv=none; d=google.com; s=arc-20160816; b=X53c4dg7fR8PtnCcFCyF+0nzwVaCpmrxfTXairJTNxvFis4ySSmyjnwVnLin7qgQ7a 5Csuwpp//HX9X6IQ7tRkmcaFo0Qm7Tv19KetbSm1w1mFzydt1PiqLUKEIRmkmY3SwN7z 1wOmCpJdTdIBYA850F8BJhbt+2x5IkaAkcVBNUY6Rb+ysc3E/GVTnqksw60tC0GEpUfY Vd8vckRWwJ/u1Jc5a2lm+a9dN12KIVBJgTSXd8Shz0xrcDrh8+SDwSmqQhHLs82Pm7Ay UfhKA8VaYsI+HIk2/a68stYgQenrwoF/M7MSDBH3iPBNVgdLavKqgzy7WQt1fELZ/V+Q 9s3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=q2lm1fXis5w/FF1QWhmYscTrZTgtcp590oYSm3C5WVk=; fh=FUVbyeoeMCRuVASjKZRlZMOsivR2fvypT++W9fHJd9A=; b=oLPoyVF4hugwxxSjGIDtMMuvgTLwqbFKVT2o8rpXkQy0VA8XCjmmexFzv84kwSCaOm cvdpCbyFLDT5xJTXrrSb5iEZJV7qrBEwjjyhE060yBTeqGisDuRGq7vNKSlREh57KLv+ 3+6N5RYxmhD/xlRzHOK+q/CTwaLOuhi10Ps3hqfOcP1z8koIcYEDFtdzA2QVpjkczaxi N+xYQrA6virLvVeGDb6tOGxw4EJftoELde0QjBAjBIWuDPhELZ+wwcMsFrlDAGSYAAOg p1BAeKR7zqKS9vMDRd5Vq9qgxnpaxXBVU+yTpjPYZJb/c66Xq6w9muTSX7g14fWCgYpn 3UIA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-3301-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-3301-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=pobox.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d16-20020aa78e50000000b006d266bfc504si6921749pfr.88.2023.12.18.02.12.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 02:12:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-3301-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-3301-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-3301-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=pobox.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 4302A282F25 for ; Mon, 18 Dec 2023 10:12:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0108614F82; Mon, 18 Dec 2023 10:12:25 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from relay05.pair.com (relay05.pair.com [216.92.24.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 12E4014F7D for ; Mon, 18 Dec 2023 10:12:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=pobox.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=pobox.com Received: from iguana.lan (99-122-168-208.lightspeed.irvnca.sbcglobal.net [99.122.168.208]) by relay05.pair.com (Postfix) with ESMTP id B52AB1A1929; Mon, 18 Dec 2023 05:04:54 -0500 (EST) Date: Mon, 18 Dec 2023 02:04:52 -0800 From: Adam Goldman To: Takashi Sakamoto Cc: linux1394-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 7/8] firewire: core: detect model name for legacy layout of configuration ROM Message-ID: References: <20231217103012.41273-1-o-takashi@sakamocchi.jp> <20231217103012.41273-8-o-takashi@sakamocchi.jp> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231217103012.41273-8-o-takashi@sakamocchi.jp> Hi, On Sun, Dec 17, 2023 at 07:30:10PM +0900, Takashi Sakamoto wrote: > - ret = fw_csr_string(dir, attr->key, buf, bufsize); > + for (i = 0; i < ARRAY_SIZE(directories) && directories[i]; ++i) > + ret = fw_csr_string(directories[i], attr->key, buf, bufsize); I believe this is incorrect. If the attribute is in the first directory searched, the loop will continue. The second loop iteration will set ret to -ENOENT because the attribute isn't in the second directory. Then show_text_leaf will return -ENOENT even though the attribute existed. -- Adam