From e09b41010ba33a20a87472ee821fa407a5b8da36 Mon Sep 17 00:00:00 2001 From: José Pekkarinen Date: Mon, 11 Apr 2016 10:41:07 +0300 Subject: These changes are the raw update to linux-4.4.6-rt14. Kernel sources are taken from kernel.org, and rt patch from the rt wiki download page. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit During the rebasing, the following patch collided: Force tick interrupt and get rid of softirq magic(I70131fb85). Collisions have been removed because its logic was found on the source already. Change-Id: I7f57a4081d9deaa0d9ccfc41a6c8daccdee3b769 Signed-off-by: José Pekkarinen --- kernel/drivers/staging/wlan-ng/prism2fw.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'kernel/drivers/staging/wlan-ng/prism2fw.c') diff --git a/kernel/drivers/staging/wlan-ng/prism2fw.c b/kernel/drivers/staging/wlan-ng/prism2fw.c index 9408644cc..8fc80df0b 100644 --- a/kernel/drivers/staging/wlan-ng/prism2fw.c +++ b/kernel/drivers/staging/wlan-ng/prism2fw.c @@ -584,13 +584,12 @@ static int mkimage(struct imgchunk *clist, unsigned int *ccnt) ----------------------------------------------------------------*/ static int mkpdrlist(struct pda *pda) { - int result = 0; u16 *pda16 = (u16 *) pda->buf; int curroff; /* in 'words' */ pda->nrec = 0; curroff = 0; - while (curroff < (HFA384x_PDA_LEN_MAX / 2) && + while (curroff < (HFA384x_PDA_LEN_MAX / 2 - 1) && le16_to_cpu(pda16[curroff + 1]) != HFA384x_PDR_END_OF_PDA) { pda->rec[pda->nrec] = (hfa384x_pdrec_t *) &(pda16[curroff]); @@ -626,16 +625,14 @@ static int mkpdrlist(struct pda *pda) curroff += le16_to_cpu(pda16[curroff]) + 1; } - if (curroff >= (HFA384x_PDA_LEN_MAX / 2)) { + if (curroff >= (HFA384x_PDA_LEN_MAX / 2 - 1)) { pr_err("no end record found or invalid lengths in PDR data, exiting. %x %d\n", curroff, pda->nrec); return 1; } - if (le16_to_cpu(pda16[curroff + 1]) == HFA384x_PDR_END_OF_PDA) { - pda->rec[pda->nrec] = (hfa384x_pdrec_t *) &(pda16[curroff]); - (pda->nrec)++; - } - return result; + pda->rec[pda->nrec] = (hfa384x_pdrec_t *) &(pda16[curroff]); + (pda->nrec)++; + return 0; } /*---------------------------------------------------------------- @@ -708,7 +705,10 @@ static int plugimage(struct imgchunk *fchunk, unsigned int nfchunks, continue; } - /* Validate plug address against chunk data and identify chunk */ + /* + * Validate plug address against + * chunk data and identify chunk + */ for (c = 0; c < nfchunks; c++) { cstart = fchunk[c].addr; cend = fchunk[c].addr + fchunk[c].len; @@ -923,7 +923,8 @@ static int read_fwfile(const struct ihex_binrec *record) rcnt, s3info[ns3info].len, s3info[ns3info].type); - if (((s3info[ns3info].len - 1) * sizeof(u16)) > sizeof(s3info[ns3info].info)) { + if (((s3info[ns3info].len - 1) * sizeof(u16)) > + sizeof(s3info[ns3info].info)) { pr_err("S3 inforec length too long - aborting\n"); return 1; } -- cgit 1.2.3-korg