From: SF Markus Elfring <elfring@users.sourceforge.net>
To: xen-devel@lists.xenproject.org, linux-scsi@vger.kernel.org,
"Jürgen Groß" <jgross@suse.com>,
"David Vrabel" <david.vrabel@citrix.com>,
"Boris Ostrovsky" <boris.ostrovsky@oracle.com>
Cc: Julia Lawall <julia.lawall@lip6.fr>,
kernel-janitors@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH 3/3] xen-scsiback: Pass a failure indication as a constant
Date: Sat, 16 Jul 2016 22:24:54 +0200 [thread overview]
Message-ID: <e447cf62-ffc7-4b82-cff2-947c8874756a__11032.3702022017$1468700770$gmane$org@users.sourceforge.net> (raw)
In-Reply-To: <59e51c7d-f7bb-c55f-d2fe-06dccfef6a99@users.sourceforge.net>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 16 Jul 2016 21:55:01 +0200
Pass the constant "FAILED" in a function call directly instead of
using an intialisation for a local variable.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/xen/xen-scsiback.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/xen/xen-scsiback.c b/drivers/xen/xen-scsiback.c
index 7612bc9..ec5546c 100644
--- a/drivers/xen/xen-scsiback.c
+++ b/drivers/xen/xen-scsiback.c
@@ -601,7 +601,7 @@ static void scsiback_device_action(struct vscsibk_pend *pending_req,
struct se_cmd *se_cmd = &pending_req->se_cmd;
struct scsiback_tmr *tmr;
u64 unpacked_lun = pending_req->v2p->lun;
- int rc, err = FAILED;
+ int rc, err;
tmr = kzalloc(sizeof(struct scsiback_tmr), GFP_KERNEL);
if (!tmr) {
@@ -629,7 +629,7 @@ static void scsiback_device_action(struct vscsibk_pend *pending_req,
free_tmr:
kfree(tmr);
do_resp:
- scsiback_do_resp_with_sense(NULL, err, 0, pending_req);
+ scsiback_do_resp_with_sense(NULL, FAILED, 0, pending_req);
}
/*
--
2.9.1
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-07-16 20:25 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <5307CAA2.8060406@users.sourceforge.net>
[not found] ` <alpine.DEB.2.02.1402212321410.2043@localhost6.localdomain6>
[not found] ` <530A086E.8010901@users.sourceforge.net>
[not found] ` <alpine.DEB.2.02.1402231635510.1985@localhost6.localdomain6>
[not found] ` <530A72AA.3000601@users.sourceforge.net>
[not found] ` <alpine.DEB.2.02.1402240658210.2090@localhost6.localdomain6>
[not found] ` <530B5FB6.6010207@users.sourceforge.net>
[not found] ` <alpine.DEB.2.10.1402241710370.2074@hadrien>
[not found] ` <530C5E18.1020800@users.sourceforge.net>
[not found] ` <alpine.DEB.2.10.1402251014170.2080@hadrien>
[not found] ` <530CD2C4.4050903@users.sourceforge.net>
[not found] ` <alpine.DEB.2.10.1402251840450.7035@hadrien>
[not found] ` <530CF8FF.8080600@users.sourceforge.net>
[not found] ` <alpine.DEB.2.02.1402252117150.2047@localhost6.localdomain6>
[not found] ` <530DD06F.4090703@users.sourceforge.net>
[not found] ` <alpine.DEB.2.02.1402262129250.2221@localhost6.localdomain6>
[not found] ` <5317A59D.4@users.sourceforge.net>
2014-11-02 15:12 ` [PATCH 1/1] PCI: Deletion of unnecessary checks before three function calls SF Markus Elfring
[not found] ` <545649DE.80304@users.sourceforge.net>
2014-11-11 4:07 ` Bjorn Helgaas
2016-07-16 20:20 ` [PATCH 0/3] xen-scsiback: Fine-tuning for scsiback_device_action() SF Markus Elfring
[not found] ` <59e51c7d-f7bb-c55f-d2fe-06dccfef6a99@users.sourceforge.net>
2016-07-16 20:22 ` [PATCH 1/3] xen-scsiback: Delete an unnecessary check before the function call "kfree" SF Markus Elfring
2016-07-16 20:23 ` [PATCH 2/3] xen-scsiback: One function call less in scsiback_device_action() after error detection SF Markus Elfring
2016-07-16 20:24 ` SF Markus Elfring [this message]
[not found] ` <fa839c03-b076-0264-c363-5581d0298632@users.sourceforge.net>
2016-07-18 5:01 ` [PATCH 1/3] xen-scsiback: Delete an unnecessary check before the function call "kfree" Juergen Gross
[not found] ` <e447cf62-ffc7-4b82-cff2-947c8874756a@users.sourceforge.net>
2016-07-18 5:05 ` [PATCH 3/3] xen-scsiback: Pass a failure indication as a constant Juergen Gross
[not found] ` <87e55a72-71ad-d0a1-b936-12565bbc6508@users.sourceforge.net>
2016-07-18 5:11 ` [PATCH 2/3] xen-scsiback: One function call less in scsiback_device_action() after error detection Juergen Gross
[not found] ` <fb5824ad-fb09-e471-7dc4-3e32564cc334@suse.com>
2016-07-19 14:56 ` SF Markus Elfring
2016-07-20 4:35 ` Juergen Gross
[not found] ` <83b0b1e2-900b-eefc-160b-7d837730571c@suse.com>
2016-07-20 5:10 ` SF Markus Elfring
2016-07-20 5:26 ` Juergen Gross
[not found] ` <85b948e0-bf37-dff0-6792-77b5dacef9a0@suse.com>
2016-07-20 11:27 ` [PATCH v2 0/3] xen-scsiback: Fine-tuning for scsiback_device_action() SF Markus Elfring
2016-07-20 11:30 ` [PATCH v2 1/3] xen-scsiback: Delete an unnecessary check before the function call "kfree" SF Markus Elfring
2016-07-20 11:44 ` Juergen Gross
2016-07-20 11:34 ` [PATCH v2 2/3] xen-scsiback: Rename jump labels in scsiback_device_action() SF Markus Elfring
2016-07-20 11:45 ` Juergen Gross
2016-07-20 11:36 ` [PATCH v2 3/3] xen-scsiback: Pass a failure indication as a constant SF Markus Elfring
2016-07-20 11:44 ` Juergen Gross
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='e447cf62-ffc7-4b82-cff2-947c8874756a__11032.3702022017$1468700770$gmane$org@users.sourceforge.net' \
--to=elfring@users.sourceforge.net \
--cc=boris.ostrovsky@oracle.com \
--cc=david.vrabel@citrix.com \
--cc=jgross@suse.com \
--cc=julia.lawall@lip6.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=xen-devel@lists.xenproject.org \
/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;
as well as URLs for NNTP newsgroup(s).