Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) (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 4EBD87A for ; Mon, 18 Apr 2022 14:58:45 +0000 (UTC) Received: by mail-wr1-f48.google.com with SMTP id i20so18828902wrb.13 for ; Mon, 18 Apr 2022 07:58:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=CX/IUq1aN3lYpmTZrmux2ZoNqle4gaskLWMK3nNShGw=; b=JdNM/niE5cXM0TtsJv+AiQG6UfTArLkryCgK8z4GIkdoaRaCxwAIIidvmgZ+mkVEt8 /4jGxK4C9/KlzaR+i6YfxG/XjIY5r2P9vF282wKEN702SZOJiIU3ZrGMdpzVnrdW3caj Z71tHHaOsQ6+ELTgAjQa/y/4XCfZMxeIyWXd0dGoGNj+dzoLH/hQoP/8rNOvNPFoKbBQ /LT6wmL2EybaqGXORDRUZN1ep0jeDcqhAxazDCKHQbMT4bzOI+a3ANSvoV4eqQzMqIze YZat7aMSXjylpz2cBZMUzb4WPYOo1i9LKSmhmlPBY1hBJNZaTJ+WGiCRqDYST9xZcYL4 HYww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=CX/IUq1aN3lYpmTZrmux2ZoNqle4gaskLWMK3nNShGw=; b=R9XgEvZPQDgfTcQc60tefVcJbPJhI4v6iOgT6DtNQ6MvGIpGPGkE53QJOPjV/6+WRp XdZYSijvC+2gHS9B/0zU+YiIUv0OqQFMqi8vqjNDWEPSWl8Qq+hhltcdcZZtcSVGtbzF rL28gUiiWOdGbWv+OC72EZcal6906vmocKH9kwi3sRgta5Bzlm2L5onpbKaIal/Aq0KY srnaOZb8pgg0kew0bOLt2T3qSa4hlDfjMd/yMeWgY/DAg56p+i3pjmNDLYDBav8J08KE YxjwVEiqd0ewU8Qo8s7GnJzXntXnKJh5c/UGWWybeHBup3vNo1HeCQQVTByy04C3HZkT x3JQ== X-Gm-Message-State: AOAM533zdJlkX3uScuuSV3Ea8My+4HeoZ5RBMOzHOQJIynL1Asuvc2Q1 b5NDVzYsrbO3zU4noIEaqkA= X-Google-Smtp-Source: ABdhPJzzsluWxj0VaudxL34jveGy6/JC2BIiCB0OvhXZF9RY9e4P8n4nrql3SI+RbCDjUd+6EDMyGA== X-Received: by 2002:a5d:6c68:0:b0:20a:8d5f:681a with SMTP id r8-20020a5d6c68000000b0020a8d5f681amr6931611wrz.470.1650293923638; Mon, 18 Apr 2022 07:58:43 -0700 (PDT) Received: from localhost (cpc154979-craw9-2-0-cust193.16-3.cable.virginm.net. [80.193.200.194]) by smtp.gmail.com with ESMTPSA id h2-20020a05600c414200b0038ec7a4f07esm16740652wmm.33.2022.04.18.07.58.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Apr 2022 07:58:43 -0700 (PDT) From: Colin Ian King To: Matt Porter , Alexandre Bounine , linux-kernel@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, llvm@lists.linux.dev Subject: [PATCH] rapidio: Remove redundant variable tmp Date: Mon, 18 Apr 2022 15:58:42 +0100 Message-Id: <20220418145842.87154-1-colin.i.king@gmail.com> X-Mailer: git-send-email 2.35.1 Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Variable tmp is being assigned a value that is never read, the variable is redundant and can be removed. Cleans up clang scan build warning: drivers/rapidio/rio-scan.c:561:10: warning: Although the value stored to 'tmp' is used in the enclosing expression, the value is never actually read from 'tmp' [deadcode.DeadStores] Signed-off-by: Colin Ian King --- drivers/rapidio/rio-scan.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/rapidio/rio-scan.c b/drivers/rapidio/rio-scan.c index 19b0c33f4a62..5256e76ab29c 100644 --- a/drivers/rapidio/rio-scan.c +++ b/drivers/rapidio/rio-scan.c @@ -524,7 +524,6 @@ static int rio_enum_peer(struct rio_net *net, struct rio_mport *port, { struct rio_dev *rdev; u32 regval; - int tmp; if (rio_mport_chk_dev_access(port, RIO_ANY_DESTID(port->sys_size), hopcount)) { @@ -558,8 +557,7 @@ static int rio_enum_peer(struct rio_net *net, struct rio_mport *port, rio_mport_write_config_32(port, RIO_ANY_DESTID(port->sys_size), hopcount, RIO_HOST_DID_LOCK_CSR, port->host_deviceid); - while ((tmp = rio_get_host_deviceid_lock(port, hopcount)) - < port->host_deviceid) { + while (rio_get_host_deviceid_lock(port, hopcount) < port->host_deviceid) { /* Delay a bit */ mdelay(1); /* Attempt to acquire device lock again */ -- 2.35.1