Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp438518imu; Fri, 11 Jan 2019 03:09:17 -0800 (PST) X-Google-Smtp-Source: ALg8bN7Cpv5NUWCc0Od4lIoOyYQOSvCDCicYxyFyfdi9bu2RGcZY9ipzqfP4z+CHoDVQmWMgL78X X-Received: by 2002:a62:42d4:: with SMTP id h81mr14071925pfd.259.1547204957607; Fri, 11 Jan 2019 03:09:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547204957; cv=none; d=google.com; s=arc-20160816; b=BV2D1nz97Z4BRKT5ZSo5Fojo7PCtFcW7aD7JphAtFi/CPoHYDYyxt1zHk9XRt3BYnR zaGVeUj2HbK3OK/6Ned4NVM/aws2jXN/9QtUcRHdcdR6+ZmZ/EtZZ8wvKQZKg0Us5+G5 Gde1fcTEYjJHEBwrFIuW1oQmPoOnAQQvFTsAmhdZQIzoyVelOTZnwv857Wn1IaKCEOIX tE88flwQ/u0HEWo28+AH4RUsg5Q5+6xkjUQ7ItL/s9GkFwm5Qi2qqzIoftxxGPhWRGbT +Mzar3uUUjc1RynyKSbdPHQgOJIPha7wek6DzGlnzZ5j0MCKd9FfqDguAxIDUkDQ54wg 5CcQ== 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; bh=qVY61094vFj9xpn5OkOFbwc04/EsWu9xUMFOi2tY01Y=; b=b+dpmrjUumfll2Bxom47iQHC66mtwcFgR2/kDvz+4T9hFjkf5HTnv7uTRkWd2esRNv YewsCDzLPXRMakcZ44TMHnav5YQg9v1wNmx4E/DD+xIeYKHYAQbaG1gfQ71IZpMigAyc wstKJFUsaNOiNDtpBw7US7B6dOGJJZXvqXPgd5S3pWFqjIUGgHIWhezAETnyAPk8/biL SKt8nnJ4DZSLe/ywCpQxTA8ZTWnZMbH+zeJcT28LTWnHV+qqX5W+AtBDdZ0x1SmFXQKH 6XAwkoYVgXreaPfVt36pBmcrCCfZOKK84TGzFW6kqWpb9L3/An9gKYdzwpbQ1qtDN8C+ cHmA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 142si77201056pfy.217.2019.01.11.03.09.01; Fri, 11 Jan 2019 03:09:17 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729707AbfAKKXc (ORCPT + 99 others); Fri, 11 Jan 2019 05:23:32 -0500 Received: from 8bytes.org ([81.169.241.247]:56836 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725807AbfAKKXb (ORCPT ); Fri, 11 Jan 2019 05:23:31 -0500 Received: by theia.8bytes.org (Postfix, from userid 1000) id 4B7F743A; Fri, 11 Jan 2019 11:23:30 +0100 (CET) Date: Fri, 11 Jan 2019 11:23:29 +0100 From: Joerg Roedel To: Geert Uytterhoeven Cc: Marek Szyprowski , Linux IOMMU , Linux Kernel Mailing List , Joerg Roedel , Sudeep Holla , Robin Murphy , Krzysztof Kozlowski Subject: Re: [PATCH 3/4] iommu/of: Don't call iommu_ops->add_device directly Message-ID: <20190111102328.hm6y4chellntpnhl@8bytes.org> References: <20181211150513.15161-1-joro@8bytes.org> <20181211150513.15161-4-joro@8bytes.org> <30d86186-e0a2-2be1-2295-20510fbd74ba@samsung.com> <20181219143451.GY16835@8bytes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Geert, On Thu, Dec 20, 2018 at 04:42:17PM +0100, Geert Uytterhoeven wrote: > > - return ops->add_device(dev); > > + if (ops) > > Is this sufficient? The old code checked for ops->add_device != NULL, > too. Robin brought up that all iommu-ops implementations support the add_device call-back, so we can remove that check and make the call-back mandatory for new implementations too. Regards, Joerg