search for: kvasprintf

Displaying 19 results from an estimated 19 matches for "kvasprintf".

Did you mean: kasprintf
2020 Feb 07
3
[PATCH 2/6] drm: Add drm_simple_encoder_{init,create}()
...int drm_simple_encoder_init(struct drm_device *dev, > + struct drm_encoder *encoder, > + int encoder_type, const char *name, ...) > +{ > + char *namestr = NULL; > + int ret; > + > + if (name) { > + va_list ap; > + > + va_start(ap, name); > + namestr = kvasprintf(GFP_KERNEL, name, ap); > + va_end(ap); > + if (!namestr) > + return -ENOMEM; > + } > + > + ret = __drm_encoder_init(dev, encoder, > + &drm_simple_encoder_funcs_cleanup, > + encoder_type, namestr); > + if (ret) > + goto err_kfree; > + > + return 0...
2020 Feb 07
3
[PATCH 2/6] drm: Add drm_simple_encoder_{init,create}()
...int drm_simple_encoder_init(struct drm_device *dev, > + struct drm_encoder *encoder, > + int encoder_type, const char *name, ...) > +{ > + char *namestr = NULL; > + int ret; > + > + if (name) { > + va_list ap; > + > + va_start(ap, name); > + namestr = kvasprintf(GFP_KERNEL, name, ap); > + va_end(ap); > + if (!namestr) > + return -ENOMEM; > + } > + > + ret = __drm_encoder_init(dev, encoder, > + &drm_simple_encoder_funcs_cleanup, > + encoder_type, namestr); > + if (ret) > + goto err_kfree; > + > + return 0...
2020 Feb 07
0
[PATCH 2/6] drm: Add drm_simple_encoder_{init,create}()
...rns: + * Zero on success, error code on failure. + */ +int drm_simple_encoder_init(struct drm_device *dev, + struct drm_encoder *encoder, + int encoder_type, const char *name, ...) +{ + char *namestr = NULL; + int ret; + + if (name) { + va_list ap; + + va_start(ap, name); + namestr = kvasprintf(GFP_KERNEL, name, ap); + va_end(ap); + if (!namestr) + return -ENOMEM; + } + + ret = __drm_encoder_init(dev, encoder, + &drm_simple_encoder_funcs_cleanup, + encoder_type, namestr); + if (ret) + goto err_kfree; + + return 0; + +err_kfree: + if (name) + kfree(namestr); + return ret;...
2020 Feb 07
1
[PATCH 2/6] drm: Add drm_simple_encoder_{init,create}()
...GFP_KERNEL); The encoder can outlive the devres if the device is unbound when userspace has open fds, so you can't use devm_ here. Noralf. > + if (!encoder) > + return ERR_PTR(-ENOMEM); > + > + if (name) { > + va_list ap; > + > + va_start(ap, name); > + namestr = kvasprintf(GFP_KERNEL, name, ap); > + va_end(ap); > + if (!namestr) { > + ret = -ENOMEM; > + goto err_devm_kfree; > + } > + } > + > + ret = __drm_encoder_init(dev, encoder, > + &drm_simple_encoder_funcs_destroy, > + encoder_type, namestr); > + if (ret) >...
2020 Feb 07
0
[PATCH 2/6] drm: Add drm_simple_encoder_{init,create}()
...e *dev, >> + struct drm_encoder *encoder, >> + int encoder_type, const char *name, ...) >> +{ >> + char *namestr = NULL; >> + int ret; >> + >> + if (name) { >> + va_list ap; >> + >> + va_start(ap, name); >> + namestr = kvasprintf(GFP_KERNEL, name, ap); >> + va_end(ap); >> + if (!namestr) >> + return -ENOMEM; >> + } >> + >> + ret = __drm_encoder_init(dev, encoder, >> + &drm_simple_encoder_funcs_cleanup, >> + encoder_type, namestr); >> + if (ret) >> +...
2012 Jan 21
1
[PATCH] include/checkpatch: Prefer __scanf to __attribute__((format(scanf, ...)
...__maybe_unused __attribute__((unused)) diff --git a/include/linux/kernel.h b/include/linux/kernel.h index e834342..30f21ec 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -315,10 +315,10 @@ extern __printf(2, 3) char *kasprintf(gfp_t gfp, const char *fmt, ...); extern char *kvasprintf(gfp_t gfp, const char *fmt, va_list args); -extern int sscanf(const char *, const char *, ...) - __attribute__ ((format (scanf, 2, 3))); -extern int vsscanf(const char *, const char *, va_list) - __attribute__ ((format (scanf, 2, 0))); +extern __scanf(2, 3) +int sscanf(const char *, const char *,...
2012 Jan 21
1
[PATCH] include/checkpatch: Prefer __scanf to __attribute__((format(scanf, ...)
...__maybe_unused __attribute__((unused)) diff --git a/include/linux/kernel.h b/include/linux/kernel.h index e834342..30f21ec 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -315,10 +315,10 @@ extern __printf(2, 3) char *kasprintf(gfp_t gfp, const char *fmt, ...); extern char *kvasprintf(gfp_t gfp, const char *fmt, va_list args); -extern int sscanf(const char *, const char *, ...) - __attribute__ ((format (scanf, 2, 3))); -extern int vsscanf(const char *, const char *, va_list) - __attribute__ ((format (scanf, 2, 0))); +extern __scanf(2, 3) +int sscanf(const char *, const char *,...
2020 Feb 07
11
[PATCH 0/6] drm: Provide a simple encoder
Many DRM drivers implement an encoder with an empty implementation. This patchset adds drm_simple_encoder_init() and drm_simple_encoder_create(), which can be used by drivers instead. Except for the destroy callback, the simple encoder's implementation is empty. The patchset also converts 4 encoder instances to use the simple-encoder helpers. But there are at least 11 other drivers which can
2012 Dec 13
7
HVM bug: system crashes after offline online a vcpu
...t;] ? unbind_from_irq+0x147/0x159 [ 28.224050] [<ffffffff8104dd7c>] ? warn_slowpath_common+0x77/0xa3 [ 28.224050] [<ffffffff8104de04>] ? warn_slowpath_fmt+0x51/0x59 [ 28.224050] [<ffffffff810e4493>] ? get_partial_node+0x15/0x85 [ 28.224050] [<ffffffff811966fd>] ? kvasprintf+0x41/0x68 [ 28.224050] [<ffffffff8109639e>] ? dynamic_irq_cleanup_x+0x4b/0xc2 [ 28.224050] [<ffffffff811ef131>] ? unbind_from_irq+0x147/0x159 [ 28.224050] [<ffffffff811ef5b7>] ? bind_virq_to_irqhandler+0x14c/0x15d [ 28.224050] [<ffffffff8100df77>] ? xen_timer_int...
2007 May 11
30
[patch 00/28]xen: Xen implementation for paravirt_ops
Hi Andi, This series of patches implements the Xen paravirt-ops interface. It applies to 2.6.21-git13 + patches-2.6.21-git7-070507-1.tar.gz (I think "unwinder" is the only patch which doesn't apply to git13, and the sched-clock patches are the only ones which this series actually needs). Changes since the last posting: - More netfront review and cleanup - Added ability to
2007 May 11
30
[patch 00/28]xen: Xen implementation for paravirt_ops
Hi Andi, This series of patches implements the Xen paravirt-ops interface. It applies to 2.6.21-git13 + patches-2.6.21-git7-070507-1.tar.gz (I think "unwinder" is the only patch which doesn't apply to git13, and the sched-clock patches are the only ones which this series actually needs). Changes since the last posting: - More netfront review and cleanup - Added ability to
2007 May 11
30
[patch 00/28]xen: Xen implementation for paravirt_ops
Hi Andi, This series of patches implements the Xen paravirt-ops interface. It applies to 2.6.21-git13 + patches-2.6.21-git7-070507-1.tar.gz (I think "unwinder" is the only patch which doesn't apply to git13, and the sched-clock patches are the only ones which this series actually needs). Changes since the last posting: - More netfront review and cleanup - Added ability to
2007 May 22
35
[patch 00/33] xen: Xen paravirt_ops implementation
Hi, This is the Xen implementation for the paravirt_ops interface. The series is based on 2.6.22-rc1-mm1, and I think its ready to be cooked in -mm with a view to being merged in 2.6.23. The first part of the series is some small changes to the core kernel. Apart from the new code added in "Allocate and free vmalloc areas" (posted many times before), they are simply a few one-liners
2007 May 22
35
[patch 00/33] xen: Xen paravirt_ops implementation
Hi, This is the Xen implementation for the paravirt_ops interface. The series is based on 2.6.22-rc1-mm1, and I think its ready to be cooked in -mm with a view to being merged in 2.6.23. The first part of the series is some small changes to the core kernel. Apart from the new code added in "Allocate and free vmalloc areas" (posted many times before), they are simply a few one-liners
2007 May 22
35
[patch 00/33] xen: Xen paravirt_ops implementation
Hi, This is the Xen implementation for the paravirt_ops interface. The series is based on 2.6.22-rc1-mm1, and I think its ready to be cooked in -mm with a view to being merged in 2.6.23. The first part of the series is some small changes to the core kernel. Apart from the new code added in "Allocate and free vmalloc areas" (posted many times before), they are simply a few one-liners
2007 May 04
31
[patch 00/29] xen: Xen implementation for paravirt_ops
Hi Andi, This series of patches implements the Xen paravirt-ops interface. It applies to 2.6.21-git3 + ff patches-2.6.21-git3-070501-1.tar.gz. Changes since the last posting: - reviews of xenbus (me), netfront (hch, rusty, herbert xu) and blockfront (hch), with most comments addressed. Netfront review revealed a couple of real bugs, and the code for all three is looking cleaner
2007 May 04
31
[patch 00/29] xen: Xen implementation for paravirt_ops
Hi Andi, This series of patches implements the Xen paravirt-ops interface. It applies to 2.6.21-git3 + ff patches-2.6.21-git3-070501-1.tar.gz. Changes since the last posting: - reviews of xenbus (me), netfront (hch, rusty, herbert xu) and blockfront (hch), with most comments addressed. Netfront review revealed a couple of real bugs, and the code for all three is looking cleaner
2007 Apr 29
33
[patch 00/32] xen: Xen implementation for paravirt_ops
Hi Andi, This series of patches implements the Xen paravirt-ops interface. It applies to 2.6.21 + 2.6.21-070428-1 + the patches I've posted over the last couple of days. Changes since the last posting: - update per review comments - comment each file - comment barrier use - use common cpu sibling setup - fixed a few minor bugs, specifically a traceirq mismatch warning - some
2007 Apr 29
33
[patch 00/32] xen: Xen implementation for paravirt_ops
Hi Andi, This series of patches implements the Xen paravirt-ops interface. It applies to 2.6.21 + 2.6.21-070428-1 + the patches I've posted over the last couple of days. Changes since the last posting: - update per review comments - comment each file - comment barrier use - use common cpu sibling setup - fixed a few minor bugs, specifically a traceirq mismatch warning - some