Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3400807ybi; Mon, 10 Jun 2019 09:36:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqxFhhy9lm3amOtWmLpykhfru0U7+FBRAEBmgPEz2W+9POn2aQ56ISglS4rPMTZ97qVXMFLp X-Received: by 2002:a63:1f11:: with SMTP id f17mr16577849pgf.311.1560184617288; Mon, 10 Jun 2019 09:36:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560184617; cv=none; d=google.com; s=arc-20160816; b=XHTFoeF3PsE5jFi4dHokyyz9MBPhMnQCsJHm/tHj+GirBa5hSECGPMHBUbT+EZzJVu MyCQIk0TBvRZ41oIbvzXrAV4pabqThiE7EEwdw/02MAAGPMUnfVtVHuM5+QODS7DpIuL s8KYdZJyRFfziw/KOFLPGT112+A1xwutoF3Zf0frGCjo5lFA8CFUN0Pk92H1odaSPA6w 1zTzANMvpQQ3Bjpy61C752HqvrBi4V5eFEMdB/NpS7iX2J5b+7rv/9Qd4E8CbDxqDhyW A/m24vGsemQcBh5vN5i6ena/RgO9Q8JkbL2JNgSzWuGWpDuwlVyPpbgN8sI/ntpwoyzv JD1w== 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=SPd5Y+n7Mku2AYQH6DOHHYhT36cvT/0PlFk8id99mVQ=; b=VB5yv28F3z5TH5dhRTUGc5+TvL4s+gvDDeEmSDc6m+r74h5+EDAHzir6XZ5v0ApsO7 Hr+rdLgOmXe5FIXaguxXCx20UJwXnnI66P730T+lFvh4y7thJonhwWfo+4/qWFYBA8Sn jhS2hVm7Q86kIPoKiVWbERDyMl6y/qdgNmA4bdlVz6IkxI9ii44eJVkjdDLM+gpFnfzf 1y4nRH12lBdvKqXQJX/r/b9O/jn+0KMD2EgfyvM7+L+Ym0MmgBBV/434y7ttJmV4VnrK m0Gt+JDeftoiRYeidq2GXY0usTkWpI5PlZvkLrA9leJcMl0Tal89dm2KwKrZOM/rfUdd 59Uw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tn8ocLbt; 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 70si10849831pla.2.2019.06.10.09.36.42; Mon, 10 Jun 2019 09:36:57 -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=@kernel.org header.s=default header.b=tn8ocLbt; 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 S2391323AbfFJPw2 (ORCPT + 99 others); Mon, 10 Jun 2019 11:52:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:35030 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390550AbfFJPw2 (ORCPT ); Mon, 10 Jun 2019 11:52:28 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 070FC20645; Mon, 10 Jun 2019 15:52:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560181947; bh=S3Obzl9/JbERIVLJS+8FiZLzxXxktH57EXPHyk4KrWU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tn8ocLbtJ1owt61rmDtkXtCsozbgkupVgQ6ub8pBef5Q8gjH9+KqOm95BozK5NuuR UdBYr5jYXTP2B9WsplBeCCUnNHFwlyiNF74AHRdPVu+rkcdzHFTxTrZf1oGENnwJT8 WuLuwi3mE6XbGdx/ejXGqPDTsLidfekmxXnMeOt4= Date: Mon, 10 Jun 2019 17:52:25 +0200 From: Greg KH To: Hao Xu Cc: devel@driverdev.osuosl.org, gneukum1@gmail.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] staging: kpc2000: kpc_i2c: remove the macros inb_p and outb_p Message-ID: <20190610155225.GB29035@kroah.com> 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 > @@ -122,12 +122,6 @@ struct i2c_device { > /* Not really a feature, but it's convenient to handle it as such */ > #define FEATURE_IDF BIT(15) > > -// FIXME! > -#undef inb_p > -#define inb_p(a) readq((void *)a) > -#undef outb_p > -#define outb_p(d, a) writeq(d, (void *)a) > - > /* Make sure the SMBus host is ready to start transmitting. > * Return 0 if it is, -EBUSY if it is not. > */ > @@ -135,7 +129,7 @@ static int i801_check_pre(struct i2c_device *priv) > { > int status; > > - status = inb_p(SMBHSTSTS(priv)); > + status = readq((void *)SMBHSTSTS(priv)); Ugh, all of the void * casting, is is really needed everywhere? That just makes everything a mess... thanks, greg k-h