[PATCH] staging: unisys: added virtpci info entry

2014-07-16 Thread Erik Arfvidson
This patch adds the virtpci debugfs directory and the info entry inside of it. Signed-off-by: Erik Arfvidson erik.arfvid...@unisys.com Signed-off-by: Benjamin Romer benjamin.ro...@unisys.com --- v6: Edit version description and add MAX_BUF documentation v5: Adjusted comments and formatting,

[PATCH] staging: unisys: added virtpci info entry

2014-07-15 Thread Erik Arfvidson
This patch adds the virtpci debugfs directory and the info entry inside of it. Signed-off-by: Erik Arfvidson erik.arfvid...@unisys.com Signed-off-by: Benjamin Romer benjamin.ro...@unisys.com --- v4: Fixed comments, upper bound buffer, removed #define for virtpci and info, modified printvbus

Re: [PATCH] staging: unisys: added virtpci info entry

2014-07-15 Thread Greg KH
On Tue, Jul 15, 2014 at 10:36:43AM -0400, Erik Arfvidson wrote: This patch adds the virtpci debugfs directory and the info entry inside of it. Signed-off-by: Erik Arfvidson erik.arfvid...@unisys.com Signed-off-by: Benjamin Romer benjamin.ro...@unisys.com --- v4: Fixed comments, upper bound

Re: [PATCH] staging: unisys: added virtpci info entry

2014-07-15 Thread Erik Arfvidson
On 07/15/2014 10:45 AM, Greg KH wrote: [SNIP] +#define MAX_BUF 16384 Lovely magic number, care to explain why this is this size? Assuming we have the maximum possible configuration: 4 busses, 32 devices per bus, and we assume max of 80 characters per linegives us 10,560 bytes which rounds up

[PATCH] staging: unisys: added virtpci info entry

2014-07-15 Thread Erik Arfvidson
This patch adds the virtpci debugfs directory and the info entry inside of it. Signed-off-by: Erik Arfvidson erik.arfvid...@unisys.com Signed-off-by: Benjamin Romer benjamin.ro...@unisys.com --- v5: Adjusted comments and formatting, remove unused function v4: Fixed comments, upper bound buffer,

Re: [PATCH] staging: unisys: added virtpci info entry

2014-07-15 Thread Greg KH
On Tue, Jul 15, 2014 at 11:31:03AM -0400, Erik Arfvidson wrote: On 07/15/2014 10:45 AM, Greg KH wrote: [SNIP] +#define MAX_BUF 16384 Lovely magic number, care to explain why this is this size? Assuming we have the maximum possible configuration: 4 busses, 32 devices per bus, and we

Re: [PATCH] staging: unisys: added virtpci info entry

2014-07-15 Thread Greg KH
On Tue, Jul 15, 2014 at 11:38:16AM -0400, Erik Arfvidson wrote: This patch adds the virtpci debugfs directory and the info entry inside of it. Signed-off-by: Erik Arfvidson erik.arfvid...@unisys.com Signed-off-by: Benjamin Romer benjamin.ro...@unisys.com --- v5: Adjusted comments and

Re: [PATCH] staging: unisys: added virtpci info entry

2014-07-14 Thread Erik Arfvidson
On 07/11/2014 08:09 PM, Greg KH wrote: [snip] + if (!vbuf) + return -ENOMEM; + + str_pos += scnprintf(vbuf + str_pos, len - str_pos, +Virtual PCI Bus devices\n); Why the leading ' '? It's the formatting the original author chose to output the

Re: [PATCH] staging: unisys: added virtpci info entry

2014-07-12 Thread Dan Carpenter
On Fri, Jul 11, 2014 at 07:11:45PM -0400, Erik Arfvidson wrote: +static int print_vbus(struct device *vbus, void *data) +{ + struct print_vbus_info *p = (struct print_vbus_info *)data; + + *p-length += sprintf(p-buf + *p-length, bus_id:%s\n, +

[PATCH] staging: unisys: added virtpci info entry

2014-07-11 Thread Erik Arfvidson
This patch adds the virtpci debugfs directory and the info entry inside of it. Signed-off-by: Erik Arfvidson erik.arfvid...@unisys.com Signed-off-by: Benjamin Romer benjamin.ro...@unisys.com --- v3: Fixed formating and comments. Also added debufs_remove_recursive() and simple

Re: [PATCH] staging: unisys: added virtpci info entry

2014-07-11 Thread Greg KH
On Fri, Jul 11, 2014 at 07:11:45PM -0400, Erik Arfvidson wrote: This patch adds the virtpci debugfs directory and the info entry inside of it. Signed-off-by: Erik Arfvidson erik.arfvid...@unisys.com Signed-off-by: Benjamin Romer benjamin.ro...@unisys.com --- v3: Fixed formating and

[PATCH] staging: unisys: added virtpci info entry

2014-07-10 Thread Erik Arfvidson
This patch adds the virtpci debugfs directory and the info entry inside of it. Signed-off-by: Erik Arfvidson erik.arfvid...@unisys.com --- drivers/staging/unisys/virtpci/virtpci.c | 123 ++- 1 file changed, 119 insertions(+), 4 deletions(-) diff --git

Re: [PATCH] staging: unisys: added virtpci info entry

2014-07-10 Thread Dan Carpenter
On Thu, Jul 10, 2014 at 02:45:12PM -0400, Erik Arfvidson wrote: + str_pos += snprintf(vbuf + str_pos, len - str_pos, \n); + if (copy_to_user(buf, vbuf, str_pos)) { The length checking here still isn't correct. snprintf() returns the number of bytes which would have been printed if

Re: [PATCH] staging: unisys: added virtpci info entry

2014-07-10 Thread Greg KH
On Thu, Jul 10, 2014 at 02:45:12PM -0400, Erik Arfvidson wrote: This patch adds the virtpci debugfs directory and the info entry inside of it. Signed-off-by: Erik Arfvidson erik.arfvid...@unisys.com --- drivers/staging/unisys/virtpci/virtpci.c | 123 ++- 1