Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1012600ybi; Wed, 19 Jun 2019 11:47:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqxd+qKvwPAxZwzC1RisPG+D3dI2fz45si/zaF9yaFfpPJGfAbIBTeBQO993UQSg+F59cLq2 X-Received: by 2002:a17:902:61:: with SMTP id 88mr41506918pla.50.1560970066797; Wed, 19 Jun 2019 11:47:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560970066; cv=none; d=google.com; s=arc-20160816; b=mUOWJrHdnKuoAoCy1XsHsyXZxRd42jk/oaAhh02Vr4rsy0VEHGYvhiXpaUWPrVaj7P 5grY3tQ2vkySstyyf4WuGsEhpIfHZgq6QO8Eorzuw0YQ5Rjw2ZtqH38fYwoNakX280PN jA8ANboyUBjYhifW0Si2jClmc9+frAu+bKESInBuRpWQIRtqpeUC/XjTWAogdirbM1Ze 2FoQo1W+gOVHoTzcw9kVSsPStuRf8ABZTTgoXwEIONhHvOosd3RriQbNBcyy7Vvc0uVX 3glhMR1HFbheyOpycfgZAj7ITDlzsM3lETPMeZ994bj/LBXVXF7KwgzWiMbrV7NZQE4s Yebg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dkim-signature; bh=gA4iP3Dal7CMDgIEIiKlLJQb/ozg2j3g2x2kx2O3zEA=; b=srG5A2G48PP+6aFjkCyjZg+u0r+1BJ5E5VTZjXstDdjBdwQDQkKn8IMbYSEdSuzSsk a5XBvSiUHnrN5dNtu/nOHJyt5Z2Ny+bis/UeNPePMi/Qu+JMBt+OPFtJXA4tRkGkGyyp komDzAD3x59V45UesjaxaUlfyOrN/vK7z2zFNQ1zOWEN522SonwgmbdCXo9DiyRLgfMY JbDMABumSNjXXsXCejSG9j1tVos9C2ZU9LhkJkyuHJsyYYXzaDkpZAsxyItl7u2EzJsh 8BrZXFwFm8bAkqX7yGdRohG0Ez6VBKlMSdFqBTE8bZn8IOTjWsOPsS13/Ep3o+7EnRTf cA/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=aY5pH4Uo; 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 27si3850184pgn.43.2019.06.19.11.47.30; Wed, 19 Jun 2019 11:47:46 -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=@linuxfoundation.org header.s=google header.b=aY5pH4Uo; 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 S1730278AbfFSSq6 (ORCPT + 99 others); Wed, 19 Jun 2019 14:46:58 -0400 Received: from mail-io1-f65.google.com ([209.85.166.65]:44145 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730134AbfFSSq5 (ORCPT ); Wed, 19 Jun 2019 14:46:57 -0400 Received: by mail-io1-f65.google.com with SMTP id s7so306502iob.11 for ; Wed, 19 Jun 2019 11:46:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=gA4iP3Dal7CMDgIEIiKlLJQb/ozg2j3g2x2kx2O3zEA=; b=aY5pH4UoNncWtP3OUZG8/Cl7YuHgSRVusXJkDYEwRpZUhpRKo/NnIceURFC47Ws+DN X3WNVpUDWACtolFlcgecsZA/XusiosJ8mFXcoFzNsBzxXDqX0xofhrvlWOeRQeB9H8BZ aoo8m81BgRSumyR3HZzuWZ20r3TgOJQM7wD5s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=gA4iP3Dal7CMDgIEIiKlLJQb/ozg2j3g2x2kx2O3zEA=; b=Q2vn6i9/HNZ5tOdro4qVU79Wd9i0Kst6tL3O+aQWIyigDavYizDWY3IerxMSv/cPHr hDJ4nbK+eu/Oe1uXTpctaVg6NQDQF5GyWqASihLFtL3A6GL4AuSCjHknUO3jqZ1CvKQe +g+JivPaZMXeDoW/xmC47XDt9G0kadYAO2056BrzmFRUZ2eaPksXXfBzstHgMsF4YvnT kLHagSqVTeUsqjR2vxdbHbt0R+JtsZmQbZdBJxZaI9HA/ZrawvyLunR/RS4QOeIBhMKx cdQiTmkAlt6AxWZcnyqHzvobSruy0qVAX6fRZKjLGqop2zBNUCa/q9E8h3RsI1Lu82Mn Pe2w== X-Gm-Message-State: APjAAAX9olMoZ8WCseSvuaTKuvkbmHvaHtqbKxLps5ayrGWKEbgmrRKp Blch2SxCx3CstsP88U17iGb8/Q== X-Received: by 2002:a02:84e6:: with SMTP id f93mr1573091jai.73.1560970016826; Wed, 19 Jun 2019 11:46:56 -0700 (PDT) Received: from [192.168.1.112] (c-24-9-64-241.hsd1.co.comcast.net. [24.9.64.241]) by smtp.gmail.com with ESMTPSA id f4sm18272367iok.56.2019.06.19.11.46.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Jun 2019 11:46:56 -0700 (PDT) Subject: Re: Fwd: [PATCH] net: fddi: skfp: Include generic PCI definitions from pci_regs.h To: Puranjay Mohan , Bjorn Helgaas , linux-kernel-mentees@lists.linuxfoundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Shuah Khan References: <20190619174556.21194-1-puranjay12@gmail.com> <20190619182122.GA4827@arch> From: Shuah Khan Message-ID: <330fefa3-5301-42b8-4e59-cd0b743e8220@linuxfoundation.org> Date: Wed, 19 Jun 2019 12:46:55 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/19/19 12:31 PM, Puranjay Mohan wrote: > On Wed, Jun 19, 2019 at 12:04:19PM -0600, Shuah Khan wrote: >> On 6/19/19 11:45 AM, Puranjay Mohan wrote: >>> Include the generic PCI definitions from include/uapi/linux/pci_regs.h >>> change PCI_REV_ID to PCI_REVISION_ID to make it compatible with the >>> generic define. >>> This driver uses only one generic PCI define. >>> >>> Signed-off-by: Puranjay Mohan >>> --- >>> drivers/net/fddi/skfp/drvfbi.c | 3 ++- >>> 1 file changed, 2 insertions(+), 1 deletion(-) >>> >>> diff --git a/drivers/net/fddi/skfp/drvfbi.c b/drivers/net/fddi/skfp/drvfbi.c >>> index bdd5700e71fa..38f6d943385d 100644 >>> --- a/drivers/net/fddi/skfp/drvfbi.c >>> +++ b/drivers/net/fddi/skfp/drvfbi.c >>> @@ -20,6 +20,7 @@ >>> #include "h/supern_2.h" >>> #include "h/skfbiinc.h" >>> #include >>> +#include >>> #ifndef lint >>> static const char ID_sccs[] = "@(#)drvfbi.c 1.63 99/02/11 (C) SK " ; >>> @@ -127,7 +128,7 @@ static void card_start(struct s_smc *smc) >>> * at very first before any other initialization functions is >>> * executed. >>> */ >>> - rev_id = inp(PCI_C(PCI_REV_ID)) ; >>> + rev_id = inp(PCI_C(PCI_REVISION_ID)) ; >>> if ((rev_id & 0xf0) == SK_ML_ID_1 || (rev_id & 0xf0) == SK_ML_ID_2) { >>> smc->hw.hw_is_64bit = TRUE ; >>> } else { >>> >> >> Why not delete the PCI_REV_ID define in: >> >> drivers/net/fddi/skfp/h/skfbi.h >> > I have removed all generic PCI definitions from skfbi.h in the next > patch which I have sent, I wanted to keep it organised by sending two > patches > Yeah. I saw your second patch come in after I sent my response. :) >> It looks like this header has duplicate PCI config space header defines, >> not just this one. Some of them are slightly different names: >> >> e.g: >> >> #define PCI_CACHE_LSZ 0x0c /* 8 bit Cache Line Size */ >> >> Looks like it defines the standard PCI config space instead of >> including and using the standard defines from uapi/linux/pci_regs.h >> > It defines many duplicate definitions in skfbi.h, but only uses one of > them, hence they are removed in the next patch as told by bjorn. > It uses only one generic PCI define in driver code, i.e. PCI_REV_ID, it > has been replaced by PCI_REVISION_ID to make it work with the define > included with uapi/linux/pci_regs.h >> Something to look into. >> Sounds like a plan. thanks, -- Shuah