Displaying 20 results from an estimated 20 matches for "memparse".
Did you mean:
deparse
2012 Nov 03
1
[PATCH 6/9] virtio_mmio: Cast &resources[1].start to ‘unsigned int *’ to rid compiler warning
...changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
index 6b1b7e1..077e9ca 100644
--- a/drivers/virtio/virtio_mmio.c
+++ b/drivers/virtio/virtio_mmio.c
@@ -531,7 +531,7 @@ static int vm_cmdline_set(const char *device,
resources[0].end = memparse(device, &str) - 1;
processed = sscanf(str, "@%lli:%u%n:%d%n",
- &base, &resources[1].start, &consumed,
+ &base, (unsigned int *)&resources[1].start, &consumed,
&vm_cmdline_id, &consumed);
if (processed < 2 || processed > 3 || str[c...
2012 Nov 03
1
[PATCH 6/9] virtio_mmio: Cast &resources[1].start to ‘unsigned int *’ to rid compiler warning
...changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
index 6b1b7e1..077e9ca 100644
--- a/drivers/virtio/virtio_mmio.c
+++ b/drivers/virtio/virtio_mmio.c
@@ -531,7 +531,7 @@ static int vm_cmdline_set(const char *device,
resources[0].end = memparse(device, &str) - 1;
processed = sscanf(str, "@%lli:%u%n:%d%n",
- &base, &resources[1].start, &consumed,
+ &base, (unsigned int *)&resources[1].start, &consumed,
&vm_cmdline_id, &consumed);
if (processed < 2 || processed > 3 || str[c...
2013 Jul 24
0
[PATCH RESEND 2/3] Btrfs: use u64 for subvolid when parsing mount options
...c int btrfs_parse_early_options(const char *options, fmode_t flags,
}
break;
case Opt_subvolid:
- error = match_int(&args[0], &intarg);
- if (!error) {
- goto out;
- } else if (intarg >= 0) {
+ num = match_strdup(&args[0]);
+ if (num) {
+ *subvol_objectid = memparse(num, NULL);
+ kfree(num);
/* we want the original fs_tree */
- if (!intarg)
+ if (!*subvol_objectid)
*subvol_objectid =
BTRFS_FS_TREE_OBJECTID;
- else
- *subvol_objectid = intarg;
} else {
error = -EINVAL;
goto out;
--
1.8.0.1
--
To unsubscribe from...
2007 Apr 18
1
[PATCH 0/2] Use a single loader for i386 and x86_64
...fd, const struct iovec *iov,
+ unsigned int num, struct device *me);
/* Device-specific data. */
void *priv;
@@ -78,7 +89,7 @@ static int zero_fd;
FIXME: vdso gets mapped just under it, and we need to protect that. */
#define RESERVE_TOP LGUEST_GUEST_TOP - 1024*1024
-static u32 memparse(const char *ptr)
+static unsigned long memparse(const char *ptr)
{
char *end;
unsigned long ret = strtoul(ptr, &end, 0);
@@ -142,8 +153,8 @@ static void map_memory(unsigned long mem
err(1, "Mmaping /dev/zero for %li bytes", mem);
}
-static u32 finish(unsigned long mem, unsi...
2007 Apr 18
1
[PATCH 0/2] Use a single loader for i386 and x86_64
...fd, const struct iovec *iov,
+ unsigned int num, struct device *me);
/* Device-specific data. */
void *priv;
@@ -78,7 +89,7 @@ static int zero_fd;
FIXME: vdso gets mapped just under it, and we need to protect that. */
#define RESERVE_TOP LGUEST_GUEST_TOP - 1024*1024
-static u32 memparse(const char *ptr)
+static unsigned long memparse(const char *ptr)
{
char *end;
unsigned long ret = strtoul(ptr, &end, 0);
@@ -142,8 +153,8 @@ static void map_memory(unsigned long mem
err(1, "Mmaping /dev/zero for %li bytes", mem);
}
-static u32 finish(unsigned long mem, unsi...
2004 Jul 16
1
/proc/xen/memory_target patch
...py_from_user(memstring, buffer, len) < 0)
return -EFAULT;
! endchar = memstring;
! for(i=0; i<len; ++i,++endchar) {
! if (''0''>memstring[i] || memstring[i]>''9'') break;
! }
! if (i==0) return -EBADMSG;
! target = memparse(memstring,&endchar);
! pages = target >> PAGE_SHIFT;
!
! if (pages < current_pages) {
! int change = inflate_balloon(current_pages-pages);
! if (change<0) return change;
!
! current_pages -= change;
! printk("Relinquish %dMB to xen. Domain now...
2011 Nov 15
1
[PATCH] virtio-mmio: Devices parameter parsing
...;%s'!\n", device);
+ continue;
+ }
+
+ /* Get base address */
+ if (kstrtoull(base, 0, &val) != 0) {
+ pr_err("Wrong base in '%s'!\n", device);
+ continue;
+ }
+ resources[1].start = val;
+ resources[1].end = val;
+
+ /* Get size */
+ resources[1].end += memparse(size, &token) - 1;
+ if (size == token || *token) {
+ pr_err("Wrong size in '%s'!\n", device);
+ continue;
+ }
+
+ pr_info("Registering device %d at 0x%x-0x%x, IRQ %u.\n",
+ id, resources[1].start, resources[1].end,
+ resources[0].start);
+
+ platform_d...
2011 Nov 15
1
[PATCH] virtio-mmio: Devices parameter parsing
...;%s'!\n", device);
+ continue;
+ }
+
+ /* Get base address */
+ if (kstrtoull(base, 0, &val) != 0) {
+ pr_err("Wrong base in '%s'!\n", device);
+ continue;
+ }
+ resources[1].start = val;
+ resources[1].end = val;
+
+ /* Get size */
+ resources[1].end += memparse(size, &token) - 1;
+ if (size == token || *token) {
+ pr_err("Wrong size in '%s'!\n", device);
+ continue;
+ }
+
+ pr_info("Registering device %d at 0x%x-0x%x, IRQ %u.\n",
+ id, resources[1].start, resources[1].end,
+ resources[0].start);
+
+ platform_d...
2012 May 09
1
[PATCH] virtio-mmio: Devices parameter parsing
...char *device,
+ const struct kernel_param *kp)
+{
+ int err;
+ struct resource resources[2] = {};
+ char *str;
+ long long int base;
+ int processed, consumed = 0;
+ struct platform_device *pdev;
+
+ resources[0].flags = IORESOURCE_MEM;
+ resources[1].flags = IORESOURCE_IRQ;
+
+ resources[0].end = memparse(device, &str) - 1;
+
+ processed = sscanf(str, "@%lli:%u%n:%d%n",
+ &base, &resources[1].start, &consumed,
+ &vm_cmdline_id, &consumed);
+
+ if (processed < 2 || processed > 3 || str[consumed])
+ return -EINVAL;
+
+ resources[0].start = base;
+ resources...
2012 May 09
1
[PATCH] virtio-mmio: Devices parameter parsing
...char *device,
+ const struct kernel_param *kp)
+{
+ int err;
+ struct resource resources[2] = {};
+ char *str;
+ long long int base;
+ int processed, consumed = 0;
+ struct platform_device *pdev;
+
+ resources[0].flags = IORESOURCE_MEM;
+ resources[1].flags = IORESOURCE_IRQ;
+
+ resources[0].end = memparse(device, &str) - 1;
+
+ processed = sscanf(str, "@%lli:%u%n:%d%n",
+ &base, &resources[1].start, &consumed,
+ &vm_cmdline_id, &consumed);
+
+ if (processed < 2 || processed > 3 || str[consumed])
+ return -EINVAL;
+
+ resources[0].start = base;
+ resources...
2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 07/13] lguest64 loader
...24];
+static struct iovec discard_iov = { .iov_base=buf, .iov_len=sizeof(buf) };
+static int zero_fd;
+
+/* LGUEST_GUEST_TOP defined in Makefile, just below us.
+ FIXME: vdso gets mapped just under it, and we need to protect that. */
+#define RESERVE_TOP LGUEST_GUEST_TOP - 1024*1024
+
+static u32 memparse(const char *ptr)
+{
+ char *end;
+ unsigned long ret = strtoul(ptr, &end, 0);
+
+ switch (*end) {
+ case 'G':
+ case 'g':
+ ret <<= 10;
+ case 'M':
+ case 'm':
+ ret <<= 10;
+ case 'K':
+ case 'k':
+ ret <<= 10;
+ end++;
+ de...
2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 07/13] lguest64 loader
...24];
+static struct iovec discard_iov = { .iov_base=buf, .iov_len=sizeof(buf) };
+static int zero_fd;
+
+/* LGUEST_GUEST_TOP defined in Makefile, just below us.
+ FIXME: vdso gets mapped just under it, and we need to protect that. */
+#define RESERVE_TOP LGUEST_GUEST_TOP - 1024*1024
+
+static u32 memparse(const char *ptr)
+{
+ char *end;
+ unsigned long ret = strtoul(ptr, &end, 0);
+
+ switch (*end) {
+ case 'G':
+ case 'g':
+ ret <<= 10;
+ case 'M':
+ case 'm':
+ ret <<= 10;
+ case 'K':
+ case 'k':
+ ret <<= 10;
+ end++;
+ de...
2007 Apr 18
8
[patch 0/8] Basic infrastructure patches for a paravirtualized kernel
Hi Andrew,
This series of patches lays the basic ground work for the
paravirtualized kernel patches coming later on. I think this lot is
ready for the rough-and-tumble world of the -mm tree.
The main change from the last posting is that all the page-table
related patches have been moved out, and will be posted separately.
Also, the off-by-one in reserving the top of address space has been
2007 Apr 18
8
[patch 0/8] Basic infrastructure patches for a paravirtualized kernel
Hi Andrew,
This series of patches lays the basic ground work for the
paravirtualized kernel patches coming later on. I think this lot is
ready for the rough-and-tumble world of the -mm tree.
The main change from the last posting is that all the page-table
related patches have been moved out, and will be posted separately.
Also, the off-by-one in reserving the top of address space has been
2007 Apr 18
15
[PATCH 0 of 13] Basic infrastructure patches for a paravirtualized kernel
[ REPOST: Apologies to anyone who has seen this before. It
didn't make it onto any of the lists it should have. -J ]
Hi Andrew,
This series of patches lays the basic ground work for the
paravirtualized kernel patches coming later on. I think this lot is
ready for the rough-and-tumble world of the -mm tree.
For the most part, these patches do nothing or very little. The
patches should
2007 Apr 18
15
[PATCH 0 of 13] Basic infrastructure patches for a paravirtualized kernel
[ REPOST: Apologies to anyone who has seen this before. It
didn't make it onto any of the lists it should have. -J ]
Hi Andrew,
This series of patches lays the basic ground work for the
paravirtualized kernel patches coming later on. I think this lot is
ready for the rough-and-tumble world of the -mm tree.
For the most part, these patches do nothing or very little. The
patches should
2011 Aug 23
40
[PATCH 00/21] [RFC] Btrfs: restriper
Hello,
This patch series adds an initial implementation of restriper (it''s a
clever name for relocation framework that allows to do selective profile
changing and selective balancing with some goodies like pausing/resuming
and reporting progress to the user.
Profile changing is global (per-FS) so far, per-subvolume profiles
require some discussion and can be implemented in future.
2011 Jun 02
0
[PATCH] pci: Use pr_<level> and pr_fmt
...nt parameter: %s\n",
- p);
+ pr_err("Can't parse resource_alignment parameter: %s\n",
+ p);
break;
}
}
@@ -3499,8 +3501,7 @@ static int __init pci_setup(char *str)
} else if (!strncmp(str, "hpmemsize=", 10)) {
pci_hotplug_mem_size = memparse(str + 10, &str);
} else {
- printk(KERN_ERR "PCI: Unknown option `%s'\n",
- str);
+ pr_err("Unknown option `%s'\n", str);
}
}
str = k;
diff --git a/drivers/pci/pcie/aer/aer_inject.c b/drivers/pci/pcie/aer/aer_inject.c
index 95489cd..9f4c3fc 1...
2011 Jun 02
0
[PATCH] pci: Use pr_<level> and pr_fmt
...nt parameter: %s\n",
- p);
+ pr_err("Can't parse resource_alignment parameter: %s\n",
+ p);
break;
}
}
@@ -3499,8 +3501,7 @@ static int __init pci_setup(char *str)
} else if (!strncmp(str, "hpmemsize=", 10)) {
pci_hotplug_mem_size = memparse(str + 10, &str);
} else {
- printk(KERN_ERR "PCI: Unknown option `%s'\n",
- str);
+ pr_err("Unknown option `%s'\n", str);
}
}
str = k;
diff --git a/drivers/pci/pcie/aer/aer_inject.c b/drivers/pci/pcie/aer/aer_inject.c
index 95489cd..9f4c3fc 1...
2011 Jun 02
0
[PATCH] pci: Use pr_<level> and pr_fmt
...nt parameter: %s\n",
- p);
+ pr_err("Can't parse resource_alignment parameter: %s\n",
+ p);
break;
}
}
@@ -3499,8 +3501,7 @@ static int __init pci_setup(char *str)
} else if (!strncmp(str, "hpmemsize=", 10)) {
pci_hotplug_mem_size = memparse(str + 10, &str);
} else {
- printk(KERN_ERR "PCI: Unknown option `%s'\n",
- str);
+ pr_err("Unknown option `%s'\n", str);
}
}
str = k;
diff --git a/drivers/pci/pcie/aer/aer_inject.c b/drivers/pci/pcie/aer/aer_inject.c
index 95489cd..9f4c3fc 1...