From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (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 111087319B for ; Thu, 21 Dec 2023 13:12:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sakamocchi.jp Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sakamocchi.jp Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b="GUnH9Qt/"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="p7M16dhp" Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 0BAFA5C026A; Thu, 21 Dec 2023 08:12:53 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Thu, 21 Dec 2023 08:12:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakamocchi.jp; h=cc:cc:content-type:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm2; t=1703164373; x= 1703250773; bh=uXnfqe1/rU5Aj6adZ7mG3BFBjzWeNfv+XHLSvTxStnE=; b=G UnH9Qt/FUEQiuy1jgaUF7A+hqkfFqCPgGsoaMkD5JMh3gjjmjoYsGPvDX18PZ4QB p6gyDyhd33voMPf9ri06Fkyet3aG/wtt06N+Q7lewMrv+6tKLlpS6tREuUmlHsi+ x65oQeKjHi2EeLGHUC5SE5KY9xITbCCkmjQki47voqxu02BHQHNTGTGkYzjtauvW Yz708NY4lA2j2v1NxmBJD0sTVXY2rijhYrbBbwFrqjazRL661A2IMuXK/Fq+Cay5 Ev9DeSFS08Phni23dKduuZNNoMF9OfkUW90XypuouVwNPcK11KPPcdxa+G7LNKJQ 18ig3Zt39cuq7NBrdGfKQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1703164373; x=1703250773; bh=uXnfqe1/rU5Aj6adZ7mG3BFBjzWe Nfv+XHLSvTxStnE=; b=p7M16dhp0a4dq8aSnsYzOggQ2rkPmBWvRLD8p4iIYRzV ORQgsO6UyMk0smn+csU7OG+i5SCyMfdS8DdMWBjXUkUcgWWRpt5jjESfHScWkulg zNYiuijuHBldwMMvxz3ZTKja3ki5sfYf7LJ1OTkvJakfDvvZadYuQmLAAv48WZJL nAHXX4+yKxToDU1lupJXQbkPvWH0q1OSHo0PvtRoqAnwaY23rU8q88FMnUJFkRIN H7Zmo5kZvSAdSPPCH8hnyQXrsgQ3ygGtTPKqWfE2X95C9lqDSN8tvKAEz+ZDuLQk sbiWKPTuDbNR0/SXCKroQd/8IFkNmG8EklTU425yqw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdduhedgvdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepvfgrkhgr shhhihcuufgrkhgrmhhothhouceoohdqthgrkhgrshhhihesshgrkhgrmhhotggthhhird hjpheqnecuggftrfgrthhtvghrnhephefhhfettefgkedvieeuffevveeufedtlefhjeei ieetvdelfedtgfefuedukeeunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepohdqthgrkhgrshhhihesshgrkhgrmhhotggthhhirdhjph X-ME-Proxy: Feedback-ID: ie8e14432:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 21 Dec 2023 08:12:51 -0500 (EST) Date: Thu, 21 Dec 2023 22:12:48 +0900 From: Takashi Sakamoto To: Adam Goldman 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: <20231221131248.GA603497@workstation.local> Mail-Followup-To: Adam Goldman , linux1394-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org 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: Hi, On Thu, Dec 21, 2023 at 04:50:08AM -0800, Adam Goldman wrote: > 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. Indeed. The uninitialized value is going to be evaluated. I'll send take 2 patchset later. Thanks Takashi Sakamoto