All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Czerwacki, Eial" <eial.czerwacki@sap.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: "linux-staging@lists.linux.dev" <linux-staging@lists.linux.dev>,
	SAP vSMP Linux Maintainer <linux.vsmp@sap.com>
Subject: Re: [RFC V2] drivers/virt/vSMP: new driver
Date: Tue, 26 Apr 2022 11:58:19 +0000	[thread overview]
Message-ID: <PAXPR02MB7310B471C4AFAE6FCC2D26DF81FB9@PAXPR02MB7310.eurprd02.prod.outlook.com> (raw)
In-Reply-To: <YmVTTvQBSd5nzN3k@kroah.com>

>From: Greg KH <gregkh@linuxfoundation.org>
>Sent: Sunday, April 24, 2022 16:40
>To: Czerwacki, Eial <eial.czerwacki@sap.com>
>Cc: linux-staging@lists.linux.dev <linux-staging@lists.linux.dev>; SAP vSMP Linux Maintainer <linux.vsmp@sap.com>
>Subject: Re: [RFC V2] drivers/virt/vSMP: new driver 
> 
>On Sun, Apr 24, 2022 at 11:44:33AM +0000, Czerwacki, Eial wrote:
[snip]

>> +static struct kobject *vsmp_sysfs_kobj;
>> +static struct pci_dev *vsmp_dev_obj;
>
>static variables are not global :)
>
>And you should not need this, again, use the proper PCI api insted.
>
[snip]

>
>Do not use global data for anything, that's a huge hint that your driver
>is incorrectly written.
>
[snip]

>
>greg k-h

I understand the logic behind that, however, I'm not sure I understand what PCI api I can use to replace such vars?
for example for the pci_dev struct of the device or the sysfs object which is used for the other modules
is there a doc on this I can be pointed to?
as for saving the iomapping, I assume that I should map the bar regions rather than having it mapped all the time, am I right?

Eial

  parent reply	other threads:[~2022-04-26 11:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-24 11:44 [RFC V2] drivers/virt/vSMP: new driver Czerwacki, Eial
2022-04-24 13:40 ` Greg KH
2022-04-24 14:16   ` Czerwacki, Eial
2022-04-26 11:58   ` Czerwacki, Eial [this message]
2022-04-26 12:09     ` Greg KH
2022-04-26 12:25       ` Czerwacki, Eial
2022-04-25 13:22 ` Dan Carpenter
2022-04-25 13:56   ` Czerwacki, Eial

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=PAXPR02MB7310B471C4AFAE6FCC2D26DF81FB9@PAXPR02MB7310.eurprd02.prod.outlook.com \
    --to=eial.czerwacki@sap.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=linux.vsmp@sap.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.