From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41A89C433EF for ; Tue, 28 Sep 2021 15:49:49 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 59E6860F44 for ; Tue, 28 Sep 2021 15:49:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 59E6860F44 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=svenpeter.dev Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4HJkTk3PDhz3054 for ; Wed, 29 Sep 2021 01:49:46 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=svenpeter.dev header.i=@svenpeter.dev header.a=rsa-sha256 header.s=fm2 header.b=pFuuc22H; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=Zs8VXUUg; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=svenpeter.dev (client-ip=66.111.4.229; helo=new3-smtp.messagingengine.com; envelope-from=sven@svenpeter.dev; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=svenpeter.dev header.i=@svenpeter.dev header.a=rsa-sha256 header.s=fm2 header.b=pFuuc22H; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=Zs8VXUUg; dkim-atps=neutral Received: from new3-smtp.messagingengine.com (new3-smtp.messagingengine.com [66.111.4.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4HJkSr0C5Yz2yPT for ; Wed, 29 Sep 2021 01:48:59 +1000 (AEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id CD5E7580C06; Tue, 28 Sep 2021 11:48:55 -0400 (EDT) Received: from imap21 ([10.202.2.71]) by compute1.internal (MEProxy); Tue, 28 Sep 2021 11:48:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=svenpeter.dev; h=mime-version:message-id:in-reply-to:references:date:from:to :cc:subject:content-type; s=fm2; bh=TJNJoVJQ2CEvO+11aqczB9+XTOD9 M2VrFWYC6esaHkk=; b=pFuuc22Hay31tr39igmxFxm5qlwbHt2vgL494/h8/iFF /ZitFPJhBCYOna6WHbBqB5Q8MiEAxrgoVWPJrO9gepN43dwjcrEQFzBmvDb1Y5du 0RINlITZPhla+GNetUYbLl+F0tSng5kyoakfMiXu6g9smWs0hYCjYeLGXydbI0e9 piDzSOjvMkfuCw17cPw9wvv2NQjD7+4Cu1HTSekRvuaU7YNVR6AVaHiIzDeKlkrM EyfytEYuGvHfFgdDQGBGYm6yery3ne5ff1vXBaqe7iItFVXC81O6JI7MuQKwHV/8 bRQ79udTYV9+RkcZbuxlsktcCmReCvByLibKOTfeZQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=TJNJoV JQ2CEvO+11aqczB9+XTOD9M2VrFWYC6esaHkk=; b=Zs8VXUUgAD11M5h5+6VmLW wCnnGqo3a3sSoug5wzhjeSC26SBqh5BrFZLjjWYEwOWybLT4fWqnRuNlsVUkaBoH ajoI12YYjuzgdJvaE2IlHr9kYsoabTxuvxLxcoRJgwDoF98LbGeWEq81EejjAjcM FBLiJM90zeLFbDqKWmeTwzK1oaQq2htXcfpshHWmUHk8YEXfOB6MSIRn7Ct4RSCv pr4ra0Vq2jE9PM69m9b30eywkwrvulMYjEr/YXIlYTFndJYmSrQAsSo6npn5ge5k DmR5PASJK0WQVeDR+a/VxpkT5gjdaZdal47A7LA05JGzB3O5Reg2Ejs5n2JJa8Qg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudektddgledtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgesthdtredtreertdenucfhrhhomhepfdfuvhgv nhcurfgvthgvrhdfuceoshhvvghnsehsvhgvnhhpvghtvghrrdguvghvqeenucggtffrrg htthgvrhhnpefgieegieffuefhtedtjefgteejteefleefgfefgfdvvddtgffhffduhedv feekffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hsvhgvnhesshhvvghnphgvthgvrhdruggvvh X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id C651151C0061; Tue, 28 Sep 2021 11:48:53 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-1303-gb2406efd75-fm-20210922.002-gb2406efd Mime-Version: 1.0 Message-Id: <1c0fd67d-f06c-4e69-876d-31754283b665@www.fastmail.com> In-Reply-To: References: <20210926095847.38261-1-sven@svenpeter.dev> <20210926095847.38261-3-sven@svenpeter.dev> Date: Tue, 28 Sep 2021 17:48:33 +0200 From: "Sven Peter" To: "Arnd Bergmann" Subject: Re: [PATCH 02/10] i2c: pasemi: Use io{read,write}32 Content-Type: text/plain X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hector Martin , Linux Kernel Mailing List , Linux I2C , Paul Mackerras , Linux ARM , Olof Johansson , Mohamed Mediouni , Mark Kettenis , linuxppc-dev , Alyssa Rosenzweig , Stan Skowronek Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Mon, Sep 27, 2021, at 09:39, Arnd Bergmann wrote: > On Sun, Sep 26, 2021 at 12:00 PM Sven Peter wrote: >> >> In preparation for splitting this driver up into a platform_driver >> and a pci_driver, replace outl/inl usage with ioport_map and >> ioread32/iowrite32. >> >> Signed-off-by: Sven Peter >> >> + smbus->ioaddr = ioport_map(smbus->base, smbus->size); >> + if (!smbus->ioaddr) { >> + error = -EBUSY; >> + goto out_release_region; >> + } > > While this works, I would suggest using the more regular pci_iomap() > or pcim_iomap() helper to turn the port number into an __iomem token. Thanks a lot for the review! I'll replace it with pci_iomap here and then later in this series with pcim_iomap when also switching the rest to devres. Thanks, Sven