Received: by 10.192.165.148 with SMTP id m20csp3230706imm; Mon, 23 Apr 2018 03:00:52 -0700 (PDT) X-Google-Smtp-Source: AIpwx49kBXTDpiyP2iatFooA6Sf60jts/Dy514RHZLWRhMIE4XBkJ6IokatEz+vo3j0r6l0zff1z X-Received: by 10.99.117.12 with SMTP id q12mr15977183pgc.395.1524477652041; Mon, 23 Apr 2018 03:00:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524477652; cv=none; d=google.com; s=arc-20160816; b=TQj2g/VpStq4nXRXWnkFMzLOclwZ40To2/V1LEtTmvgGZ+CQZMkpLw/qozzSqSpHBL HAjZRRTCP9dalEI2d1ppZVfTzH0eoBxc3PGAXC1qBH064XJb1D/AySTV3fki23ZqStIr UFgmBuB8/Mc5c2USK0/WOx6kqhzrrDx3gIQno65KaVD1TRndCWTjU+Oa96oA6Ls5dSd6 kJH2PaGHe9xNzMS4rjuErNByIOa0itzH1cuvsmYe5mqvQJHDZ6WCYfJWWXhKvyjscAYv eIBFjEsiDyfJXPCUZQD9CUyWnPuvfi0drVkqhWKj2+VZqXoMLQiLKhfo0eHVOJFFbCUm esKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=voVl+eUqkvO2P526KiAuG48Nke2Q1V+NrlgGG66ceEQ=; b=jxJat712F9qdpueDHbCrpV6L8XReiFABJQEP66tYnSMmyHjmuKwuchdjVBqxAuzwAk 51lmI5ymkYa42H/Dfd2e56WFyn1+dS93CflnEKHCWL/If+KqvImkIHKLSPon4S8TsHtw a8+OMn5qGvwN/KawXDxUkUrirxmteGt99pGcOAoaE7kySRQ+46QtF81foYSsZlB8JVCs 8EInQ5NnZBJOVbiGYNjA6SZn6HnZRCAitJSe6MmfeiYhn4ZllKqJR0h/7vz91/qzqtbz b7RBigohEZyrJwlTHBWE30YrmDYAN98Zerrg0VXWy+MsJPqfLv6g/Oxbmvh6qQh+X52r 0Txg== 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 g15-v6si12267202pln.526.2018.04.23.03.00.37; Mon, 23 Apr 2018 03:00:52 -0700 (PDT) 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 S1754606AbeDWJ7E (ORCPT + 99 others); Mon, 23 Apr 2018 05:59:04 -0400 Received: from smtp03.citrix.com ([162.221.156.55]:61721 "EHLO SMTP03.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754431AbeDWJ7C (ORCPT ); Mon, 23 Apr 2018 05:59:02 -0400 X-IronPort-AV: E=Sophos;i="5.49,317,1520899200"; d="scan'208";a="52425687" Date: Mon, 23 Apr 2018 10:58:59 +0100 From: Wei Liu To: Stanislav Kinsburskii CC: , , , , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH 2/3] xen netback: add fault injection facility Message-ID: <20180423095859.vdi7f7r267urodlx@citrix.com> References: <20180420104603.17823.31095.stgit@dev-dsk-staskins-1a-ca5afbf2.eu-west-1.amazon.com> <20180420104731.17823.97617.stgit@dev-dsk-staskins-1a-ca5afbf2.eu-west-1.amazon.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20180420104731.17823.97617.stgit@dev-dsk-staskins-1a-ca5afbf2.eu-west-1.amazon.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 20, 2018 at 10:47:31AM +0000, Stanislav Kinsburskii wrote: > > #include > #include > @@ -1649,6 +1650,7 @@ static int __init netback_init(void) > PTR_ERR(xen_netback_dbg_root)); > #endif /* CONFIG_DEBUG_FS */ > > + (void) xen_netbk_fi_init(); If you care about the return value, please propagate it to netback_init's caller. Otherwise you can just make the function return void. > + > +int xenvif_fi_init(struct xenvif *vif) > +{ > + struct dentry *parent; > + struct xenvif_fi *vfi; > + int fi, err = -ENOMEM; > + > + parent = vif_fi_dir; > + if (!parent) > + return -ENOMEM; > + > + vfi = kmalloc(sizeof(*vfi), GFP_KERNEL); > + if (!vfi) > + return -ENOMEM; > + > + vfi->dir = debugfs_create_dir(vif->dev->name, parent); > + if (!vfi->dir) > + goto err_dir; > + > + for (fi = 0; fi < XENVIF_FI_MAX; fi++) { > + vfi->faults[fi] = xen_fi_dir_add(vfi->dir, > + xenvif_fi_names[fi]); > + if (!vfi->faults[fi]) > + goto err_fault; > + } > + > + vif->fi_info = vfi; > + return 0; > + > +err_fault: > + for (; fi > 0; fi--) fi >= 0 Wei.