Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp307593rdb; Tue, 5 Dec 2023 06:09:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IFiuoVEbCg98YhhPcBrLazEGu/dsyItjDEv9nOWT5+G4Tl0yBYiQlbAJq6bvi0FT1XB+EB0 X-Received: by 2002:a05:6a00:6c95:b0:6ce:10ed:7754 with SMTP id jc21-20020a056a006c9500b006ce10ed7754mr1476242pfb.31.1701785394937; Tue, 05 Dec 2023 06:09:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701785394; cv=none; d=google.com; s=arc-20160816; b=WIMGpmI7gIsMIU2PKCn4t9LOSzVX0FvwgPMyqhhNncZWNK2wjKZryPueUBZVSk5Q+z N5RyJYbtUWOeg7/mbFegP4rI1wRmzYT3klPtuOPyAb1iD7BpzJ1l+wyprI5JSlhhZEST sRI7jcvkCurgZ7tKOI+dbjpTFelo9QWHT44SOGrezOqWXmhLBBxyG02Zv7+McwHR9dEp YZssyoR32T4+427FlIQeMr/hjvMQzbCirXfrOLlu8cdHZ6ESt3mbiVKHJZ3CkqIkGRmC CraaGqPL2V2GYggYbxojVgJO6BEPkS+WInOlrJXLAoITy/Qk38jpUdfJrcf69bLujW6w Q4ZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=OetAMAddY0Kvgc03SJD9zPupbx1ViU/NeH7cMTkTAv4=; fh=elFSyx/6+HY4HoagQBSu8LgBq+XXq6JULKXRCzgGgjU=; b=bd0f5b1m673RAUY5GzokCpzw38jePdCuCVUDgsJZjtYp1PNxRRPXM48n7/GeAyE49T w9ey3Bj/ZRdLKkTnmk8A37D7EBiwTibR1Hot6LzX7ETRTxGbWPx+GG0GxFug8PCLbiwL nKd9aVdSfCmit2QeMNcMAqFlZ0t/avHvyc9j/2rHA4YzuFRrhJ0vuDIEZ/TtXZzSAEaD KzZXOc6C+LRU3DIxtQHb6dj08Lg313skKhmuZLDtwM/VJ3IlpKq48iSalc+4x1hxdgHn sKvH0cwGpwNkuLBQ6Y/jy0x0blbSnDk6bHXnJq9fTNUOT855SKZ0JoJnwx4qPehYd0FJ WVNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=l5T9Nfv3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id d7-20020a056a00244700b006cbb7e5e06fsi1255024pfj.125.2023.12.05.06.09.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 06:09:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=l5T9Nfv3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 0A23980E6C74; Tue, 5 Dec 2023 06:09:52 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345587AbjLEOJi (ORCPT + 99 others); Tue, 5 Dec 2023 09:09:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345612AbjLEOJh (ORCPT ); Tue, 5 Dec 2023 09:09:37 -0500 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F5B019B for ; Tue, 5 Dec 2023 06:09:43 -0800 (PST) Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-40c0e7b8a9bso22131005e9.3 for ; Tue, 05 Dec 2023 06:09:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701785382; x=1702390182; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=OetAMAddY0Kvgc03SJD9zPupbx1ViU/NeH7cMTkTAv4=; b=l5T9Nfv3iRwkKCx4KyQSelsHvaWPsBV5tTsZVSZ3kQKn7/Fk9IGfELxNSrCilcvYHU vDNdZSZNnZyAnmb2xSQG8AnkXvJzeDRidkuIrZAfyMDY6uGrad0mdGGW0fBRMFdN7DAk aYBQJBM3ZLsbzSE4Lhzak9ocWKT6xrYCldt2Q01EW7iyhjK2iylxzeB3Mp7Qi/um7Mgy y+OuNuA8yKNjUX/z3N1fcW3R3lySN/q0iEUyEV0F4tFoc+nNyiOPDFkR9BV2IsY/IOY8 d3HldDjv2q+zLwEDwqY5RE0bckR4/amoNpvOwskmd36wXrqOSifbl3u5q1eW/DPKCb4T OSBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701785382; x=1702390182; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=OetAMAddY0Kvgc03SJD9zPupbx1ViU/NeH7cMTkTAv4=; b=pABBzeidsJTkxaXdTDH9czgqeh0srweQBBTLa16kNefQPosfNQ82Vh2xVJT8FAL52x vWkh5VM+4W18gSVWmjf+oRiuiCpW8Pm5Dcr39qHIvCg7YynERPdVaKVBHopRtmpizSJL 2acaI3JGiPcWR5377416IL/+QXvRSCja9GHZgrXXcXnmJ/1WNJyndRMxHIMl56VLPmC8 fXHGQJBinqLIUatrzRZEZFpW3lPP7xnlZDnAdkOHL3ycuOPSapM23sVnmZhucdwc+U5Y mY51UzJKHarfKKNj5IIfSbj1beg+msF07V9RsKb7rFz3ecz9fNhED3BTM7DRg+C9M1rY 3Kog== X-Gm-Message-State: AOJu0YzkqJIW6lTIgL1r6nIUp3vVwZkB8ZvbJ4amNg1Wzf+QLxkUcSpi dhTnGfT5SHMoFIaodBeMS/s+CA== X-Received: by 2002:a05:600c:1c22:b0:40b:5e21:dd15 with SMTP id j34-20020a05600c1c2200b0040b5e21dd15mr569098wms.67.1701785381922; Tue, 05 Dec 2023 06:09:41 -0800 (PST) Received: from localhost ([102.36.222.112]) by smtp.gmail.com with ESMTPSA id t19-20020a05600c451300b0040a3f9862e3sm632489wmo.1.2023.12.05.06.09.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 06:09:41 -0800 (PST) Date: Tue, 5 Dec 2023 17:09:38 +0300 From: Dan Carpenter To: Robert Foss Cc: Sean Paul , LKML , 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 Subject: Re: [PATCH] drm/bridge: nxp-ptn3460: fix i2c_master_send() error checking Message-ID: References: <0cdc2dce-ca89-451a-9774-1482ab2f4762@moroto.mountain> <170178410677.683894.16036596185582079991.b4-ty@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email 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 (morse.vger.email [0.0.0.0]); Tue, 05 Dec 2023 06:09:52 -0800 (PST) On Tue, Dec 05, 2023 at 03:04:49PM +0100, Robert Foss wrote: > On Tue, Dec 5, 2023, 15:01 Dan Carpenter wrote: > > > On Tue, Dec 05, 2023 at 02:48:26PM +0100, Robert Foss wrote: > > > 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 > > > > > > > Wait. That was unexpected. Neil's review comments were correct. I was > > planning to send a v2 patch which was just a cleanup. > > > > Sorry Dan, I was too quick on the draw. Can you send a fixup and I'll apply > it too? > Sure. I will do that. regards, dan carpenter