Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp3261218rdb; Tue, 6 Feb 2024 11:52:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IHFXTVg18Koud2+tGYmyhf+v2tR8uzpp5MuoDgukWPKxv/qO5Kb49kNBxXrhe3TFTPI7ggG X-Received: by 2002:a05:622a:349:b0:42b:fac1:8141 with SMTP id r9-20020a05622a034900b0042bfac18141mr7073455qtw.7.1707249140161; Tue, 06 Feb 2024 11:52:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707249140; cv=pass; d=google.com; s=arc-20160816; b=QobGRYrYzRUmBtWQN/wTq64k2Kw13FKnBbdnxHheRt8N/jTuk9SmwuxRARRswaI++v fE9usoygl8Fzg+hX95Q/1wWm3Je344wyLppSVdaoavnOSV4ydaY4UEat83yZ4IXj7X0i qvcviaq3PgP/Uu2Trkl54BBUH/nrIHqOHq+85J4MMi+vYX9XftQkbRYoLgHHwBfJrfY5 mG005XBSTMa0O5tieXDafSYb5ShtqVtfUiBd5Im9btlOABBnQ67bQQJO6ebbRqcCKHUR oDE+RngENNU3/MlrrsAcQKjnx07PvZeZjxIyPEdcZZY0aOK1Bg/H2sYYha4rBf6xD3or yrQg== ARC-Message-Signature: i=2; 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:dkim-signature; bh=fZx4pRcUc3za8T9n9tUmT3V2JcZVmsY/cAiohlWM/TI=; fh=958DKWaL5jyY1w928tXoDJ5iluh9hL18R1AVET94h5I=; b=PinR6yKjZJikW+ZiUO5ga2v3kE/Cprnu1JTC5N5dX8LO52SsKQVVymsBPA/RmPafCz BekhcuaAPO3s+gXpqGYGFPW5eIGxmwyIETWcLzG7kbdRkjgBGAIVkQAsBXAXWfHTque9 vcSAcoKwo3uOOMbf/6aiY5XLNcRrXbTgFebNJzR0ntmICPtosxkVuFII8qK1c4zZOOd1 2w/VYi30PwTlL4Fra2c/7HSNWVEC/bwHBBbFPUg52hIym5PEaXnu6JjxPUOs2D1A1LAS 4fBxr/J8tSIFJyf8Z+1ZUku0X6isFnTJ4qc53g4HSIoE7NyWQqNYHUC41pXZ+1VQEqX9 s7bA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kz7SoHQc; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-55572-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55572-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCXzCo8aDOcPo8OSbiVkJjWlOeAX0QHQL5psmc4GiBnC70zqJA/hx8PayMXa3hsQF6wcRQMwcfidYrtV03j4LzwI82aHL21QY0zlWGm0aw== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 22-20020ac85916000000b0042bf4242e5esi3035502qty.93.2024.02.06.11.52.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 11:52:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-55572-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kz7SoHQc; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-55572-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55572-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id DD6BA1C213AB for ; Tue, 6 Feb 2024 19:52:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BEBF71B597; Tue, 6 Feb 2024 19:52:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="kz7SoHQc" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 DC0E71AAD3; Tue, 6 Feb 2024 19:52:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707249131; cv=none; b=mfnjZJjrCrCnVoVpjoFcNjCuS1rZbEj0D0mRtbgmTyIOFf/ILqjkyvsNFCcuW5UPa0L0OKr+agkt85UtDRPG66bBa+GjQkvCfEtHA8VD3FetPUNLr8NRie8BPeMMe1GY+owJrTtJEDrf6SXFjOu9WjSzqQchtHbiKl9iQALcPVY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707249131; c=relaxed/simple; bh=fZx4pRcUc3za8T9n9tUmT3V2JcZVmsY/cAiohlWM/TI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=rh2IHYr+37M+it6Ojj0qdymMZzx4SXkpukD3W0DiFe00aVGsj/zIf3BAIlfl+4EwR4MbKU5vP31wj7dz2bm4KEw7TOZELX0JCIU90W2psnXsjckGQ82KK0KbeIqV4cVS7YIdL611obFg2XAovmPhwSs7kexuZ5fJZBbMOKYq7dY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=kz7SoHQc; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id AAFA8C433C7; Tue, 6 Feb 2024 19:52:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707249130; bh=fZx4pRcUc3za8T9n9tUmT3V2JcZVmsY/cAiohlWM/TI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kz7SoHQcZnrQNGofmOvgUq1NYXOKfi78ER9R7f1WE7u6k4TGOgErJiuHTjTMHtkU7 b0C5oOFjSIJyrUYNmL1vsAbCQg3in+MfyxWbWDKULEl5XPQA8FZuc14SJtuVUAXRct 19BbB8vq2Z4PnJOBUbmAkW/657abiTLSsVl3sc4JPJ475XPYjFxxdT8zoSvm6FlFHR 30zWR2Hy8HGTUto8eIH7I75P3KyZfPgI7L0eqNPe4qV5erhqMMBvvWEvyLaGXC9GSH 79YUXyWfieoPmuNt/Rwbx6029yURZl3XV+iJv7P3Y6XkoMQPaEDgcv+EFwajv19GwJ 5zS1nyNj+E4+A== Date: Tue, 6 Feb 2024 20:52:06 +0100 From: Wolfram Sang To: Rand Deeb Cc: Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , openbmc@lists.ozlabs.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, deeb.rand@confident.ru, lvc-project@linuxtesting.org, voskresenski.stanislav@confident.ru Subject: Re: [PATCH] i2c: Remove redundant comparison in npcm_i2c_reg_slave Message-ID: Mail-Followup-To: Wolfram Sang , Rand Deeb , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , openbmc@lists.ozlabs.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, deeb.rand@confident.ru, lvc-project@linuxtesting.org, voskresenski.stanislav@confident.ru References: <20240206194201.10054-1-rand.sec96@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="/c+/7Pm9wtwRPq0h" Content-Disposition: inline In-Reply-To: <20240206194201.10054-1-rand.sec96@gmail.com> --/c+/7Pm9wtwRPq0h Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 06, 2024 at 10:42:01PM +0300, Rand Deeb wrote: > In the npcm_i2c_reg_slave() function, there was a redundant > comparison that checked if 'bus->slave' was null immediately after > assigning it the 'client' value. There were concerns about a > potential null dereference because of `client->adapter`, but > according to Wolfram Sang, "we trusted ourselves here" Therefore, > this comparison is unnecessary. >=20 > Found by Linux Verification Center (linuxtesting.org) with SVACE. >=20 > Signed-off-by: Rand Deeb Reviewed-by: Wolfram Sang --/c+/7Pm9wtwRPq0h Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmXCjeIACgkQFA3kzBSg Kba5Ow//TTSg9C/r5uHjS757qdLJr5CtKt2ZGXCoiBz/JxVUr5V6F2diEjjqizrC p0ixL2q1MDpvF4ZUAgwnI+Ht+e71py3Sto8MlfPRWBchfP/ugE9ehK+RWyOho43x xNlwQqtSOqQG7NtpfOtNSnYHNSYpeD4/giZToeL2mV5d2cXidxYLP1rinoYni4ec ECqS1eLZV+8pxdkd5X3Im7ahFfPb1hkrWr3yajswDxLdIo8ImEuUiVUMoau5cYNp 4ukBDe76MAweDpwMg4EyIoax2AYRl2ULub227IH5usbOZ1gTIZvH3DeLd5CMrhFx kvqElCljKdAWfIxytJvTmThl4rMmdxo0/Sa1k9Jv3Rzhu9V6tTdm+WrG7pst5Fjc 9wlwgfUsbMCMMGc3QAlP7WfG9g4w4MwUCZZ9DI2gdHQTz9//y41fvAz2TAXz2MBK ka7UHwGziX1bhomFJO4jin5mKlPceC0TvEefn2zh0pMTSL7puN3S4yYp45x9cKkQ cl7iRX2+Na582dlJJWq3YZRBFTzGgTup0vrKPZ+lOG0esgJjOQ73oJoq8YC9qlD9 8gCbxtYMqWvzM3vdyRpL/z0YqDjgfd/3IDgchMP3IhX2w5b3aAahj2Cnr8SdQrfV vM64XBVkntSTZpWDWGAaYPbB4eeLtLhz7RTexwSAMPJxMn65uNw= =Z6/z -----END PGP SIGNATURE----- --/c+/7Pm9wtwRPq0h--