Received: by 10.223.185.116 with SMTP id b49csp4141246wrg; Mon, 26 Feb 2018 11:56:31 -0800 (PST) X-Google-Smtp-Source: AH8x225A3hoIUhEjdU6k0THOHHm6/D90avjs+xvSg1Hl1gjGOdiGzRM+A+bfvkNyeZ6mg/YtfPDm X-Received: by 10.98.71.3 with SMTP id u3mr11805354pfa.219.1519674991818; Mon, 26 Feb 2018 11:56:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519674991; cv=none; d=google.com; s=arc-20160816; b=WXX0I2rsXBQw8Ydi6eeZbU47/YScTKkOH7YgrDv39xhkdlD6rftEE1a5jChgit/YIe bDwiOJ7EkW7daE7yvhO3b7woYXKE9HzrY/nPFWSc4d1xMzaxHYXA3m+t2Xihkf2Koa9V f969q6SQkmfp826lMU6SfxvfejshWH/QbU/xWDu39OUnSmWEdi3Zn3fBvRmHmjqKPqWJ j0npXHO6C5yob9wuxVfY/vIWQgbzqPFpAPXrIY7I2F7uAz+296nioViTg3syos2RVwjk JIXN3xIBRUS7EdNUo4NzMoGsQOI7wUPJ3NxHof7o7gvLa3kPkCsQsnX9mMQM3n6BTFWw SbNw== 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=2khzBkdd6dbNpJ/xS4SIFgBlsWMeDKhBgh4GSGk2IFI=; b=Ih/OtK5gKkPlO0H8RKj/QymYpuOr9Qs7dG5CabyvF8OqlN9COOJtJJVHpAx4/msgyv EkNGGoZFVsgw5i0gbyq6KXIGlfkwMsafk5iTsCqLNs6NRXYT9BatAr/bTyPrgJEL8Bzh aqPMHQvWsZ/Vi8BHeOX3aa0uZjhhesF9MDL8ykS5Ct7elG6sTKl2NclQsWDqYTC+DNPl RE3R70EK90UBR8624KPmLKZV5lcSzhosdeCPcrDAqAf3Z9xODBHzI5x4g3NzV+npFpj7 5t8eAIaVxd9xBaZEAi8mgTBDcSuatqB18sTv4wOGlhZWYN3exWRCB0pYKhtTyn+DP5H0 HgnA== 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 o5si2345607pfh.390.2018.02.26.11.56.15; Mon, 26 Feb 2018 11:56:31 -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 S1751635AbeBZTzY (ORCPT + 99 others); Mon, 26 Feb 2018 14:55:24 -0500 Received: from sauhun.de ([88.99.104.3]:38280 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751522AbeBZTzX (ORCPT ); Mon, 26 Feb 2018 14:55:23 -0500 Received: from localhost (p54B3361F.dip0.t-ipconnect.de [84.179.54.31]) by pokefinder.org (Postfix) with ESMTPSA id AA8A12C713F; Mon, 26 Feb 2018 20:55:21 +0100 (CET) Date: Mon, 26 Feb 2018 20:55:21 +0100 From: Wolfram Sang To: Jean Delvare Cc: Guenter Roeck , =?utf-8?B?Wm9sdMOhbiBCw7ZzesO2cm3DqW55aQ==?= , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] i2c: piix4: Use request_muxed_region Message-ID: <20180226195521.vs32bemg7iopkjvd@ninjato> References: <1514652658-6228-1-git-send-email-linux@roeck-us.net> <20180212111041.027edd85@endymion> <20180212185152.GA20877@roeck-us.net> <20180214152305.57b76ea5@endymion> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="vvgnqlsxbfrdninx" Content-Disposition: inline In-Reply-To: <20180214152305.57b76ea5@endymion> 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 --vvgnqlsxbfrdninx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 14, 2018 at 03:23:05PM +0100, Jean Delvare wrote: > On Mon, 12 Feb 2018 10:51:52 -0800, Guenter Roeck wrote: > > On Mon, Feb 12, 2018 at 11:10:41AM +0100, Jean Delvare wrote: > > > On Sat, 30 Dec 2017 08:50:57 -0800, Guenter Roeck wrote: =20 > > > > @@ -298,12 +295,15 @@ static int piix4_setup_sb800(struct pci_dev *= PIIX4_dev, > > > > else > > > > smb_en =3D (aux) ? 0x28 : 0x2c; > > > > =20 > > > > - mutex_lock(&piix4_mutex_sb800); > > > > + if (!request_muxed_region(SB800_PIIX4_SMB_IDX, 2, "sb800_piix4_sm= b")) > > > > + return -EBUSY; =20 > > >=20 > > > This would happen if and only if another driver has requested the > > > region already but without IORESOURCE_MUXED, right? Don't you want to= =20 > >=20 > > Or if its call to alloc_resource() fails. >=20 > OK, two things which are not supposed to happen, so failing is the > right thing to do. >=20 > > > write an error message then? I don't think request_muxed_region() will > > > do, and probe failing with -EBUSY but no error message logged would be > > > hard to diagnose. > > > > NP, though the analysis is quite simple - /proc/iomem will show the cul= prit. >=20 > I'm confused. How would the user know what to look for in /proc/iomem > (or, I believe, /proc/ioports actually) if the driver does not print > which resource allocation failed? >=20 > If the information is already printed somewhere, then I agree there's no > point adding a message. But from the code I could not find it. I don't see any ack or rev from Jean, so I guess there are open issues? --vvgnqlsxbfrdninx Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAlqUZikACgkQFA3kzBSg KbYvMxAAo0aFcnHK9L9U8NcRkWpk+BlQqeIiiNmH39XGzhpRb+24ObkGF9T45X1k nQHu+g1vBP00VAO/Y50n1DWRNy9COx4n4hkIvh5w8VtnecnYOI5tJWVw0V2lzH/B tBJQ41wcCBDcAEPoA36lpUnbaGMgyh9hX8gJLJJ8Jir+3p61nwVI69y3jkxihVis 4bXgH9uohS0TBYkE4EEyVrc/dSxjx+sAd+V4xsmguNVKmMY9cl3H0a4vHkVEePYs oBIcH/QLVY0pP700KIlKeq4NRmzjnkF9vf6fq8+Hj4mj4q8YpBUwdUohVbvvbpK/ zHHYArLHbU8msu4gok129lVywpchtlwslkm8nY2QOCmzJkZvInsX+DoGPg5UxXzb 8t7DY+/DYczA/JEoAp2gbrdztoPVNFBJITgRcbiapTXwhf1TTW1iR0AFLCB42Br5 ys0/6uU/kpyfs21Zc/P5ckZbBnMtbf0UAkIuZlmYgYtCDHzHaC+0u3OX/Hh4/XCY 8FOrOCKhkzQWBCRf9dHtoEfLk0LAK/cNuVJWkb8cyvFOha4VdUeoROWTapdIKPsV XY/esTXaJMlnJKlfaUZ5BwPYrsaFidN4DPif8wJadpCy6M1m89Ub6oLGOCBn7Osh fCoZMbw2ujASwO8TMZeDtWcQw+8qGZkssn+rG6fiBxMTDGtuKkc= =hXuL -----END PGP SIGNATURE----- --vvgnqlsxbfrdninx--