Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7576926imu; Fri, 28 Dec 2018 00:40:16 -0800 (PST) X-Google-Smtp-Source: AFSGD/Wp00wYv3PIljn9RfODGKveNXz0ia5mhTJQIY8aXNpkFUsa8fXYY5dz8uDjDwCLmryGI/Ox X-Received: by 2002:a62:7c47:: with SMTP id x68mr27549977pfc.209.1545986415969; Fri, 28 Dec 2018 00:40:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545986415; cv=none; d=google.com; s=arc-20160816; b=Fz54XIac3BvR12p83Kl0mcugviH+rl0mh5jIpUJzqJN1urQeD8Rw2c7Sp2rpscO4Wu 0JNonzTeG9T80CoJGxmoWpOOe2Hg6UzabMhT90rIsuZAVM6Slgmy1BsGChz+KGxR+sI6 okZD4k3IaSERw1GC6h18dr+EkbKR5pn8kJgRbnJbSMSjrYY/BPTHMtzWsssJmddbZVBv STpiwGCsL36DS6WlUYiFoafNCxJ/Wdsj9ZzA+3JksSJMzPiP3xqQBfXuPkNbow4krkeA 2EJLeOTEeLJ+V7mqNnl7645t/FAGij1BSbFsB1L2dIANGMjxHw1OpdjcqPxsaKjlzgiB awzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=ORGhUaEppJ/OgfBPznYHfAiDQlk+nMPjaDb9/fR7L1o=; b=DL0ocYYPicuOGfYCR4t+pC5LrTYBZs4UD1RhMgnRfkotT/WcCTh/yxgsl+o5poyDjV 1+XtRndjvF3qMjt4GbQJ81MP1fvuSi9rT+mvmQG4GQoz4yD7goZSvsIAHeuVm7kKBtS5 fR3mSEOE4ERm6panHaq+Uom+e+xowh3P80/QXRnVcb+19Vz82gxQNZ74wYcUWVyp97Vq 7ozVgffM9VguKCeGgDVXUUqFcrGs5nLCq+esxfjD00CzM956M/tXumOAJRX5FJLi7DXU h5htAPZu6++25fObibgAIlXnaWXg+xYZajDfIolQiim6zjCv/MK8ucvQ76DWHbPV2D+H llXg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e126si22521832pfh.185.2018.12.28.00.40.00; Fri, 28 Dec 2018 00:40:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728943AbeL1AZw (ORCPT + 99 others); Thu, 27 Dec 2018 19:25:52 -0500 Received: from shards.monkeyblade.net ([23.128.96.9]:52018 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728047AbeL1AZv (ORCPT ); Thu, 27 Dec 2018 19:25:51 -0500 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::cf9]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 59D2914E0982C; Thu, 27 Dec 2018 16:25:51 -0800 (PST) Date: Thu, 27 Dec 2018 16:25:50 -0800 (PST) Message-Id: <20181227.162550.173701726860933882.davem@davemloft.net> To: kjlu@umn.edu Cc: pakki001@umn.edu, linux-net-drivers@solarflare.com, ecree@solarflare.com, bkenward@solarflare.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: sfc: checks status of efx_mcdi_rpc From: David Miller In-Reply-To: <20181226050517.74381-1-kjlu@umn.edu> References: <20181226050517.74381-1-kjlu@umn.edu> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 27 Dec 2018 16:25:51 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kangjie Lu Date: Tue, 25 Dec 2018 23:05:17 -0600 > efx_mcdi_rpc() could fail. The fix checks its status and issues an error > message if it fails. > > Signed-off-by: Kangjie Lu > --- > drivers/net/ethernet/sfc/mcdi.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/net/ethernet/sfc/mcdi.c b/drivers/net/ethernet/sfc/mcdi.c > index dfad93fca0a6..9486e6534dea 100644 > --- a/drivers/net/ethernet/sfc/mcdi.c > +++ b/drivers/net/ethernet/sfc/mcdi.c > @@ -1819,6 +1819,9 @@ void efx_mcdi_set_id_led(struct efx_nic *efx, enum efx_led_mode mode) > > rc = efx_mcdi_rpc(efx, MC_CMD_SET_ID_LED, inbuf, sizeof(inbuf), > NULL, 0, NULL); > + if (rc) > + netif_err(efx, hw, efx->net_dev, "%s: failed rc=%d\n", > + __func__, rc); "__func__" did not fail, efx_mcdi_rpc() did.