[PATCH] staging:fbtft/fbtft-io: Fix incorrect type in assignment

2017-03-23 Thread Zhengyi Shen
Fix endian sparse warnings of incorrect type in assignment.
This patch changes type to the appropriate endian specific versions.


Signed-off-by: Zhengyi Shen 
---
 drivers/staging/fbtft/fbtft-io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/fbtft/fbtft-io.c b/drivers/staging/fbtft/fbtft-io.c
index d868405..ffb9a3b 100644
--- a/drivers/staging/fbtft/fbtft-io.c
+++ b/drivers/staging/fbtft/fbtft-io.c
@@ -71,7 +71,7 @@ int fbtft_write_spi_emulate_9(struct fbtft_par *par, void 
*buf, size_t len)
src++;
}
tmp |= ((*src & 0x0100) ? 1 : 0);
-   *(u64 *)dst = cpu_to_be64(tmp);
+   *(__be64 *)dst = cpu_to_be64(tmp);
dst += 8;
*dst++ = (u8)(*src++ & 0x00FF);
added++;
-- 
2.7.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging:most/hdm-i2c: Replace symbolic permissions with octal permissions

2017-02-03 Thread Zhengyi Shen
WARNING: Symbolic permissions 'S_IRUGO' are not preferred.
Consider using octal permissions '0444'.
This warning was detected by checkpatch.pl for hdm_i2c.c.

Signed-off-by: Zhengyi Shen 
---
 drivers/staging/most/hdm-i2c/hdm_i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/most/hdm-i2c/hdm_i2c.c 
b/drivers/staging/most/hdm-i2c/hdm_i2c.c
index ba0263b..1d5b229 100644
--- a/drivers/staging/most/hdm-i2c/hdm_i2c.c
+++ b/drivers/staging/most/hdm-i2c/hdm_i2c.c
@@ -37,7 +37,7 @@ enum { CH_RX, CH_TX, NUM_CHANNELS };
 
 /* IRQ / Polling option */
 static bool polling_req;
-module_param(polling_req, bool, S_IRUGO);
+module_param(polling_req, bool, 0444);
 MODULE_PARM_DESC(polling_req, "Request Polling. Default = 0 (use irq)");
 
 /* Polling Rate */
-- 
2.9.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: lustre: fix coding style issue in vvp_page.c

2017-02-02 Thread Zhengyi Shen
This is a patch to fix "WARNING: line over 80 characters" found by
checkpatch.pl in vvp_page.c.

Signed-off-by: Zhengyi Shen 
---
 drivers/staging/lustre/lustre/llite/vvp_page.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/llite/vvp_page.c 
b/drivers/staging/lustre/lustre/llite/vvp_page.c
index 23d6630..687c0c7 100644
--- a/drivers/staging/lustre/lustre/llite/vvp_page.c
+++ b/drivers/staging/lustre/lustre/llite/vvp_page.c
@@ -227,7 +227,8 @@ static int vvp_page_prep_write(const struct lu_env *env,
  * This takes inode as a separate argument, because inode on which error is to
  * be set can be different from \a vmpage inode in case of direct-io.
  */
-static void vvp_vmpage_error(struct inode *inode, struct page *vmpage, int 
ioret)
+static void vvp_vmpage_error(struct inode *inode, struct page *vmpage,
+int ioret)
 {
struct vvp_object *obj = cl_inode2vvp(inode);
 
-- 
2.9.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging/emxx_udc: Fix styling issues

2017-02-02 Thread Zhengyi Shen
Fix line over 80 characters.
Statements longer than 80 columns were broken into sensible chunks.
Descendants in four different palces were in the same uniform style.

Signed-off-by: Zhengyi Shen 
---
 drivers/staging/emxx_udc/emxx_udc.c | 13 -
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/emxx_udc/emxx_udc.c 
b/drivers/staging/emxx_udc/emxx_udc.c
index 77b242e..e771aee 100644
--- a/drivers/staging/emxx_udc/emxx_udc.c
+++ b/drivers/staging/emxx_udc/emxx_udc.c
@@ -902,7 +902,8 @@ static int _nbu2ss_epn_out_pio(
/* Copy of every four bytes */
for (i = 0; i < iWordLength; i++) {
pBuf32->dw =
-   _nbu2ss_readl(&preg->EP_REGS[ep->epnum - 1].EP_READ);
+   _nbu2ss_readl(
+   &preg->EP_REGS[ep->epnum - 1].EP_READ);
pBuf32++;
}
result = iWordLength * sizeof(u32);
@@ -912,7 +913,8 @@ static int _nbu2ss_epn_out_pio(
if (data > 0) {
/*-*/
/* Copy of fraction byte */
-   Temp32.dw = _nbu2ss_readl(&preg->EP_REGS[ep->epnum - 
1].EP_READ);
+   Temp32.dw =
+   _nbu2ss_readl(&preg->EP_REGS[ep->epnum - 1].EP_READ);
for (i = 0 ; i < data ; i++)
pBuf32->byte.DATA[i] = Temp32.byte.DATA[i];
result += data;
@@ -977,8 +979,8 @@ static int _nbu2ss_epn_out_transfer(
 
/*-*/
/* Receive Length */
-   iRecvLength
-   = _nbu2ss_readl(&preg->EP_REGS[num].EP_LEN_DCNT) & EPn_LDATA;
+   iRecvLength =
+   _nbu2ss_readl(&preg->EP_REGS[num].EP_LEN_DCNT) & EPn_LDATA;
 
if (iRecvLength != 0) {
result = _nbu2ss_epn_out_data(udc, ep, req, iRecvLength);
@@ -2651,7 +2653,8 @@ static int nbu2ss_ep_queue(
}
 
req = container_of(_req, struct nbu2ss_req, req);
-   if (unlikely(!_req->complete || !_req->buf || 
!list_empty(&req->queue))) {
+   if (unlikely(!_req->complete || !_req->buf
+   || !list_empty(&req->queue))) {
if (!_req->complete)
pr_err("udc: %s --- !_req->complete\n", __func__);
 
-- 
2.9.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel