Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp136654rdb; Thu, 21 Dec 2023 05:13:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IHlGbx7RrRWxYS8R8OZQIyq9Ursg9MRot/xCwJeybxEjFhiUZQ8K0UxrADcz3aiWCBBg/99 X-Received: by 2002:a17:906:2da:b0:a26:8aeb:c360 with SMTP id 26-20020a17090602da00b00a268aebc360mr1680092ejk.6.1703164390176; Thu, 21 Dec 2023 05:13:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703164390; cv=none; d=google.com; s=arc-20160816; b=GAdFhVpcNBgx0h3SNWRPGKGOiyPXBtlwi2ErYXgJrK/uFyHuL94i6Ri5YB/YamM9oN zHqFIuRSIHm1P3R/+5/3WUblDuqgFQ4q8lvlruOzoG7c3wZxEIjjfRhRDNNDhclcd1AF YEiVFS0rt+DXTDUOPaanvf185Yo+g1B7H5huZALzbwf3CkO4AXiumtzpFIhxEDuQfQic 5jm9HQiIfzDPwGGy5OAoD4e0WwAMVAVHQBBslqxdMUJa0rhCRQpQYcSCa941bdQT7uRn z+j+C/o2ZY0UW1nm89ZqBKuZ2d0dm+u8SnSqjdMio3kZvIfcL2ByixTYfmrwzXQnQnyD QCBg== 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:mail-followup-to :message-id:subject:cc:to:from:date:feedback-id:dkim-signature :dkim-signature; bh=uXnfqe1/rU5Aj6adZ7mG3BFBjzWeNfv+XHLSvTxStnE=; fh=7tCR2OY+o2tzhFP0PdsbGzYyG96Vzu3n/lYSO2E5INs=; b=H/wPIB2KucA2DoU1hoSGbmB24o8byJ0oLoiH+vcKe2+XMZTcD3t5ZrjOKD3mn0IdXd vr6Xl2WYgCpj+8MIfsFC3cXwlATRyIHxV6/JxVNpK+YMtjgI7NRjpkgwKQF4yErEgnnn kHn9akzHkWo3H/hi7xm0/xL25XOkrq6wyqRS74+VuiW9WC15eTpfVDFBuLTlUy12GQ5l eW07AxTeJmcKAOlmW4Y6omKlLjdxuFI8g2aaHvDWj6W+Y2Bsev6GGSBGoOBBYTAVUqF6 Il3QlUsHf76S5o+65AjDvTWYSs6Zae1XbTbh+DMrFpq1CMolxPe1qPOZtyHNrbDMT9Wp nkng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sakamocchi.jp header.s=fm2 header.b="GUnH9Qt/"; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=p7M16dhp; spf=pass (google.com: domain of linux-kernel+bounces-8433-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8433-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sakamocchi.jp Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id oz19-20020a170906cd1300b00a23761cb0bcsi874063ejb.790.2023.12.21.05.13.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 05:13:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8433-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@sakamocchi.jp header.s=fm2 header.b="GUnH9Qt/"; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=p7M16dhp; spf=pass (google.com: domain of linux-kernel+bounces-8433-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8433-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sakamocchi.jp 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 am.mirrors.kernel.org (Postfix) with ESMTPS id E70AD1F24825 for ; Thu, 21 Dec 2023 13:13:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 73035745CE; Thu, 21 Dec 2023 13:12:57 +0000 (UTC) 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" X-Original-To: linux-kernel@vger.kernel.org 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 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