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 Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B2AC9C7EE2C for ; Sun, 28 May 2023 04:20:35 +0000 (UTC) Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.96) (envelope-from ) id 1q37rs-00054I-0m; Sun, 28 May 2023 00:18:56 -0400 Received: from mail-qk1-x72b.google.com ([2607:f8b0:4864:20::72b]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1q37rk-000546-2t for kernelnewbies@kernelnewbies.org; Sun, 28 May 2023 00:18:54 -0400 Received: by mail-qk1-x72b.google.com with SMTP id af79cd13be357-75b1975ea18so127772285a.3 for ; Sat, 27 May 2023 21:18:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vt-edu.20221208.gappssmtp.com; s=20221208; t=1685247519; x=1687839519; h=message-id:date:content-transfer-encoding:mime-version:references :in-reply-to:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=M0FUkSvvQ5UA9il1ERpS7Yex7Osx3W2ljwe6b34BqRc=; b=RtzoA26VCqCdn89FR3WWwWWlmreBH5hS2Xm6zhOWe/FXX/MommYd+dfQWdYP5BOnq9 +VE7hd2RT4y6TG1B3h8OVVb/cZ2rHz5R/UjuGmM1eROt05Y/P0mX4laiUVK8N9rvlLek 2NYVTpnu/NSqQfIG5ZFKvxOknlJMxytQTEoxCSNi/yAPL67zAXQrTxxydvsSkPWVqMMO HOfOHcLYQl22d2KkeD5ZXq92VoaAu0kpR7Po9jwaKUccyj3tlc/MBc01f3i0MGvBhFUi NYgUwk4yLwj8h16AXjcMrB1Pd2KdHX3/QG8wBlgcdD5yP2mcxsIhcJWFAukmf306pbOa g73A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685247519; x=1687839519; h=message-id:date:content-transfer-encoding:mime-version:references :in-reply-to:subject:cc:to:from:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=M0FUkSvvQ5UA9il1ERpS7Yex7Osx3W2ljwe6b34BqRc=; b=YPQ+HM3nk3QpYvlat2w3j+PQWsHY7h5c8KDUBAd8SgTfIwNrQcV5UWycpdCy9iM+O+ 5nfQ9RF4p3FFqM6xLREU/ErjMBLiUjfAZdhmrrVRltpuZmSfZJYTl7Rm54MhnD9ojwB6 vuvYUnIv4zeT4T4NexihdSmeHiEJpm4cSQCZXFJkr3OA4PiSvKw3vCTeMtt8g5j67Z6O SKgZUV1pCLoV55GPqvRTdYLKcP5fgz1EA4wsL+ezXrmFlcH5ra5zUWKdevppYY2//km+ vvHqk05bDWxkLWsorAKD31+z97yuP6EzVHUfGxIw4YhzFSzbg6SX3Zt8+SEf4xT5SGSs 70Jw== X-Gm-Message-State: AC+VfDyZaSBGXwyxr+8iCnzSHqpMeaus4QUXXZp8wepsNXpijm9onDGj xc/TvYow/GoBYT5zHCIOlF4ndQ== X-Google-Smtp-Source: ACHHUZ6QhQhb+xOJupUkpF0vXrWAxXHtjY5N1K0zs8jDqJrNDXUBnzIIh40hftRyBBA1VfDB7Xh5pw== X-Received: by 2002:a05:6214:2245:b0:625:b849:fa3 with SMTP id c5-20020a056214224500b00625b8490fa3mr8553730qvc.30.1685247519491; Sat, 27 May 2023 21:18:39 -0700 (PDT) Received: from turing-police ([2601:5c0:c300:1f41::adb]) by smtp.gmail.com with ESMTPSA id m19-20020ad44d53000000b005dd8b934579sm2553395qvm.17.2023.05.27.21.18.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 May 2023 21:18:38 -0700 (PDT) From: "Valdis Kl=?utf-8?Q?=c4=93?=tnieks" X-Google-Original-From: "Valdis Kl=?utf-8?Q?=c4=93?=tnieks" X-Mailer: exmh version 2.10.0-pre 07/05/2021 with nmh-1.8+dev To: tanure@linux.com Subject: Re: Need help determining if the change is warranted. In-Reply-To: References: <6d8ba15e-254e-7b31-b3b8-cda9e6a2759b@ispras.ru> Mime-Version: 1.0 Date: Sun, 28 May 2023 00:18:37 -0400 Message-ID: <1264347.1685247517@turing-police> Cc: Alison Schofield , Anton Gusev , kernelnewbies@kernelnewbies.org X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============2366539152442441640==" Errors-To: kernelnewbies-bounces@kernelnewbies.org --===============2366539152442441640== Content-Type: multipart/signed; boundary="==_Exmh_1685247516_255198P"; micalg=pgp-sha256; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit --==_Exmh_1685247516_255198P Content-Type: text/plain; charset=us-ascii On Sat, 27 May 2023 07:05:40 +0100, Lucas Tanure said: > It's unusual for an I2C bus would suddenly stop working, so just one > check at the beginning of the function is enough. > I would remove all ret assignments apart from the first one for every > function on that driver. By the same token, it's somewhat unusual for an I2C bus to stop working once it's been probed and initialized, so maybe the first one is superfluous as well :) (Just playing devil's advocate here - after 4 decades of this stuff, I've hit enough systems that have gotten wedged on unusual situations. The worst one was an 18 month chase for why on occasion a petabyte-scale disk array hanging off a bunch of FiberChannel connections would read from the wrong LUN. We finally figured out it was actually a firmware bug in the 10Gig ethernet card. But probably the best advice is this one variously attributed to Tom Duff at Bell Labs (yeah the guy who came up with the Duff Device) or Henry Spencer: Never test for an error condition you don't know how to handle.... (And that 10gig issue probably needed Casey Schaufler of SGI's suggested error code: -EGADS - Violates the principle of least surprise. --==_Exmh_1685247516_255198P Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Comment: Exmh version 2.9.0 11/07/2018 iQEcBAEBCAAGBQJkctYcAAoJEI0DS38y7CIcgUkIAKiqYGd+hxhi3oEQP6SQhbbb JqCzzs66FCR9s7Gh6lhcNlmKQn47gtqnmk/b5lQorgoArttUd3KG4wfn1l8F2pZx 1blI1fPQn5epJaEUp5BE/9b6dtRpINLHvHxqtq5B0sYTkcUV1cgtkWPLS1JeazKK xBD+a0O0OEQHJtkhjxv3U7jp8eYaOtiFDW5bwZ/TbAn8+I5szQOVpPA04z2wZU5n 9k6hOeGaDXLfN6ltCE+H/ftoMKuUqLkHqnWgSSIHutMODQum2X5tQYsUOg8EFsEk mSYea1cfEZfFHq2qcckyslTrU1vcSX5v8E7vV1ddWObGHlKZNJcqf0pvwhZK0+E= =2gHs -----END PGP SIGNATURE----- --==_Exmh_1685247516_255198P-- --===============2366539152442441640== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies --===============2366539152442441640==--