Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3057128imj; Mon, 18 Feb 2019 18:44:14 -0800 (PST) X-Google-Smtp-Source: AHgI3IYKuVjyNYD3urOLFiM/T83KnjChs4Ddy2kc6hb7cyVZrPwZMyzG0h1nGWvofH0hsjezD2p/ X-Received: by 2002:a17:902:24e7:: with SMTP id l36mr28673452plg.61.1550544254867; Mon, 18 Feb 2019 18:44:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550544254; cv=none; d=google.com; s=arc-20160816; b=GmtgyJWTg7LqO/p7niQ3s67AFRXsFGdsUlI6Hm2xPhyV/RVT1GONyAZEex+85AYCdb g0xbwi5It/xNZCsvYbvQQYkSr1jQ3+GzWcEMLRurTVLgU8VDcKR5tgfaerMetUv5F4Sw 2v3GrdkrSRPMcMryMQq0/dqiilntt1C0BnI8kYQqtRnyOWCtAnefYNk6F0rTHXP+oFXV apHlFdVFW5xn22v+6FZAS+lbroSw6Js7xC2pA7PDwNxOsmpFPu14P58b5xLGzQi9q4n3 e40qqUWm9E9CyvV1A5CR7pp24OEgwON1IxWMeJJk8Yt0vYm3oxNCE4YftqbgIrXWcacK Vh0A== 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=vMXL86MtS+FNxz74iMIu/oV96Bld+96CY7P9rwBiK0Q=; b=MC8ER9ykYj1/QPNDjOud7DvUh2L0nY9yrj335uC/rAatZkzGyGQXAhyGkR66CENtwh LVsYQKpH5LR5d+5JeXtdERT11qFVlMhwQdos7Xa2NoCBSgk5SfGmYCDBpTwvzMFYtdjX Xmf5iONnh5q5tl56ykbYBuaODD+gbLoMJgjByHrPDe9q7UZv0PzKQ7qKrdTgUR2OykA/ COBXYDdAlEmdneMfUJWjYGT+P9KMrZk2BPyveguk8ZI1M63ZUEtqrRT4rI5EvHLQrRUy pXRXW8NwiJSZZsI0L1XBMIdXSAuFkVUe7EfNHoSs+lMKynXcS18ypyhfPHetRdNLWW5N 95tQ== 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 g63si6862453pgc.382.2019.02.18.18.43.59; Mon, 18 Feb 2019 18:44:14 -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 S1731223AbfBRXdO (ORCPT + 99 others); Mon, 18 Feb 2019 18:33:14 -0500 Received: from shards.monkeyblade.net ([23.128.96.9]:56132 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729104AbfBRXdO (ORCPT ); Mon, 18 Feb 2019 18:33:14 -0500 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::bf5]) (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 69E9212E4E2D5; Mon, 18 Feb 2019 15:33:13 -0800 (PST) Date: Mon, 18 Feb 2019 15:33:10 -0800 (PST) Message-Id: <20190218.153310.393264778478086662.davem@davemloft.net> To: vlomovtsev@marvell.com Cc: sgoutham@cavium.com, rric@kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, dnelson@redhat.com Subject: Re: [PATCH v2 3/8] net: thunderx: make CFG_DONE message to run through generic send-ack sequence From: David Miller In-Reply-To: <20190218095159.3847-4-vlomovtsev@marvell.com> References: <20190218095159.3847-1-vlomovtsev@marvell.com> <20190218095159.3847-4-vlomovtsev@marvell.com> 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]); Mon, 18 Feb 2019 15:33:13 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vadim Lomovtsev Date: Mon, 18 Feb 2019 09:52:14 +0000 > @@ -169,6 +169,20 @@ static int nicvf_check_pf_ready(struct nicvf *nic) > return 1; > } > > +static int nicvf_send_cfg_done(struct nicvf *nic) > +{ > + union nic_mbx mbx = {}; > + > + mbx.msg.msg = NIC_MBOX_MSG_CFG_DONE; > + if (nicvf_send_msg_to_pf(nic, &mbx)) { > + netdev_err(nic->netdev, > + "PF didn't respond to CFG DONE msg\n"); > + return 0; > + } > + > + return 1; > +} ... > @@ -1515,8 +1528,7 @@ int nicvf_open(struct net_device *netdev) > nicvf_enable_intr(nic, NICVF_INTR_RBDR, qidx); > > /* Send VF config done msg to PF */ > - mbx.msg.msg = NIC_MBOX_MSG_CFG_DONE; > - nicvf_write_to_mbx(nic, &mbx); > + nicvf_send_cfg_done(nic); If the one and only call site doesn't even bother to check the return value, just make it return void. Thanks.