Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp292586rdb; Tue, 5 Dec 2023 05:48:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IH265IFX9lMVPtadlA3CS8GLBb/DSASIOiW3LJt+aTep5xzvg99zOVaToSEai0fGHLw/ixi X-Received: by 2002:a17:902:74c2:b0:1d0:5878:d4f4 with SMTP id f2-20020a17090274c200b001d05878d4f4mr2639905plt.5.1701784117361; Tue, 05 Dec 2023 05:48:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701784117; cv=none; d=google.com; s=arc-20160816; b=t1kjJPSJm33xP5ql4+K30I7bE2UoRW3mI+HhT0Eq5NhUQp9UpMxbyKCn2n8nBJVszL RaaBmfDUMZbAJgtJKHurVGy7tmaC0AXNmEhECfjyJ4Hl38a4rkrlHaScRDBwIYkpFijO lONywiLGmgct7hpYmOOgROOhTROGDJoJd06WX6vnNrVJKS7ClACDReKcJHpSYQxxwoVh dGV7EvXStzADYC6sjN1FzXtAFR/e0c6Yez9bBeVA3R2IgpmILnU08FSEJH3twNIyVJ7I 2cmOSnF2BuCH5leFieFpHIOcq5U00yQAwU59gAGxHRvS92b3M4KoC6cYoTC2p/jP9/89 bdvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version:date :message-id:subject:references:in-reply-to:cc:to:from:dkim-signature; bh=CerL2sGKfZfNeFIhctxG9mGKAS3BW94kJxR84KgFozI=; fh=nHM8y2QlaqKH6e1Z1t3X2TzCPk6O0+NpHvX/vmIEAW0=; b=0+PIdE/Jox1DSiE1+yHjnY/5GOQ40FRGt3kMEEvnKpUnbweGrWERWdKqGEJLEhKQiX tDZ8KWROmY4PfEID8Exr31pIUg4ZhoZ4yLKcECWeWBFyyMRb2u+mpMYxVMgsmVEFc5X0 gPKcUVXHr4TLZ0hSiwvzk/cOJQA1TOcpWMBTuB90zo89xGLHuud4qtvHsHf8F2UMZMrC ZGoY1UMAXfxG4jB6ZsE+d5rHvbFl+EV8ChwayAObcXHI/XrW7B13mPugUCmojEDY7RZQ e2xk0oikQ0lfc/KjChX3INp+Kov7tT1Ymc417yRzf6Np4nvdX2VyiWpEXkf3l0bWKPQQ pKWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GQvVSKLj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id iy13-20020a170903130d00b001cfb834d371si6174037plb.113.2023.12.05.05.48.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 05:48:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GQvVSKLj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 0734680C5F98; Tue, 5 Dec 2023 05:48:36 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345482AbjLENsZ (ORCPT + 99 others); Tue, 5 Dec 2023 08:48:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345418AbjLENsY (ORCPT ); Tue, 5 Dec 2023 08:48:24 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE253B2 for ; Tue, 5 Dec 2023 05:48:30 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1779DC433C9; Tue, 5 Dec 2023 13:48:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701784110; bh=jn888q/UcAkBrUFljQzymmIT9/ky6nNuCImiG8NUxw4=; h=From:To:Cc:In-Reply-To:References:Subject:Date:From; b=GQvVSKLjKBczB0uOh0OW9Ho7OYyhpyloy3cVfG8zhaolDFmLX7LptpKD1mG7K6jl9 i2V1rzh5xoX+kaFCN+OxTWpir/A74TGXRBxW2e3sEOYh2h0zScP4CUJqtEOUkIzUq5 2HyxmDb1BZj2HOsNmh59Uv506WC0rS2QuSVWtdn3g2UUZqr4zNVSaSV6PLQV/OXVOd Y06UqvN4UTjlFumukuqOt/irhEWxu6+AqSQEOl01ifo1oaPWmbj8Z/43jV9NUxzmTh SNskKpdNHuk3Lpkv45hVE413iKmakzcVKQFL+NrmhK9slFaxxe7Z6FEd+oHnuzw/0u T8htWUK03Qgfg== From: Robert Foss To: Sean Paul , Dan Carpenter Cc: linux-kernel@vger.kernel.org, Jonas Karlman , Inki Dae , Andrzej Hajda , kernel-janitors@vger.kernel.org, Jernej Skrabec , Laurent Pinchart , Daniel Vetter , David Airlie , Maxime Ripard , Neil Armstrong , dri-devel@lists.freedesktop.org, Thomas Zimmermann , Maarten Lankhorst In-Reply-To: <0cdc2dce-ca89-451a-9774-1482ab2f4762@moroto.mountain> References: <0cdc2dce-ca89-451a-9774-1482ab2f4762@moroto.mountain> Subject: Re: [PATCH] drm/bridge: nxp-ptn3460: fix i2c_master_send() error checking Message-Id: <170178410677.683894.16036596185582079991.b4-ty@kernel.org> Date: Tue, 05 Dec 2023 14:48:26 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailer: b4 0.10.1 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 05 Dec 2023 05:48:36 -0800 (PST) On Mon, 4 Dec 2023 15:29:00 +0300, Dan Carpenter wrote: > The i2c_master_send/recv() functions return negative error codes or the > number of bytes that were able to be sent/received. This code has > two problems. 1) Instead of checking if all the bytes were sent or > received, it checks that at least one byte was sent or received. > 2) If there was a partial send/receive then we should return a negative > error code but this code returns success. > > [...] Applied, thanks! [1/1] drm/bridge: nxp-ptn3460: fix i2c_master_send() error checking https://cgit.freedesktop.org/drm/drm-misc/commit/?id=914437992876 Rob