From: Steffen Maier <maier@linux.vnet.ibm.com>
To: LABBE Corentin <clabbe.montjoie@gmail.com>,
herbert@gondor.apana.org.au, davem@davemloft.net,
heiko.carstens@de.ibm.com, schwidefsky@de.ibm.com
Cc: linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org,
linux-s390@vger.kernel.org
Subject: Re: [PATCH v2 4/8] s390: replace zfcp_qdio_sbale_count by sg_nents
Date: Wed, 30 Sep 2015 15:59:16 +0200 [thread overview]
Message-ID: <560BEAB4.10702@linux.vnet.ibm.com> (raw)
In-Reply-To: <1442581036-23789-5-git-send-email-clabbe.montjoie@gmail.com>
Thanks, looks good.
I've added it to my queue for sending zfcp patches upstream next time
(might take a while).
On 09/18/2015 02:57 PM, LABBE Corentin wrote:
> The zfcp_qdio_sbale_count function do the same work than sg_nents().
> So replace it by sg_nents() for removing duplicate code.
>
> Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
> ---
> drivers/s390/scsi/zfcp_fsf.c | 3 +--
> drivers/s390/scsi/zfcp_qdio.h | 15 ---------------
> 2 files changed, 1 insertion(+), 17 deletions(-)
>
> diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c
> index 522a633..edc137a 100644
> --- a/drivers/s390/scsi/zfcp_fsf.c
> +++ b/drivers/s390/scsi/zfcp_fsf.c
> @@ -985,8 +985,7 @@ static int zfcp_fsf_setup_ct_els_sbals(struct zfcp_fsf_req *req,
> if (zfcp_qdio_sbals_from_sg(qdio, &req->qdio_req, sg_resp))
> return -EIO;
>
> - zfcp_qdio_set_data_div(qdio, &req->qdio_req,
> - zfcp_qdio_sbale_count(sg_req));
> + zfcp_qdio_set_data_div(qdio, &req->qdio_req, sg_nents(sg_req));
> zfcp_qdio_set_sbale_last(qdio, &req->qdio_req);
> zfcp_qdio_set_scount(qdio, &req->qdio_req);
> return 0;
> diff --git a/drivers/s390/scsi/zfcp_qdio.h b/drivers/s390/scsi/zfcp_qdio.h
> index 497cd37..85cdb82 100644
> --- a/drivers/s390/scsi/zfcp_qdio.h
> +++ b/drivers/s390/scsi/zfcp_qdio.h
> @@ -225,21 +225,6 @@ void zfcp_qdio_set_data_div(struct zfcp_qdio *qdio,
> }
>
> /**
> - * zfcp_qdio_sbale_count - count sbale used
> - * @sg: pointer to struct scatterlist
> - */
> -static inline
> -unsigned int zfcp_qdio_sbale_count(struct scatterlist *sg)
> -{
> - unsigned int count = 0;
> -
> - for (; sg; sg = sg_next(sg))
> - count++;
> -
> - return count;
> -}
> -
> -/**
> * zfcp_qdio_real_bytes - count bytes used
> * @sg: pointer to struct scatterlist
> */
>
--
Mit freundlichen Grüßen / Kind regards
Steffen Maier
Linux on z Systems Development
IBM Deutschland Research & Development GmbH
Vorsitzende des Aufsichtsrats: Martina Koederitz
Geschaeftsfuehrung: Dirk Wittkopp
Sitz der Gesellschaft: Boeblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294
next prev parent reply other threads:[~2015-09-30 13:59 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-18 12:57 [PATCH v2] crypto: Remove duplicate code of SG helpers functions LABBE Corentin
2015-09-18 12:57 ` [PATCH v2 1/8] crypto: bfin: replace sg_count by sg_nents LABBE Corentin
2015-09-18 12:57 ` [PATCH v2 2/8] crypto: amcc replace get_sg_count by sg_nents_for_len LABBE Corentin
2015-09-18 12:57 ` [PATCH v2 3/8] crypto: sahara: replace sahara_sg_length with sg_nents_for_len LABBE Corentin
2015-09-18 12:57 ` [PATCH v2 4/8] s390: replace zfcp_qdio_sbale_count by sg_nents LABBE Corentin
2015-09-30 13:59 ` Steffen Maier [this message]
2015-09-18 12:57 ` [PATCH v2 5/8] lib: introduce sg_nents_len_chained LABBE Corentin
2015-09-18 14:01 ` Tom Lendacky
2015-09-18 16:19 ` Tony Battersby
2015-09-18 21:25 ` Tony Battersby
2015-09-21 14:19 ` Herbert Xu
2015-09-21 14:59 ` LABBE Corentin
2015-09-18 12:57 ` [PATCH v2 6/8] crypto: talitos: replace sg_count with sg_nents_len_chained LABBE Corentin
2015-09-18 12:57 ` [PATCH v2 7/8] crypto: qce: replace qce_countsg " LABBE Corentin
2015-09-18 12:57 ` [PATCH v2 8/8] crypto: caam: replace __sg_count " LABBE Corentin
2015-09-21 15:09 ` [PATCH v2] crypto: Remove duplicate code of SG helpers functions Herbert Xu
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=560BEAB4.10702@linux.vnet.ibm.com \
--to=maier@linux.vnet.ibm.com \
--cc=clabbe.montjoie@gmail.com \
--cc=davem@davemloft.net \
--cc=heiko.carstens@de.ibm.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=schwidefsky@de.ibm.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;
as well as URLs for NNTP newsgroup(s).