Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp1186216pxy; Sat, 1 May 2021 06:16:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyvf0bvIAxvTyqdHcp4M67bnm1wQs9crjGaQ11iDkG2X7TLKwJPPWPKg8xJPaUzUuhJh2RL X-Received: by 2002:aa7:dd96:: with SMTP id g22mr11554628edv.222.1619874989614; Sat, 01 May 2021 06:16:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1619874989; cv=pass; d=google.com; s=arc-20160816; b=fLAJ++u8mONUM66wgXq2lcNiiwdzXi2DczwgGbSOViUq/EvkgK/W+BUj79vuXn4a+p xq85LB7Yxy8buKLxY7KAg2fqSaIa0SnE7egLPvaJLHWmty9XleDHbW4gvVMfH8tsopwm 6QV2g+pGah1bLW60nmCZ7LwYUXaJapPzNiUnqMBx7OFb49XukOrM+FLBISe0YEVbTh5g pcMTp4Hp/eb7LjbQMQRtpmtlGBmYYV23kqZ/vISZWNc/4niei3Hqw+W0vFsCoGePjkWi EZqnVa/G/ISaPHt/ZVEhzYJBbMnQ46I+mMRa3ljL9gUWPLvMzhpG26nNlrOkR5LJvThf 2lTw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=aeVb9tMtN8VP+qEMHO0j4WwukXcb48yCZRdEb9bMQYU=; b=wt4PmvgFsDqvNhbkEMYngMuRWPz15b1phfTUrqpp+ys6mLoIIPy/Sop8jNT5yPqYtZ ekA42KHof1DdOR4SyGBdYssaCcoyNf0cN8T4kDxVSzCg9dob+41sq2jp4fnnOse6C+ji bZ8dXfV3bF1ezKg7T4uLAZAW5djsq/tyAV1kfUgiMcmJ2Vz3m56odDsE6X4/9rXE9J2A aKPJrMvE6nUhHZXddVg1bNG9VyZMnGI6eP0KjVmx+fv6xxchWd6owdMZ4WckWX39RuUm q23o8eT/NxRNcNl3eu/AeOpfroACLQqV9dJOCqGEEwULGMbq0WOgL7lxeHJIlzDeHW3F LdIw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@anirudhrb.com header.s=zoho header.b=oyoMkL+e; arc=pass (i=1 spf=pass spfdomain=anirudhrb.com dkim=pass dkdomain=anirudhrb.com dmarc=pass fromdomain=anirudhrb.com>); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hr20si5901176ejc.344.2021.05.01.06.15.36; Sat, 01 May 2021 06:16:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@anirudhrb.com header.s=zoho header.b=oyoMkL+e; arc=pass (i=1 spf=pass spfdomain=anirudhrb.com dkim=pass dkdomain=anirudhrb.com dmarc=pass fromdomain=anirudhrb.com>); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232164AbhEANLH (ORCPT + 99 others); Sat, 1 May 2021 09:11:07 -0400 Received: from sender4-of-o53.zoho.com ([136.143.188.53]:21351 "EHLO sender4-of-o53.zoho.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232129AbhEANLH (ORCPT ); Sat, 1 May 2021 09:11:07 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1619874614; cv=none; d=zohomail.com; s=zohoarc; b=G0fLoottJfClpiGHND3lXJB5oSzfIOTtRAieLbHQHVU8pRdjNRMzsv8CDo2HnN0JKdh2HgTEbe2DaIwiF/PJDYRx1qminEUh/4h81vU9IwF+POaBdrv6Z6ANLbB85GMLENg1QmdLTlkimw/EUxGMDNafTope5Qgq2Fz6kLnA3LI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619874614; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=aeVb9tMtN8VP+qEMHO0j4WwukXcb48yCZRdEb9bMQYU=; b=eb8SDlX02QzYFdxZCQ7HxT1BXAA912qnTO7kS/0fihv4lzIXMpFGhhpjmqWqtcOeHrW12H2MqMy+Jccmx1uYRLQF3Jv5Szhz84dy7ZOKoY/tWT6lgPoY9EGQdcZFCFTQg7uazv4decjcygLumf0mfQOolR9Yd/uBYB/UCkcGjhY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=anirudhrb.com; spf=pass smtp.mailfrom=mail@anirudhrb.com; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1619874614; s=zoho; d=anirudhrb.com; i=mail@anirudhrb.com; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:Content-Type:Content-Transfer-Encoding:In-Reply-To; bh=aeVb9tMtN8VP+qEMHO0j4WwukXcb48yCZRdEb9bMQYU=; b=oyoMkL+eiS8SxK/h+JHxBeyZF4UM/bPruSmjD+vR7sO8TIhpgLl/sLO4PBQWmHkz chlSSTPWM4S45ENS+6Tc9+cODRrHG5oigHYokwci2jj2n3mZf64yElnPjUdrfThhV35 fIQ4vjAP/a1bmbyNyV4FP13AIdqCU1HI94QNRpUU= Received: from anirudhrb.com (49.207.211.62 [49.207.211.62]) by mx.zohomail.com with SMTPS id 1619874611701231.35758212814903; Sat, 1 May 2021 06:10:11 -0700 (PDT) Date: Sat, 1 May 2021 18:40:04 +0530 From: Anirudh Rayabharam To: Greg KH Cc: Matt Porter , Alexandre Bounine , linux-kernel-mentees@lists.linuxfoundation.org, linux-kernel@vger.kernel.org, mail@anirudhrb.com Subject: Re: [PATCH] rapidio: remove unused variable in rio_cm.c Message-ID: References: <20210501055018.9244-1-mail@anirudhrb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-ZohoMailClient: External Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, May 01, 2021 at 12:23:30PM +0200, Greg KH wrote: > On Sat, May 01, 2021 at 11:20:17AM +0530, Anirudh Rayabharam wrote: > > Remove unused variable 'rc' to fix gcc warning: > > > > drivers/rapidio/rio_cm.c: In function ‘rio_txcq_handler’: > > drivers/rapidio/rio_cm.c:673:7: warning: variable ‘rc’ set but > > not used [-Wunused-but-set-variable] > > > > Signed-off-by: Anirudh Rayabharam > > --- > > drivers/rapidio/rio_cm.c | 3 +-- > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > > diff --git a/drivers/rapidio/rio_cm.c b/drivers/rapidio/rio_cm.c > > index 50ec53d67a4c..545693bd86a3 100644 > > --- a/drivers/rapidio/rio_cm.c > > +++ b/drivers/rapidio/rio_cm.c > > @@ -670,12 +670,11 @@ static void rio_txcq_handler(struct cm_dev *cm, int slot) > > */ > > if (!list_empty(&cm->tx_reqs) && (cm->tx_cnt < RIOCM_TX_RING_SIZE)) { > > struct tx_req *req, *_req; > > - int rc; > > > > list_for_each_entry_safe(req, _req, &cm->tx_reqs, node) { > > list_del(&req->node); > > cm->tx_buf[cm->tx_slot] = req->buffer; > > - rc = rio_add_outb_message(cm->mport, req->rdev, cmbox, > > + rio_add_outb_message(cm->mport, req->rdev, cmbox, > > req->buffer, req->len); > > Why not handle the potential error sent here? I don't know how it should be handled (these functions don't return anything). I assumed that since it is not currently being handled, it's probably not useful. I'll look into it though. I guess we could simply log it at the very least. Thanks! - Anirudh.