+ soc-qcom-smd-use-__ioread32_copy-instead-of-open-coding-it.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: drivers/soc/qcom/smd.c: use __ioread32_copy() instead of open-coding it
has been added to the -mm tree.  Its filename is
     soc-qcom-smd-use-__ioread32_copy-instead-of-open-coding-it.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/soc-qcom-smd-use-__ioread32_copy-instead-of-open-coding-it.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/soc-qcom-smd-use-__ioread32_copy-instead-of-open-coding-it.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Stephen Boyd <sboyd@xxxxxxxxxxxxxx>
Subject: drivers/soc/qcom/smd.c: use __ioread32_copy() instead of open-coding it

Now that we have a generic library function for this, replace the
open-coded instance.

Signed-off-by: Stephen Boyd <sboyd@xxxxxxxxxxxxxx>
Reviewed-by: Bjorn Andersson <bjorn.andersson@xxxxxxxxxxxxxx>
Cc: <zajec5@xxxxxxxxx>
Cc: David Howells <dhowells@xxxxxxxxxx>
Cc: Hauke Mehrtens <hauke@xxxxxxxxxx>
Cc: Paul Walmsley <paul@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/soc/qcom/smd.c |   13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff -puN drivers/soc/qcom/smd.c~soc-qcom-smd-use-__ioread32_copy-instead-of-open-coding-it drivers/soc/qcom/smd.c
--- a/drivers/soc/qcom/smd.c~soc-qcom-smd-use-__ioread32_copy-instead-of-open-coding-it
+++ a/drivers/soc/qcom/smd.c
@@ -434,20 +434,15 @@ static void smd_copy_to_fifo(void __iome
 /*
  * Copy count bytes of data using 32bit accesses, if that is required.
  */
-static void smd_copy_from_fifo(void *_dst,
-			       const void __iomem *_src,
+static void smd_copy_from_fifo(void *dst,
+			       const void __iomem *src,
 			       size_t count,
 			       bool word_aligned)
 {
-	u32 *dst = (u32 *)_dst;
-	u32 *src = (u32 *)_src;
-
 	if (word_aligned) {
-		count /= sizeof(u32);
-		while (count--)
-			*dst++ = __raw_readl(src++);
+		__ioread32_copy(dst, src, count / sizeof(u32));
 	} else {
-		memcpy_fromio(_dst, _src, count);
+		memcpy_fromio(dst, src, count);
 	}
 }
 
_

Patches currently in -mm which might be from sboyd@xxxxxxxxxxxxxx are

frv-io-accept-const-void-pointers-for-readbwl.patch
lib-iomap_copy-add-__ioread32_copy.patch
soc-qcom-smd-use-__ioread32_copy-instead-of-open-coding-it.patch
firmware-bcm47xx_nvram-use-__ioread32_copy-instead-of-open-coding.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux