Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp300835rdb; Tue, 5 Dec 2023 06:02:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IGvdrYKK+agLU3RH7pqTdqwU3ugSWA38Rs8R2drCHtt2qcw6v6RbQdjVxLpr8IFbTDe2c/3 X-Received: by 2002:a17:90a:181:b0:286:6cc1:865f with SMTP id 1-20020a17090a018100b002866cc1865fmr970529pjc.68.1701784933063; Tue, 05 Dec 2023 06:02:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701784933; cv=none; d=google.com; s=arc-20160816; b=PGMJT1nEWgeiiKCtoACKM+PmEsFoueOw0BeQCc8xGNlu7PPuAwlHgH6IqrwirhVTOV hVe+uIvt4tGKm+r7Dhxj0Sk/rtHe9qwyZ0fCyG3armrapzpVYW1DY1E7fMDXp1r/0tsR ZOOERjAXoVVDmvGrF/XL1ETd/hGUrSpC+MVx6DdXmAaJbgnSjLGqRc9stXDkC6k8tuE4 6QUxbO0s45ZHqtaOi8rGtVBOiBMQFzOptIc++mAm0xIS9xvSyvdhmgTbrAlp0RbrLbbv QClnS3eq631bb91NN0BPobdZ26YM269pzH+K4tfLi8bsIZETG5w1Ly2VBlNS4Q3V6VuV SbkA== 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=LGKU/B3Bx2Yzi5OmM9o3RWqdkFzerbywN5kCuPw1/JI=; fh=hEJnYzqeR1imbPiR41x8RP5dR8pLKbQazg6gf1ysPeY=; b=Fby+vQChHR2k49uGolsWmTeN7S+7RHLluLiQa2HgyShicgEkvCLk1UwH9R3cweGpNo tPovwwK6lTcxsZjFuVmmI+kMaj3ofxLwJ3wyR/hOYctts+uZruQWGMMt0RkXL1bmpBnu O4+jJ3MHTH5Lrvp35Bmr8UnfhpEtL+Fw3y6jzr61qAkg5IKxxO8FIkmvne2fUoiL0iFC c3lRi5Hsv5h5l/eXjyz5edhqUFfzrT8H64fwGuFRbFZX36SDK3rEfWGmypWhLn5Zm+L5 MCdGAAjSOnZKE6ZUHFFpNtTRHiMnOH+EHQ5rwXmfjF30h51qrnSjZmky7YL751C4TVdS Z/JA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sCmEypfa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id g15-20020a17090a4b0f00b0027cf3fd376bsi8177953pjh.28.2023.12.05.06.01.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 06:02:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sCmEypfa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (Postfix) with ESMTP id 135718057DB6; Tue, 5 Dec 2023 06:01:22 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345589AbjLEOAy (ORCPT + 99 others); Tue, 5 Dec 2023 09:00:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345588AbjLEOAw (ORCPT ); Tue, 5 Dec 2023 09:00:52 -0500 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 341E71B5 for ; Tue, 5 Dec 2023 06:00:58 -0800 (PST) Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-40c09dfd82aso32489425e9.0 for ; Tue, 05 Dec 2023 06:00:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701784856; x=1702389656; 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=LGKU/B3Bx2Yzi5OmM9o3RWqdkFzerbywN5kCuPw1/JI=; b=sCmEypfaiwsI/7MlDjFhHWwn3V32m/3Hx/MPZZxhrvEKjMtpYrKKiUGe9bjTFBa6X7 O181XHmyK4eT0cQLuGUa0V9f3rdvNxpzVclMy3ommLYSFVxzjcYMOWDPXvs9/H9x5fyH +2XQpr1t+MFJkMHeXuvIy/4FBOixPtz0N8bbB4pm4emW2Xr818ckg8nWwMqsksgCApA4 tLs8ReqCA7bdXXOiRDjvKOgzknyuuwEoCjQsu+1VPMmVzE5yzl+iPwS0d8bARScHlPgg ccSkXfzN60pz058qjwQ//x0oSWPCQvc17/MCI68XPBGLrNdo1kyzrVnJNYWMcnF1oQus Nnbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701784856; x=1702389656; 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=LGKU/B3Bx2Yzi5OmM9o3RWqdkFzerbywN5kCuPw1/JI=; b=Z5lcwtPOQh28JaytiaF1uxSFyfeieQB+kOT4M5u5tAvqokkc8pk7QTvCKprz0+wVxH lA3mq1USwvxdIHpyP+wwtipYd3mbclnrAiatYPp/umR6qHQRMmX1gt6ZoMsmbS5fFH/x W+D6L+wmETBm2ndpUfawXktKoArqQ1v1VFxsDUm9It6CgZnCmq3UIQxX9nICHusmTqNE yBolKSbs+SlBXBZqjtFOQtY7FEcOXqN5sTxHlMVrDHFFcKaD/yZdUdcpMs7Pxmvu3d87 PKsPEhyBWAygAgn6A7iNnICxvf6l/xX4tte0ZCpl/Bgq9rTbSJO/7Yqla47qSoO8p6H4 59Cg== X-Gm-Message-State: AOJu0YxyykaMWU+aN69zX901AQnTUtF4I3BQDq2oOsyDZsAHV4SfznZH kHaeI7uViRMilD9V4tI6yGLzOw== X-Received: by 2002:a05:600c:474a:b0:40b:3d6e:16b7 with SMTP id w10-20020a05600c474a00b0040b3d6e16b7mr536677wmo.33.1701784856266; Tue, 05 Dec 2023 06:00:56 -0800 (PST) Received: from localhost ([102.36.222.112]) by smtp.gmail.com with ESMTPSA id t17-20020a05600c451100b0040b379e8526sm22325954wmo.25.2023.12.05.06.00.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 06:00:55 -0800 (PST) Date: Tue, 5 Dec 2023 17:00:51 +0300 From: Dan Carpenter To: Robert Foss Cc: Sean Paul , 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 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: <170178410677.683894.16036596185582079991.b4-ty@kernel.org> 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 pete.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 (pete.vger.email [0.0.0.0]); Tue, 05 Dec 2023 06:01:22 -0800 (PST) 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. regards, dan carpenter