From: SF Markus Elfring <elfring@users.sourceforge.net>
To: Arnd Bergmann <arnd@arndb.de>, Jan Kara <jack@suse.cz>,
Jesper Nilsson <jesper.nilsson@axis.com>,
Kumar Gala <galak@kernel.crashing.org>,
Lorenzo Stoakes <lstoakes@gmail.com>,
Michal Hocko <mhocko@suse.com>, Timur Tabi <timur@freescale.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH 3/5] fsl_hypervisor: Return the success indication only as a constant in fsl_hv_open()
Date: Sat, 20 May 2017 21:13:47 +0200 [thread overview]
Message-ID: <36267d50-b81b-be17-5050-221d5a560eca@users.sourceforge.net> (raw)
In-Reply-To: <38a9b933-4cdc-53e7-0a4c-20f96c57648c@users.sourceforge.net>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 20 May 2017 20:05:19 +0200
* Return a success code without storing it in an intermediate variable.
* Delete the local variable "ret" which became unnecessary with
this refactoring.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/virt/fsl_hypervisor.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/virt/fsl_hypervisor.c b/drivers/virt/fsl_hypervisor.c
index 40c5eb64f39b..9e881dc29c6b 100644
--- a/drivers/virt/fsl_hypervisor.c
+++ b/drivers/virt/fsl_hypervisor.c
@@ -657,7 +657,6 @@ static int fsl_hv_open(struct inode *inode, struct file *filp)
{
struct doorbell_queue *dbq;
unsigned long flags;
- int ret = 0;
dbq = kzalloc(sizeof(*dbq), GFP_KERNEL);
if (!dbq)
@@ -671,8 +670,7 @@ static int fsl_hv_open(struct inode *inode, struct file *filp)
spin_unlock_irqrestore(&db_list_lock, flags);
filp->private_data = dbq;
-
- return ret;
+ return 0;
}
/*
--
2.13.0
next prev parent reply other threads:[~2017-05-20 19:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-20 19:08 [PATCH 0/5] fsl_hypervisor: Adjustments for two function implementations SF Markus Elfring
2017-05-20 19:10 ` [PATCH 1/5] fsl_hypervisor: Improve a size determination in fsl_hv_open() SF Markus Elfring
2017-05-20 19:12 ` [PATCH 2/5] fsl_hypervisor: Delete an error message for a failed memory allocation " SF Markus Elfring
2017-05-20 19:13 ` SF Markus Elfring [this message]
2017-05-20 19:14 ` [PATCH 4/5] fsl_hypervisor: Use kcalloc() in ioctl_memcpy() SF Markus Elfring
2017-05-20 19:16 ` [PATCH 5/5] fsl_hypervisor: Delete error messages for failed memory allocations " SF Markus Elfring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=36267d50-b81b-be17-5050-221d5a560eca@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=arnd@arndb.de \
--cc=galak@kernel.crashing.org \
--cc=jack@suse.cz \
--cc=jesper.nilsson@axis.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lstoakes@gmail.com \
--cc=mhocko@suse.com \
--cc=timur@freescale.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome