From: Greg KH <gregkh@linuxfoundation.org>
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
Date: Tue, 26 Apr 2022 14:09:43 +0200 [thread overview]
Message-ID: <YmfhB6fTTNNS+HYv@kroah.com> (raw)
In-Reply-To: <PAXPR02MB7310B471C4AFAE6FCC2D26DF81FB9@PAXPR02MB7310.eurprd02.prod.outlook.com>
On Tue, Apr 26, 2022 at 11:58:19AM +0000, Czerwacki, Eial wrote:
> >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?
pci_register_driver() is all you need.
> 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?
I do not understand, why would your driver ever care about any other PCI
device in the system other than the one that you are wishing to be bound
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?
I have no context here, sorry.
thanks,
greg k-h
next prev parent reply other threads:[~2022-04-26 12:09 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
2022-04-26 12:09 ` Greg KH [this message]
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=YmfhB6fTTNNS+HYv@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=eial.czerwacki@sap.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox