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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BE7C7C433F5 for ; Thu, 29 Sep 2022 10:04:29 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4ACCF8454A; Thu, 29 Sep 2022 12:02:50 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="ZhHTcC6b"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B4E6184C81; Thu, 29 Sep 2022 12:01:34 +0200 (CEST) Received: from mail-oi1-x236.google.com (mail-oi1-x236.google.com [IPv6:2607:f8b0:4864:20::236]) (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 25E8384CA1 for ; Thu, 29 Sep 2022 12:01:32 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@google.com Received: by mail-oi1-x236.google.com with SMTP id l5so1072901oif.7 for ; Thu, 29 Sep 2022 03:01:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=Pfvf+FNxXqcXDiYUSPkTNV2E3EMS/W2kkqOTgLdeFAM=; b=ZhHTcC6b7jB1VGVR1t9yoOKi06hoTXPOnpl8L9R4/tTkDYUnX5wPO0U5ipcASpDObv gXaRW5TlQMv44UfAESp/YVEXyUWutb+JxTQ8EFon3FCpv8cUrH/tR2/ZPne4eEKR/fcy qfxfk/6e2SheJRUbMXDeJcb+n21NSATy38+xk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=Pfvf+FNxXqcXDiYUSPkTNV2E3EMS/W2kkqOTgLdeFAM=; b=Ecjv/SMjvcOnk1loupqpbRrrTO0TS1ja0+tEqgEodijBYlfJl1/td+7/p+E0Y2Ngwf B/CozjIvc/sny4O9DcpMANlhrQXFEPXsYGtRajeeTNjQePmQZEDO0ol9tUnTVYGHpRFW T1qbZu+QfHO1weZCCp/4eqvVGUkABYhm0gaFJ6YXCRjYCBeeKOTT3eMEdS18jkuaPtfw 5jSZkKbUQepOnzywGdZ1nIXLJVURjtgjzC6ndK/BdhcHJhPI4tYS/hIW28R6an/a2Ded 6z3nI3ZPAsxf5GpcE5tF7tILYqLpeZ1yW7ssUF2JWcHTGbVYEJeZJ0gAOdboEoa2RlAj GCzQ== X-Gm-Message-State: ACrzQf1EwXgzUGPutSMCXGjQVJOQMe2J7hpokbc1TdKWiW8hZqGuDT51 GVbaLJKITv8Mip1LIeKLys4XzsEfkdJ/+dp1jGRKXs8pbSQ= X-Google-Smtp-Source: AMsMyM5C3LgkislFzzygGDsJf7l3u61UWtBrGiVMpkWqeW/4RZ2HTIESlTm7CghR+eYvUDXd3rMCLhqm8qsk3PptX8k= X-Received: by 2002:a05:6808:f0a:b0:350:61ee:8306 with SMTP id m10-20020a0568080f0a00b0035061ee8306mr6371431oiw.170.1664445690638; Thu, 29 Sep 2022 03:01:30 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Simon Glass Date: Thu, 29 Sep 2022 04:00:38 -0600 Message-ID: Subject: Re: [PATCH v4 13/21] w1: Clean up device iteration in w1_bus_find_dev To: Michal Suchanek Cc: U-Boot Mailing List Content-Type: text/plain; charset="UTF-8" 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.6 at phobos.denx.de X-Virus-Status: Clean On Sun, 25 Sept 2022 at 02:31, Michal Suchanek wrote: > > The cycle is guarded by !ret && dev, code in if (ret || ! dev) is never > executed. dev implies !ret, and ret is not even checked when getting > next device, just drop the ret variable completely. > > Signed-off-by: Michal Suchanek > --- > drivers/w1/w1-uclass.c | 9 ++------- > 1 file changed, 2 insertions(+), 7 deletions(-) Reviewed-by: Simon Glass