Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755540AbbLATwZ (ORCPT ); Tue, 1 Dec 2015 14:52:25 -0500 Received: from metis.ext.4.pengutronix.de ([92.198.50.35]:36238 "EHLO metis.ext.4.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752439AbbLATwX (ORCPT ); Tue, 1 Dec 2015 14:52:23 -0500 Date: Tue, 1 Dec 2015 20:52:17 +0100 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= To: Jason Gunthorpe Cc: Jarkko Sakkinen , tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Martin Wilck , Peter Huewe Subject: Re: [PATCH v2 2/3] tpm_tis: Use devm_ioremap_resource Message-ID: <20151201195217.GH5072@pengutronix.de> References: <1448996309-15220-1-git-send-email-jgunthorpe@obsidianresearch.com> <1448996309-15220-3-git-send-email-jgunthorpe@obsidianresearch.com> <20151201192240.GE5072@pengutronix.de> <20151201194419.GB16123@obsidianresearch.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20151201194419.GB16123@obsidianresearch.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1213 Lines: 33 Hello Jason, On Tue, Dec 01, 2015 at 12:44:19PM -0700, Jason Gunthorpe wrote: > On Tue, Dec 01, 2015 at 08:22:40PM +0100, Uwe Kleine-K?nig wrote: > > > + if (resource_size(&tpm_info.res) == 0) > > > + return -ENODEV; > > > + > > > > Does this result in an error message from the upper layers? > > I think so, yes. The probe will fail which causes the driver core to > report a message. > > The scenario this triggers is if the acpi stuff doesn't have a mem > resource, which is a firmware bug, I think. It could get a dedicated > print if that is what you are thinking? The issue I saw is: There are three(?) ways the tpm could be bound. If one of the succeeds, the other two are expected to fail. But in this case an error message, that the tpm failed to be bound is at least misleading. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ | -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/