From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933096AbcDEPEN (ORCPT ); Tue, 5 Apr 2016 11:04:13 -0400 Received: from 8bytes.org ([81.169.241.247]:51002 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932888AbcDEPEL (ORCPT ); Tue, 5 Apr 2016 11:04:11 -0400 Date: Tue, 5 Apr 2016 17:04:08 +0200 From: Joerg Roedel To: cn_wyl2003@126.com Cc: will.deacon@arm.com, alex.williamson@redhat.com, renesas@opensource.se, yalin.wang2010@gmail.com, nicolas.iooss_linux@m4x.org, robin.murphy@arm.com, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iommu: change generic_device_group function Message-ID: <20160405150408.GF11519@8bytes.org> References: <1458907611-19694-1-git-send-email-cn_wyl2003@126.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1458907611-19694-1-git-send-email-cn_wyl2003@126.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 25, 2016 at 08:06:51PM +0800, cn_wyl2003@126.com wrote: > From: yalin wang > > change this function to return only iommu_group* pointer or > PTR_ERR(), never return NULL when failed. > The caller of this function only check IS_ERR() for its return value. > > Signed-off-by: yalin wang You are right, thanks for catching this. But please leave the generic_device_group function in iommu.c. It is assigned to a function pointer by drivers, so inlining it doesn't make sense anyway. Joerg