Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp115405rdb; Thu, 21 Dec 2023 04:37:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IGFee+2BhDIMiSc8DrmDnj1+e6cUDTqnOMrLTjAijVx0SDmzUMzs9xlQAc25yUt5khciyPH X-Received: by 2002:a05:6e02:164b:b0:35f:c367:62b1 with SMTP id v11-20020a056e02164b00b0035fc36762b1mr5735113ilu.24.1703162221221; Thu, 21 Dec 2023 04:37:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703162221; cv=none; d=google.com; s=arc-20160816; b=zGSvA9XoPIn/0Lxdk3u6yzAGOWiHq2AkMyazv/sZXi4JiQK7UVgBd70KfOQWzpiks4 qDY4+CAPbvxEHwddaF5Xrsc+365loVrMGsOW7R0n0IUXR/RaoA59ThKQtq1B7hJmjc4k dI4YN+QgDVT6x4dJIBIi4y9eQ9DkbHCVHPyspxCs1YvilGp4nkCZt9wysOgxeFsmaRoY tGScaaRsV7178TYWQWD/Kk5g5vitk71FaMfRSdeRZvFxo81TusYuoZ1OmMlkGTm42/tR 6pixNP8bZw4X3PX78u/iZnDsv/HgRZH4css0TCOMUpaw6PhFC5YmYR3Y2u9Y2h3vtnQb 6OYA== 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=5tNkEhtmwV+9V6OaOt7rguqa90ubyJVRD5LNpGPp6oY=; fh=FUVbyeoeMCRuVASjKZRlZMOsivR2fvypT++W9fHJd9A=; b=t6JpYSFiWbC8xWls0vyGN5LRgfVxjbV2yoyquARHdNlr9xJCA4jk1O1zucw3JybvR1 AAblXW/iEdHlBpVQbqabNhmHZtuxkkGoJhU4ViAS/GnBLFmy9Rh8CwHQnfBatfiaUIIh vJQsC3yhi8MafGYa5LcsptlIDYfpJv0wUuhSyYJSFvSY8wlOYf0mrk2U3tNkFO5F0CVY 32adUn3WVS+wFHxJV33oilNoxLmqqA1dgqElCXfV04RBqZEK+DlQjaol+ZDqrDmiekpY 0zANcNTXuNL3nKTsPJHn0rXAtLL6PX6OQkm9+cE4J++x68gzroacJO/oYiNx4pq0+4Fz iXbg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-8351-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8351-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 t5-20020a6564c5000000b005cdd7fff951si1481907pgv.132.2023.12.21.04.37.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 04:37:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8351-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-8351-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8351-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 D8D5A282678 for ; Thu, 21 Dec 2023 12:37:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 168656EB4F; Thu, 21 Dec 2023 12:36:55 +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 482DF1DDE3 for ; Thu, 21 Dec 2023 12:36:53 +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 B64761A163A; Thu, 21 Dec 2023 07:36:45 -0500 (EST) Date: Thu, 21 Dec 2023 04:50:08 -0800 From: Adam Goldman To: Takashi Sakamoto Cc: linux1394-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: Re: [PATCH 7/8] firewire: core: detect model name for legacy layout of configuration ROM Message-ID: References: <20231220041806.39816-1-o-takashi@sakamocchi.jp> <20231220041806.39816-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: <20231220041806.39816-8-o-takashi@sakamocchi.jp> Hi, > - ret = fw_csr_string(dir, attr->key, buf, bufsize); > + for (i = 0; i < ARRAY_SIZE(directories) && !!directories[i]; ++i) { > + int result = fw_csr_string(directories[i], attr->key, buf, bufsize); > + // Detected. > + if (result >= 0) > + ret = result; > + } > > if (ret >= 0) { ret is an automatic variable with no initializer. Unless you initialize it (to -ENOENT), this is UB. -- Adam