From patchwork Tue Dec 26 15:46:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 758378 Delivered-To: patch@linaro.org Received: by 2002:a5d:67c6:0:b0:336:6142:bf13 with SMTP id n6csp3131615wrw; Tue, 26 Dec 2023 07:48:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IG0SeGx0AY7boJs8vZgLJ0GhF6sVQgEjp8IXFVF/HRSADawfKxNPHtci8i2VPYmtFbkIqJC X-Received: by 2002:a05:600c:748:b0:40c:35fd:be08 with SMTP id j8-20020a05600c074800b0040c35fdbe08mr2731098wmn.122.1703605736989; Tue, 26 Dec 2023 07:48:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703605736; cv=none; d=google.com; s=arc-20160816; b=FUPCKBjDPqr8XMKGSUS9pkq2wZVPLqtyP+SPeJtGBZguH7lCMbcExeQa/xO8fYqTg4 4pbDGaw4Qm8Nz+XPCgMAdCDizVpiH8SpBSxSgtaJgjl7khyQhXbIbndHksDvzTxbbx6V dtF4+wx78krhGjMmVAC72ImWddM5Lr7qfSVYptuDsKvAvnxXTQX/61fVcfaRiGFshH+o wsj+vPiPoBS8WStgPuRXSJNBLUl96hlfZdym9vg59Xk6q5tq2Wa831QrDln3YyTo6Zum wqLsTidTZ3qMJds42ZPcgOwWTqBtTirIA1DYgoy53Io1IjRDNGkusDsL6+eHIJvv8rfg tAug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=bTm8Qd5DwjmGgajInF0kr8Xif9qyGlQgw/tpF6k1o9Y=; fh=al8TO5kxNSCLdK6Wct4/S1Ky9QCKGaknFfrx/Rr/20U=; b=qAsgyQ/bSv03e7QtAhW8G5xMkx2SP4684MpstAlDP1AnucSKXXxJdMzxdfHeRdWy1V x4/sLGJ0iTGt0vjNk4bndcvq6Nkr5tpEXOtqHx56DWPofIdGHeV6RZNHI+HcZNSIxvl8 if/8yUyg1G8nG5H8bsm55GPZXCCUldKM7GaJcp2zxuGTI/+uwXd54Cp9vLz3xt1qh1n4 7qxbykvV7wBqe6rRLmLFFFFGY8GHSGdyYUU2GGI5Z3RfYTwuBvJglGehnR4KJ5uHsFD8 ZUkIuYDO3G+OLPsrCf47YFF2y64s0oXe2xYhJMpEsYeMmLoG2/SuzjXUgSBNXg9YBQqP h+gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mW7uyOr5; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id b17-20020a05600c4e1100b0040d5a5a6d9bsi759774wmq.30.2023.12.26.07.48.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Dec 2023 07:48:56 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mW7uyOr5; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5807187874; Tue, 26 Dec 2023 16:48:44 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="mW7uyOr5"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 31AD186F56; Tue, 26 Dec 2023 16:48:43 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,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.2 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D2427878FA for ; Tue, 26 Dec 2023 16:48:39 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=maxim.uvarov@linaro.org Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-50e77a2805fso1294159e87.1 for ; Tue, 26 Dec 2023 07:48:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1703605718; x=1704210518; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bTm8Qd5DwjmGgajInF0kr8Xif9qyGlQgw/tpF6k1o9Y=; b=mW7uyOr5Vz6BPuzvP7g+qavZ8r7aHN+xkYPoHQGzKLNm3L4LBx3/RsQYN1M4K5Mmv0 Z0UiVZ2MLCAlgNncxM2V50Uf4GuwdAJoOOUWoC2iIxL1dmIKuBs1aVxFUQ94HopFsyXW LGkW4Y/BW0OqsrZg6DOJqpQVLBg8vVAXMC8XbkqxcJ2zePr4MOBr3Ub46xYnpueS9WAv EcTC3FAcWQ4VekwwmH46NTL0XhrZemRsoXrm/a1B56imYBk2e4MT2JXj9lNkeQ2+r0o+ 8hfWtt5oQ2wo5n4UFXA0HoIRTRS9s7Bl/NDCumTjSWsHvvubgK4Rq4XtgL8TyvN4j2m+ 0P7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703605718; x=1704210518; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bTm8Qd5DwjmGgajInF0kr8Xif9qyGlQgw/tpF6k1o9Y=; b=e6Lix6VGMsfyLTgSNekvHDP0l788HRSG5Y8meiPQs5ZkeHQr6GWcG/9YmHr7AbAA2S dsdc60fcCWgCWr7u9TaMPySQdroJFjdkAeLQ62P71K4ElalWUIX1RJjIUum9SHuIYJcl YFrZxUa8itWOnVIIyxBX6yKuzeqM5zeVCSeltuhZpQru5Y/WvQGf5lcRnV8XtXxcF1oy nhwG19pVGM2hmAjsvULfKO4drPv0fnsHOLDf4zmbhjAoGai7QT7KPN7EtlHBcDOk/r0l 0e1YPt9ADEF6NonODNPMkVRHZkTQ7sC43c6ujaUIPiotp9GN41iqv61ZKEKlvVIFf0H/ 5qLw== X-Gm-Message-State: AOJu0Yx6N2Hn3Z5dfvBqNJpSFbgFztLJMboqQluS+f24EjBeYTi+syxZ 52zhQoweN4VgrBf89pNfeX4VSNhvF4uhrfab4ujMDDwdaC4= X-Received: by 2002:a05:6512:24a:b0:50e:6ed9:445 with SMTP id b10-20020a056512024a00b0050e6ed90445mr1211083lfo.28.1703605718547; Tue, 26 Dec 2023 07:48:38 -0800 (PST) Received: from localhost.localdomain ([45.82.14.220]) by smtp.gmail.com with ESMTPSA id d25-20020a0565123d1900b0050e743b0b2csm1089336lfv.34.2023.12.26.07.48.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Dec 2023 07:48:38 -0800 (PST) From: Maxim Uvarov To: u-boot@lists.denx.de Cc: simon.k.r.goldschmidt@gmail.com, tien.fong.chee@intel.com, sjg@chromium.org, joe.hershberger@ni.com, rfried.dev@gmail.com, bharat.gooty@broadcom.com, rayagonda.kokatanur@broadcom.com, trini@konsulko.com, Maxim Uvarov Subject: [PATHv3 2/8] net/smc911x: fix return from smc911x_send Date: Tue, 26 Dec 2023 21:46:13 +0600 Message-Id: <20231226154619.5071-3-maxim.uvarov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20231226154619.5071-1-maxim.uvarov@linaro.org> References: <20231226154619.5071-1-maxim.uvarov@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean return value of smc911x_send is ignored, but on sucesseful send we need return 0 and or error -ETIMEOUT, not opposite. Signed-off-by: Maxim Uvarov Reviewed-by: Tom Rini Reviewed-by: Simon Glass --- drivers/net/smc911x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c index 5c5ad8b84a..616b7ce174 100644 --- a/drivers/net/smc911x.c +++ b/drivers/net/smc911x.c @@ -403,7 +403,7 @@ static int smc911x_send(struct udevice *dev, void *packet, int length) ret = smc911x_send_common(priv, packet, length); - return ret ? 0 : -ETIMEDOUT; + return ret ? -ETIMEDOUT : 0; } static int smc911x_recv(struct udevice *dev, int flags, uchar **packetp)