Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3878712ybi; Mon, 10 Jun 2019 19:20:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqzyfEh77pvRfWpvNAzGLpvJ747qEPS/Cxpzqa+vlgfqfdIGOGkh6J7YVPVsQPe6kulUv+ai X-Received: by 2002:a17:902:6b44:: with SMTP id g4mr58184186plt.35.1560219659765; Mon, 10 Jun 2019 19:20:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560219659; cv=none; d=google.com; s=arc-20160816; b=LZOJq31WaenI2jIdYR8dLXo5IK8nMb1YzV9U/GtWMljkqkemIegsz1Hju8naPIn8BX l9CqDazZTC4dVasXIvhk7puBKik7L1gI+AW8UluKE3DU2JGmwXHj09OBM6WyTXpfiu8b GCFqx6Vbo8V8F5J/8ksdRtFNbF6l9dB4B196C07ZLE1mNPwCS7gpWJ4PYPRwYV8JuMEq i4FZpaZvTq1HakW0VlOkozvfWXrW4ih38ueEm9KqcU39ubYQz5C6ksTqs/7nFL5/yd5x YGmAaa8HWdho1G6kW/5b6uV7BmgLl5s/ygtA3HdM4Ftde2+z8R91AmGlVW7Si9SQL/qx ts0g== 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:dkim-signature; bh=HwcJ3r4qabrGVVXT3iY3gOmdfuWxDoWG3l3kjwZI/qg=; b=Ud9ett66A7byU+XnOGBh+7GDWioNwtFmDBESduNmBQh2f4ALhCdIvGbyzyub0aebWX JUrNblAzd4N7Er0uOpXAtuRVXDL0irf4ID49zznOMBiF9hVZm2TYmjjEYecBG3/fbM+n eTlBbB1tnoXc8Kyhud5NIou6kl7C7kSSQMy1ocjPeGjyc2rKknbeZcS9B7YMjCjjEMLK 0jRd4nuaJ+MQcKd60vR++bfnZyPHN0jEnPyPylIuytnMtqsDAIhFQwck+7Vxr6ZZhWnk EkIumZy4rQuFj3GHLxWPQ2OH5RSVd9IX27lh0VmfTXHuSqrngdjqQfRMIaBH12iqhBdg TQRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JbD7UPsw; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f69si1105290pjg.43.2019.06.10.19.20.44; Mon, 10 Jun 2019 19:20:59 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JbD7UPsw; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390830AbfFKCUJ (ORCPT + 99 others); Mon, 10 Jun 2019 22:20:09 -0400 Received: from mail-qk1-f195.google.com ([209.85.222.195]:41680 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390455AbfFKCUJ (ORCPT ); Mon, 10 Jun 2019 22:20:09 -0400 Received: by mail-qk1-f195.google.com with SMTP id c11so6697685qkk.8 for ; Mon, 10 Jun 2019 19:20:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=HwcJ3r4qabrGVVXT3iY3gOmdfuWxDoWG3l3kjwZI/qg=; b=JbD7UPswwn5ywFpJwjc6MZcPot3MXgCElgt/h9mEcNcNfGh3mRREOcvyQ7IiFQYJnB lR5G4McHWsw+XiZmzwxLMErj5nMRCtfV6b2n6bdg/AlUY2ZZUHUgsxUhorxW0G/oon+y tHYcZ5Mi+pZlLcfe9ylSE0YMjihR8fxQveqpNOQy5y2vnX5svpMXwsth1qchiroLOr2F B/2nOSovSkh3DOAyixuedTleeJHNCw6Tswjw+TStnT1L1OgNQaBVRGV5wouFn5iTfqlJ 14gSvJuBnX+QZHMz2bWHvF1nWjml3tatpZGtFdeD1r3v4Xgzcma4S2QYkrMMI+6JFsNX nQgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=HwcJ3r4qabrGVVXT3iY3gOmdfuWxDoWG3l3kjwZI/qg=; b=Vdkfd2N38Ab7c1eEbtuS2KNMBZ4vsZfXvhW7hmtPXfv+H5Yx7RH8MPeKy2HoUI2vpc o6JRLo+sd4dAdXm3aT/Ml5GHWnL3NJCGlu6iB6BUrxhIk4381QMUgA/YXzlOpXPcV0SF BaXY5Jjrfu3Yt3CooWtBzwC9EGQQhRQ2EjsjShTlCAVI2vd39DSPUXrtnaIp6hh/f+H+ okb5FlvhA2wD1fbb+6aHRbnqWGk8lZbTLAMhn2b2gljM5sNQYXLQmeUcJJUvTVG07Eh/ kw0TaQS0QF+TW3vRJG3W4ozJad9360rOR9SjSAU0h7dSnZd6lco1aHZIo4pD5QQeFxgC 498g== X-Gm-Message-State: APjAAAXTATO1ZiLuLdTHrrmXTtcUys6ZGPH5VU+o/7Zi5MoKRXscjNFZ Ufj83Ls78Y0CVIfmBTl9MXI= X-Received: by 2002:a05:620a:14ba:: with SMTP id x26mr38038141qkj.328.1560219607997; Mon, 10 Jun 2019 19:20:07 -0700 (PDT) Received: from arch-01.home (c-73-132-202-198.hsd1.md.comcast.net. [73.132.202.198]) by smtp.gmail.com with ESMTPSA id o33sm6728345qtk.67.2019.06.10.19.20.06 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 10 Jun 2019 19:20:07 -0700 (PDT) Date: Mon, 10 Jun 2019 22:19:33 -0400 From: Geordan Neukum To: Hao Xu Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] staging: kpc2000: kpc_i2c: remove the macros inb_p and outb_p Message-ID: <20190611021933.GA915@arch-01.home> References: <1560152904-31894-1-git-send-email-haoxu.linuxkernel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1560152904-31894-1-git-send-email-haoxu.linuxkernel@gmail.com> User-Agent: Mutt/1.12.0 (2019-05-25) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 10, 2019 at 03:48:24PM +0800, Hao Xu wrote: > remove inb_p and outb_p to call readq/writeq directly. > > Signed-off-by: Hao Xu > --- > Changes in v2: > - remove the macros inb_p/outb_p and use readq/writeq directly, per https://lkml.kernel.org/lkml/20190608134505.GA963@arch-01.home/ > --- > drivers/staging/kpc2000/kpc2000_i2c.c | 112 ++++++++++++++++------------------ > 1 file changed, 53 insertions(+), 59 deletions(-) > > diff --git a/drivers/staging/kpc2000/kpc2000_i2c.c b/drivers/staging/kpc2000/kpc2000_i2c.c > index 69e8773..246d5b3 100644 > --- a/drivers/staging/kpc2000/kpc2000_i2c.c > +++ b/drivers/staging/kpc2000/kpc2000_i2c.c > @@ -307,28 +301,28 @@ static int i801_block_transaction_byte_by_byte(struct i2c_device *priv, union i2 > else > smbcmd = I801_BLOCK_DATA; > } > - outb_p(smbcmd | ENABLE_INT9, SMBHSTCNT(priv)); > + writeq(smbcmd | ENABLE_INT9, (void *)SMBHSTCNT(priv)); > > if (i == 1) > - outb_p(inb(SMBHSTCNT(priv)) | I801_START, SMBHSTCNT(priv)); > + writeq(inb(SMBHSTCNT(priv)) | I801_START, (void *)SMBHSTCNT(priv)); This inb() call looks like a bug. We perform a 64-bit operation when talking to this hardware register everywhere else in this driver. Anyone have more insight into the hardware with which this driver interacts such that they could shed some light on the subject? Probably a separate issue, but I did notice it as a result of this patch. Thanks, Geordan