linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: vcxzasdfvcxz <vcxzasdfvcxz@protonmail.com>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [PATCH] lib/sg_split: remove setting of offset to zero
Date: Thu, 23 Jan 2020 20:55:32 +0000	[thread overview]
Message-ID: <m1IikjLBNle_kj-D3TemaGqgAfGudoitlSaWdj_I21hf7jl8mJaCa-cNTuKzI6Cn94BqqCT432c7s-fEy0bfp5311oRPH5Sywj9R3KgnH7A=@protonmail.com> (raw)

By setting offset to zero we are losing where in the page the memory is.

--- a/lib/sg_split.c
+++ b/lib/sg_split.c
@@ -88,8 +88,6 @@ static void sg_split_phys(struct sg_splitter *splitters, const int nb_splits)
                        if (!j) {
                                out_sg->offset += split->skip_sg0;
                                out_sg->length -= split->skip_sg0;
-                       } else {
-                               out_sg->offset = 0;
                        }
                        sg_dma_address(out_sg) = 0;
                        sg_dma_len(out_sg) = 0;


                 reply	other threads:[~2020-01-23 20:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='m1IikjLBNle_kj-D3TemaGqgAfGudoitlSaWdj_I21hf7jl8mJaCa-cNTuKzI6Cn94BqqCT432c7s-fEy0bfp5311oRPH5Sywj9R3KgnH7A=@protonmail.com' \
    --to=vcxzasdfvcxz@protonmail.com \
    --cc=linux-kernel@vger.kernel.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).