linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: hanterliu@gmail.com
To: linux-arm-kernel@lists.infradead.org
Cc: hanter Liu <hanterliu@gamil.com>, linux@armlinux.org.uk
Subject: [PATCH] ARM:alignment:correct variable type of nr_regs
Date: Sun,  5 Jan 2020 10:17:36 +0800	[thread overview]
Message-ID: <1578190656-19270-1-git-send-email-hanterliu@gmail.com> (raw)

From: hanter Liu <hanterliu@gamil.com>

if ldmstm instruction U bit is unset, nr_regs
should be negative value, so change variable
type of nr_regs from unsigned int to int.

Signed-off-by: hanter Liu <hanterliu@gamil.com>
---
 arch/arm/mm/alignment.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c
index 788c5cf..d8e3bd9 100644
--- a/arch/arm/mm/alignment.c
+++ b/arch/arm/mm/alignment.c
@@ -499,7 +499,8 @@ do_alignment_ldrstr(unsigned long addr, u32 instr, struct pt_regs *regs)
 static int
 do_alignment_ldmstm(unsigned long addr, u32 instr, struct pt_regs *regs)
 {
-	unsigned int rd, rn, correction, nr_regs, regbits;
+	int nr_regs;
+	unsigned int rd, rn, correction, regbits;
 	unsigned long eaddr, newaddr;
 
 	if (LDM_S_BIT(instr))
-- 
2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2020-01-05  2:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-05  2:17 hanterliu [this message]
2020-01-05 14:00 ` [PATCH] ARM:alignment:correct variable type of nr_regs Russell King - ARM Linux admin
  -- strict thread matches above, loose matches on Subject: below --
2020-01-05  2:39 hanterliu

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=1578190656-19270-1-git-send-email-hanterliu@gmail.com \
    --to=hanterliu@gmail.com \
    --cc=hanterliu@gamil.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux@armlinux.org.uk \
    /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).