Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1696482 > unrolled thread
| Started by | Kees Cook <keescook@chromium.org> |
|---|---|
| First post | 2017-07-25 23:10 +0200 |
| Last post | 2017-07-25 23:10 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH] proc: Remove cast from memory allocation Kees Cook <keescook@chromium.org> - 2017-07-25 23:10 +0200
| From | Kees Cook <keescook@chromium.org> |
|---|---|
| Date | 2017-07-25 23:10 +0200 |
| Subject | Re: [PATCH] proc: Remove cast from memory allocation |
| Message-ID | <u7ffB-82I-61@gated-at.bofh.it> |
On Tue, Feb 21, 2017 at 10:42 PM, Tobin C. Harding <me@tobin.cc> wrote: > Coccinelle emits WARNING: casting value returned by memory allocation > function to (struct proc_inode *) is useless. > > Remove unnecessary cast. > > Signed-off-by: Tobin C. Harding <me@tobin.cc> Acked-by: Kees Cook <keescook@chromium.org> -Kees > --- > fs/proc/inode.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/proc/inode.c b/fs/proc/inode.c > index 842a5ff..1eb2326 100644 > --- a/fs/proc/inode.c > +++ b/fs/proc/inode.c > @@ -57,7 +57,7 @@ static struct inode *proc_alloc_inode(struct super_block *sb) > struct proc_inode *ei; > struct inode *inode; > > - ei = (struct proc_inode *)kmem_cache_alloc(proc_inode_cachep, GFP_KERNEL); > + ei = kmem_cache_alloc(proc_inode_cachep, GFP_KERNEL); > if (!ei) > return NULL; > ei->pid = NULL; > -- > 2.7.4 > -- Kees Cook Pixel Security
Back to top | Article view | linux.kernel
csiph-web