* [PATCH 1/1] fs/binfmt_elf.c: fill_note_info: Reduce scope of a variable
@ 2013-09-27 12:58 Geyslan G. Bem
0 siblings, 0 replies; 3+ messages in thread
From: Geyslan G. Bem @ 2013-09-27 12:58 UTC (permalink / raw)
To: viro; +Cc: linux-fsdevel, linux-kernel, Geyslan G. Bem
The *t variable in the fill_note_info function is only used if
siginfo->si_signo isn't 0. Moving "t" pointer to that inner scope.
Tested.
Signed-off-by: Geyslan G. Bem <geyslan@gmail.com>
---
fs/binfmt_elf.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index 100edcc..d0ac15b 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -1848,12 +1848,11 @@ static int fill_note_info(struct elfhdr *elf, int phdrs,
struct elf_note_info *info,
siginfo_t *siginfo, struct pt_regs *regs)
{
- struct list_head *t;
-
if (!elf_note_info_init(info))
return 0;
if (siginfo->si_signo) {
+ struct list_head *t;
struct core_thread *ct;
struct elf_thread_status *ets;
--
1.8.4
^ permalink raw reply [flat|nested] 3+ messages in thread* [PATCH] 9p: remove unused 'p9_fid' struct pointer
@ 2013-09-28 23:32 Geyslan G. Bem
2013-09-28 23:32 ` [PATCH 1/1] fs/binfmt_elf.c: fill_note_info: Reduce scope of a variable Geyslan G. Bem
0 siblings, 1 reply; 3+ messages in thread
From: Geyslan G. Bem @ 2013-09-28 23:32 UTC (permalink / raw)
To: ericvh, rminnich, lucho; +Cc: v9fs-developer, linux-kernel, Geyslan G. Bem
Get rid of the useless '*fid' variable.
Signed-off-by: Geyslan G. Bem <geyslan@gmail.com>
---
fs/9p/cache.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/9p/cache.c b/fs/9p/cache.c
index a9ea73d..50f9d9c 100644
--- a/fs/9p/cache.c
+++ b/fs/9p/cache.c
@@ -239,13 +239,12 @@ void v9fs_cache_inode_flush_cookie(struct inode *inode)
void v9fs_cache_inode_set_cookie(struct inode *inode, struct file *filp)
{
struct v9fs_inode *v9inode = V9FS_I(inode);
- struct p9_fid *fid;
if (!v9inode->fscache)
return;
spin_lock(&v9inode->fscache_lock);
- fid = filp->private_data;
+
if ((filp->f_flags & O_ACCMODE) != O_RDONLY)
v9fs_cache_inode_flush_cookie(inode);
else
--
1.8.4
^ permalink raw reply [flat|nested] 3+ messages in thread* [PATCH 1/1] fs/binfmt_elf.c: fill_note_info: Reduce scope of a variable
2013-09-28 23:32 [PATCH] 9p: remove unused 'p9_fid' struct pointer Geyslan G. Bem
@ 2013-09-28 23:32 ` Geyslan G. Bem
2013-09-28 23:42 ` Geyslan Gregório Bem
0 siblings, 1 reply; 3+ messages in thread
From: Geyslan G. Bem @ 2013-09-28 23:32 UTC (permalink / raw)
To: ericvh, rminnich, lucho; +Cc: v9fs-developer, linux-kernel, Geyslan G. Bem
The *t variable in the fill_note_info function is only used if
siginfo->si_signo isn't 0. Moving "t" pointer to that inner scope.
Tested.
Signed-off-by: Geyslan G. Bem <geyslan@gmail.com>
---
fs/binfmt_elf.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index 100edcc..d0ac15b 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -1848,12 +1848,11 @@ static int fill_note_info(struct elfhdr *elf, int phdrs,
struct elf_note_info *info,
siginfo_t *siginfo, struct pt_regs *regs)
{
- struct list_head *t;
-
if (!elf_note_info_init(info))
return 0;
if (siginfo->si_signo) {
+ struct list_head *t;
struct core_thread *ct;
struct elf_thread_status *ets;
--
1.8.4
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH 1/1] fs/binfmt_elf.c: fill_note_info: Reduce scope of a variable
2013-09-28 23:32 ` [PATCH 1/1] fs/binfmt_elf.c: fill_note_info: Reduce scope of a variable Geyslan G. Bem
@ 2013-09-28 23:42 ` Geyslan Gregório Bem
0 siblings, 0 replies; 3+ messages in thread
From: Geyslan Gregório Bem @ 2013-09-28 23:42 UTC (permalink / raw)
To: ericvh, rminnich, lucho; +Cc: v9fs-developer, linux-kernel, Geyslan G. Bem
Please, disconsider this e-mail.
Geyslan Gregório Bem
hackingbits.com
2013/9/28 Geyslan G. Bem <geyslan@gmail.com>:
> The *t variable in the fill_note_info function is only used if
> siginfo->si_signo isn't 0. Moving "t" pointer to that inner scope.
>
> Tested.
>
> Signed-off-by: Geyslan G. Bem <geyslan@gmail.com>
> ---
> fs/binfmt_elf.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
> index 100edcc..d0ac15b 100644
> --- a/fs/binfmt_elf.c
> +++ b/fs/binfmt_elf.c
> @@ -1848,12 +1848,11 @@ static int fill_note_info(struct elfhdr *elf, int phdrs,
> struct elf_note_info *info,
> siginfo_t *siginfo, struct pt_regs *regs)
> {
> - struct list_head *t;
> -
> if (!elf_note_info_init(info))
> return 0;
>
> if (siginfo->si_signo) {
> + struct list_head *t;
> struct core_thread *ct;
> struct elf_thread_status *ets;
>
> --
> 1.8.4
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-09-28 23:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-27 12:58 [PATCH 1/1] fs/binfmt_elf.c: fill_note_info: Reduce scope of a variable Geyslan G. Bem
2013-09-28 23:32 [PATCH] 9p: remove unused 'p9_fid' struct pointer Geyslan G. Bem
2013-09-28 23:32 ` [PATCH 1/1] fs/binfmt_elf.c: fill_note_info: Reduce scope of a variable Geyslan G. Bem
2013-09-28 23:42 ` Geyslan Gregório Bem
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®