From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 99C8FC433DB for ; Thu, 25 Feb 2021 18:35:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5560A64F21 for ; Thu, 25 Feb 2021 18:35:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233745AbhBYSfK (ORCPT ); Thu, 25 Feb 2021 13:35:10 -0500 Received: from mail.kernel.org ([198.145.29.99]:32818 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233001AbhBYSdj (ORCPT ); Thu, 25 Feb 2021 13:33:39 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id BAF9264E6C; Thu, 25 Feb 2021 18:32:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614277977; bh=xS7BokRCnvo+IUBPGbI29u2JxzgJKfwVlb4wE8bep3w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JNnz9zloyY5bF4PZ66NsEXroR79NrDtxlBG78Ry242ERkfTx9K5oUKrdWCPYmih28 QmZCWSwB8cveWWZpJjKtXOMxQAHdTLmBjAZ5mlIxebTyC5VSCqixe25arttFNdVX50 ExQpXQxvrIPOnAcWN/jWjSLb06TaT42EXSY9lfTEyHcbOEZYqOMrpkzUMTM9Fd46ec 6ojCEC8BC9WU3W6bOfau0MXhLlvFxF7n/d0JJ7UP0Z8xn7QziQCPTnCW3hka/EgJFh bu0TgopDXCq73cT2p0LPXC9yF+enm3u7FBvKMjqUdORy2WhRuwIILrHiLcUqw03PEs ah0EanLPIU2Mg== Date: Thu, 25 Feb 2021 19:31:55 +0100 From: Wolfram Sang To: Maxime Ripard Cc: Kamal Dasu , Florian Fainelli , bcm-kernel-feedback-list@broadcom.com, linux-i2c@vger.kernel.org, Dave Stevenson Subject: Re: [PATCH] i2c: brcmstb: Fix brcmstd_send_i2c_cmd condition Message-ID: <20210225183155.GA3072@kunai> Mail-Followup-To: Wolfram Sang , Maxime Ripard , Kamal Dasu , Florian Fainelli , bcm-kernel-feedback-list@broadcom.com, linux-i2c@vger.kernel.org, Dave Stevenson References: <20210225161101.1856192-1-maxime@cerno.tech> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="KsGdsel6WgEHnImy" Content-Disposition: inline In-Reply-To: <20210225161101.1856192-1-maxime@cerno.tech> Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org --KsGdsel6WgEHnImy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Feb 25, 2021 at 05:11:01PM +0100, Maxime Ripard wrote: > The brcmstb_send_i2c_cmd currently has a condition that is (CMD_RD || > CMD_WR) which always evaluates to true, while the obvious fix is to test > whether the cmd variable passed as parameter holds one of these two > values. >=20 > Reported-by: Dave Stevenson > Signed-off-by: Maxime Ripard I got a feeling of deja vu... =2E.. and, in deed, I already fixed this, too, one year ago: http://patchwork.ozlabs.org/project/linux-i2c/patch/20200426081211.10876-1-= wsa+renesas@sang-engineering.com/ Dunno why it never appeared in a pull request :( I'll pick this one, now! --KsGdsel6WgEHnImy Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmA37RYACgkQFA3kzBSg KbYv5Q/+Nuebrs8L6NUzrEcijfMOYa3lDJluGtrp0M/KcTptEK+nL0TVl88t2IQm p0Nyn2MdJc6x7Lwt07FUcgm3JTC8ofw8Aqavezin+go+/xE7mbx9/GY9rIO9axxN krJSfTBVjduxoIhEBOwCknF0mR6rsAFzm0Qjh4uPPvBuaPnuEuWmweO2+fnNKqc5 hSDFp3yUno3Sxo93aInlFe2JkZPzRstwhoRM4ZfuuU6If2AZS78AxaQtX66/n5MV G5OPduiW3yzw/OtnROyKUbWqqot2ph2VbyRR6vN4ajCUg4EAQZ/jB8yvvGy74vcj m0NdVW1RUe3vxVX33Ng3mUpVH4AajrdChj1BjC1TgLdN6IHr6danY6HNieL+9ssH LmNvspBHQsWG+suDk6sMX87WZdVLGg1Pg8WgnHzu3am7YLVN3TP4YXuB5/LLQy9H NyQNrOuggyN5JkxvM2IQOpe2vIaWxbSHfi7MOm60DE+Dk7YFwLJ+9vqKer8M4E7x Xhf8rPDBIJGKovsQXLVYr+K3jL+K46/HXURiLZxMjUp7meR2MB3wbKQ0RBAt3HT2 Zj8N+SbALH7pd7gdixANPOnXq5BQO5erHxx50vfn9NMIpbs3Ll8qI/vrClqgzy4a vY7jNI/nyC7vF9Pa4g2w0guLgm6XiUcvo/9Ftjk4A+ZQ3aeUmIs= =p2bg -----END PGP SIGNATURE----- --KsGdsel6WgEHnImy--