Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp1322242lqp; Mon, 15 Apr 2024 02:57:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW4z/ZtMp3pWm5zmkoYDPO91K2vi0PpNl+UEmEZ9kwWWThib/qKjToB9XmV/6B8FnoKZ2XpNMjR20/oUyBPnGTUoG6qYJoADiXVz5MAPw== X-Google-Smtp-Source: AGHT+IEaQP4lDCRjksYv5OeB5go63aEs8y2xYMoxW8WvEYLTikev4zgqHSWB37dBYQWmvv6tpIZu X-Received: by 2002:a05:6214:3009:b0:696:b01d:da51 with SMTP id ke9-20020a056214300900b00696b01dda51mr24714691qvb.10.1713175061156; Mon, 15 Apr 2024 02:57:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713175061; cv=pass; d=google.com; s=arc-20160816; b=RuLC63ZoyYAKd58qWVQ7ZCKmuq9ixMKFzsJcltO0QEpjRh42AVhizX+SM9MdfW1OZ/ 5YScYUWkr5LDJzhvumao0MU7KfQRL71hFGqmacECrifUw7pnUNqBBbTUOzuBO8nbLvIw ATlEij7MXudAXYESD6TzwxldDYhrh9ayA2KNcHVXdFi8RQmLmGe33HB00us4ZLHMur4w OzsmH4eWNuegNHu5z/AlD9zYCVjtwxa0MBSVjIJ6iZjUJAY++8Pz+FvB8GMOsdV1Qn5h o8AewZmmjIiaNPRT2RY8gUPD1UJ1vE4vbGB5KUq4spKmivwnS5ifUfYsDdfV7G9FykwU BXGQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=g/rKQn2i9AJe69a9IKOYTlsaBB0pLUNTFKMRgaL9iMo=; fh=4mEiaoj14H+a2osx4ezJLtEgyQUa4fHPgiYLNgIjlbk=; b=g3cICoC9U/UdlciXUoUlRIWmpcKIByxBDBFAJ8h/6Ke85D6TjZ/XopcLjhYseS/LJf P2mOFGVzcBIR2rfeSX3BzxBMlkHPapLUXYt6VhQ5WlJvvIq100Q7nh5+k5D1iWPSbgtT 8MNpa1Tp2WUNpfYRn4XdccQSVH6kUEsX+aBdF3DM84S/odkk4fYDw/wfBDR4LBG7joFW rpUhFf0LGxQ0630jEBJcZ6Bl/Z1TsK9l3wEHx/ZX6u9WtXepqpkxe3AiBmdnn+5i/huO WRjpWwswd2pzLd1x3i2lhfTjCne14lLhtmdpsHBiM9NRr0mmdZuezLNfeI2pw3WuG7+u OpkQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="K/3bwBgM"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-144876-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-144876-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 8-20020a0562140dc800b0069b159cd2dcsi12052204qvt.0.2024.04.15.02.57.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 02:57:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-144876-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="K/3bwBgM"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-144876-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-144876-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 7C8681C2040D for ; Mon, 15 Apr 2024 09:57:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7D5DA47F5C; Mon, 15 Apr 2024 09:57:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="K/3bwBgM" Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2D6DB47F4B; Mon, 15 Apr 2024 09:57:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713175024; cv=none; b=bXA3jAwnhpshvj8Xrz0EomBCr1J1lseyI2GZbPJsP4hUO30h5NCgeBHu2h2dCsz2K/ENIqO0n6W8VsIMpT7IuYIY7JWAZYjqMkgNCVh/fAVZnXLA3pe8Qggb1JQTigghTa91lVTzD6A5W4l0GR7ZUJw9cG6ii/wMI3tbGT3YPtI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713175024; c=relaxed/simple; bh=D0/46h4JT2NcCeh2yJo41/KSOz5i68/5Tg5zz5p0fiE=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type; b=ifADzpzNlOnc0EGKE1N6tlGxWoVTX1kpZ2OpE5fN6MoUT1zGKyU/qhMmMQ5gsS5OSOFi1y2FutZ6BA+0pBM8h/WgHqN4Imo+iIR9pipLjUggfX0z1SuqFAL3uI9xjS6C3iQyIXzeYPoR+4kPHJvKmpOoqSOG1As+No2w+UGjjdc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=K/3bwBgM; arc=none smtp.client-ip=209.85.221.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-346c5b83c6eso2494653f8f.3; Mon, 15 Apr 2024 02:57:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713175021; x=1713779821; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=g/rKQn2i9AJe69a9IKOYTlsaBB0pLUNTFKMRgaL9iMo=; b=K/3bwBgMw0KtpuFz2G64yZKmTMsSQCpPSIWj4iMjBWfazdXe3Q77YyrTwP4LvC+Mvm O9YiX00MT7gdh4OeUszm3u1i/X2VsushNIqMqMOtIr9wvJehgvO+2iaM1+1LeExV7Dox mMNMy+LgQtA1g4YUzfONVgOVltEA6SkvtF6jeqms++FMyM4sz3szEDxdGjcrttR5wxWQ 2wmT+pRmao0VShC5XQww4yD5jPVxVbInMCeZXEzkd707F/8QT15Q4yAo8mTBODGPYBDm yw1jHn9P1djTg69h53jZ0X7Qm2fKkklLMh8hgTuvaikppuDFBYjGm+/2g5wZUbE9NnjI enfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713175021; x=1713779821; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=g/rKQn2i9AJe69a9IKOYTlsaBB0pLUNTFKMRgaL9iMo=; b=nt42zTu772G2d0f6lqW4NNf0JcrrPC0x9CWY/CFIQpIAV1LwxG1x4N42KrfzIirkBw xHgfRIpETOqOqNljNiZ/KvKvIIlhy56bx+08YBdAUsbXDDgw2D9jg4//eJDpDiiPkiTs lCSpsx9NPBGm0cqeyDYQHVkvjv5nAhJEBYFDEKAcyx9mLz4WYKFVwrTUX76QzwONEWUx f5Cpoz0YKjB1AomqYfH+zb8DhR5E2vPPRcut8SRBJgfzBzo3Xan7L3X1XM4FOXX/FWbg CUys+ssOOD6eKwl6CH9k4c7CFPi8JlyeBjB6IMa6ywQoT0TFKGYQQQ0H40RraakwL3V9 Qexg== X-Forwarded-Encrypted: i=1; AJvYcCX0Q7K2t+O82lsuH85zHyRGT/z/N65kfEYdE5pPL01kQJzgj5NqM06+SDZwtem2yw0aw7wZqG4pgz66AA1gMtGOMc68gjLjCntmmK9k X-Gm-Message-State: AOJu0Yx1XTDebuc/qG8uFMNSuOt3nXjlP1Cv0e07Nos2Us0U5kwML6+q R51f0lsAVGcSqgtMhieBrReU+cA9UG68RlT7LzFkHCQqgA8EIuR9 X-Received: by 2002:a05:6000:1743:b0:343:8994:313c with SMTP id m3-20020a056000174300b003438994313cmr5217871wrf.5.1713175021220; Mon, 15 Apr 2024 02:57:01 -0700 (PDT) Received: from localhost (craw-09-b2-v4wan-169726-cust2117.vm24.cable.virginm.net. [92.238.24.70]) by smtp.gmail.com with ESMTPSA id c18-20020a5d5292000000b00341b451a31asm11537447wrv.36.2024.04.15.02.57.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 02:57:00 -0700 (PDT) From: Colin Ian King To: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Daniel Vetter , Andi Shyti , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH][next] drm/i915: remove redundant assignement to variable err Date: Mon, 15 Apr 2024 10:56:59 +0100 Message-Id: <20240415095659.482989-1-colin.i.king@gmail.com> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit The variable err is being assigned a value 0 that is never read, the break statement escapes a do-while loop and then the code returns without referencing err. The assignment is redundant and can be removed. Cleans up clang scan build warning: drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c:1075:5: warning: Value stored to 'err' is never read [deadcode.DeadStores] Signed-off-by: Colin Ian King --- drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c index 99a9ade73956..9ca9e9505244 100644 --- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c +++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c @@ -1071,10 +1071,8 @@ static int igt_fill_mappable(struct intel_memory_region *mr, if (err != -ENXIO && err != -ENOMEM) goto err_close; - if (size == mr->min_page_size) { - err = 0; + if (size == mr->min_page_size) break; - } size >>= 1; continue; -- 2.39.2