* + mm-shmemc-clean-code-by-removing-unnecessary-assignment.patch added to -mm tree
@ 2020-03-02 22:44 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2020-03-02 22:44 UTC (permalink / raw)
To: hughd, mateusznosek0, mm-commits, pankaj.gupta.linux, willy
The patch titled
Subject: mm/shmem.c: Clean code by removing unnecessary assignment
has been added to the -mm tree. Its filename is
mm-shmemc-clean-code-by-removing-unnecessary-assignment.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/mm-shmemc-clean-code-by-removing-unnecessary-assignment.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/mm-shmemc-clean-code-by-removing-unnecessary-assignment.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: mateusznosek0@gmail.com
Subject: mm/shmem.c: Clean code by removing unnecessary assignment
Previously 0 was assigned to variable 'error'
but the variable was never read before reassignemnt later.
So the assignment can be removed.
Link: http://lkml.kernel.org/r/20200301152832.24595-1-mateusznosek0@gmail.com
Signed-off-by: Mateusz Nosek <mateusznosek0@gmail.com>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/shmem.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
--- a/mm/shmem.c~mm-shmemc-clean-code-by-removing-unnecessary-assignment
+++ a/mm/shmem.c
@@ -3116,12 +3116,9 @@ static int shmem_symlink(struct inode *d
error = security_inode_init_security(inode, dir, &dentry->d_name,
shmem_initxattrs, NULL);
- if (error) {
- if (error != -EOPNOTSUPP) {
- iput(inode);
- return error;
- }
- error = 0;
+ if (error && error != -EOPNOTSUPP) {
+ iput(inode);
+ return error;
}
inode->i_size = len-1;
_
Patches currently in -mm which might be from mateusznosek0@gmail.com are
mm-vmscanc-clean-code-by-removing-unnecessary-assignment.patch
mm-shmemc-clean-code-by-removing-unnecessary-assignment.patch
mm-mm_initc-clean-code-use-build_bug_on-when-comparing-compile-time-constant.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-03-02 22:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-02 22:44 + mm-shmemc-clean-code-by-removing-unnecessary-assignment.patch added to -mm tree akpm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).