Link not working on www.mail-archive.com

2014-06-30 Thread Lisa
Looks like there is a broken link on 
http://www.mail-archive.com/i-kan-icw@xc.org/msg00023.html to 
http://www.pslgroup.com/DOCGUIDE.HTM. You might also want to add some of these 
resources I found useful...

http://online.annamaria.edu/resource/business-and-leadership/health-informatics-qualified-analysts-in-demand

http://www.hitconsultant.net/2013/08/02/health-informatics-the-intersection-of-health-it-infographic/

http://mastersinhealthinformatics.com/masters-in-health-informatics-average-salary/


Thanks!

~lisa

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


Investment Proposal of € 7.5M

2019-01-21 Thread Lisa Herrera



Hello
I want to seek for your assistance and partnership to invest in your country. I 
have € 7.5M (Seven million five hundred thousand Euros) that I want to invest 
in your country and I am willing to offer you 20% of the money for your 
assistance in this project.

If you are interested, kindly reply me as soon as you read my mail for more 
details. I am waiting for your response

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


Investment Proposal of € 7.5M

2019-01-21 Thread Lisa Herrera



Hello
I want to seek for your assistance and partnership to invest in your country. I 
have € 7.5M (Seven million five hundred thousand Euros) that I want to invest 
in your country and I am willing to offer you 20% of the money for your 
assistance in this project.

If you are interested, kindly reply me as soon as you read my mail for more 
details. I am waiting for your response

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


Investment Proposal of € 7.5M

2019-01-21 Thread Lisa Herrera



Hello
I want to seek for your assistance and partnership to invest in your country. I 
have € 7.5M (Seven million five hundred thousand Euros) that I want to invest 
in your country and I am willing to offer you 20% of the money for your 
assistance in this project.

If you are interested, kindly reply me as soon as you read my mail for more 
details. I am waiting for your response

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


[PATCH 2/2] staging/lustre/lnet/selftest: Remove unnecessary spaces in brw_test.c

2013-10-17 Thread Lisa Nguyen
Remove spaces between function names and open parentheses to
eliminate warnings generated by checkpatch.pl and meet kernel
coding standards.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/lustre/lnet/selftest/brw_test.c | 64 -
 1 file changed, 32 insertions(+), 32 deletions(-)

diff --git a/drivers/staging/lustre/lnet/selftest/brw_test.c 
b/drivers/staging/lustre/lnet/selftest/brw_test.c
index 4b8daeb..b7613c8 100644
--- a/drivers/staging/lustre/lnet/selftest/brw_test.c
+++ b/drivers/staging/lustre/lnet/selftest/brw_test.c
@@ -48,14 +48,14 @@ CFS_MODULE_PARM(brw_inject_errors, "i", int, 0644,
"# data errors to inject randomly, zero by default");
 
 static void
-brw_client_fini (sfw_test_instance_t *tsi)
+brw_client_fini(sfw_test_instance_t *tsi)
 {
srpc_bulk_t *bulk;
sfw_test_unit_t *tsu;
 
-   LASSERT (tsi->tsi_is_client);
+   LASSERT(tsi->tsi_is_client);
 
-   list_for_each_entry (tsu, &tsi->tsi_units, tsu_list) {
+   list_for_each_entry(tsu, &tsi->tsi_units, tsu_list) {
bulk = tsu->tsu_private;
if (bulk == NULL)
continue;
@@ -66,7 +66,7 @@ brw_client_fini (sfw_test_instance_t *tsi)
 }
 
 int
-brw_client_init (sfw_test_instance_t *tsi)
+brw_client_init(sfw_test_instance_t *tsi)
 {
sfw_session_t*sn = tsi->tsi_batch->bat_session;
int   flags;
@@ -131,7 +131,7 @@ brw_client_init (sfw_test_instance_t *tsi)
 #define BRW_MSIZE   sizeof(__u64)
 
 int
-brw_inject_one_error (void)
+brw_inject_one_error(void)
 {
struct timeval tv;
 
@@ -147,12 +147,12 @@ brw_inject_one_error (void)
 }
 
 void
-brw_fill_page (struct page *pg, int pattern, __u64 magic)
+brw_fill_page(struct page *pg, int pattern, __u64 magic)
 {
char *addr = page_address(pg);
int   i;
 
-   LASSERT (addr != NULL);
+   LASSERT(addr != NULL);
 
if (pattern == LST_BRW_CHECK_NONE)
return;
@@ -173,18 +173,18 @@ brw_fill_page (struct page *pg, int pattern, __u64 magic)
return;
}
 
-   LBUG ();
+   LBUG();
return;
 }
 
 int
-brw_check_page (struct page *pg, int pattern, __u64 magic)
+brw_check_page(struct page *pg, int pattern, __u64 magic)
 {
char  *addr = page_address(pg);
__u64  data = 0; /* make compiler happy */
inti;
 
-   LASSERT (addr != NULL);
+   LASSERT(addr != NULL);
 
if (pattern == LST_BRW_CHECK_NONE)
return 0;
@@ -212,16 +212,16 @@ brw_check_page (struct page *pg, int pattern, __u64 magic)
return 0;
}
 
-   LBUG ();
+   LBUG();
 
 bad_data:
-   CERROR ("Bad data in page %p: "LPX64", "LPX64" expected\n",
+   CERROR("Bad data in page %p: "LPX64", "LPX64" expected\n",
pg, data, magic);
return 1;
 }
 
 void
-brw_fill_bulk (srpc_bulk_t *bk, int pattern, __u64 magic)
+brw_fill_bulk(srpc_bulk_t *bk, int pattern, __u64 magic)
 {
int  i;
struct page *pg;
@@ -233,7 +233,7 @@ brw_fill_bulk (srpc_bulk_t *bk, int pattern, __u64 magic)
 }
 
 int
-brw_check_bulk (srpc_bulk_t *bk, int pattern, __u64 magic)
+brw_check_bulk(srpc_bulk_t *bk, int pattern, __u64 magic)
 {
int  i;
struct page *pg;
@@ -241,7 +241,7 @@ brw_check_bulk (srpc_bulk_t *bk, int pattern, __u64 magic)
for (i = 0; i < bk->bk_niov; i++) {
pg = bk->bk_iovs[i].kiov_page;
if (brw_check_page(pg, pattern, magic) != 0) {
-   CERROR ("Bulk page %p (%d/%d) is corrupted!\n",
+   CERROR("Bulk page %p (%d/%d) is corrupted!\n",
pg, i, bk->bk_niov);
return 1;
}
@@ -251,7 +251,7 @@ brw_check_bulk (srpc_bulk_t *bk, int pattern, __u64 magic)
 }
 
 static int
-brw_client_prep_rpc (sfw_test_unit_t *tsu,
+brw_client_prep_rpc(sfw_test_unit_t *tsu,
 lnet_process_id_t dest, srpc_client_rpc_t **rpcpp)
 {
srpc_bulk_t  *bulk = tsu->tsu_private;
@@ -309,7 +309,7 @@ brw_client_prep_rpc (sfw_test_unit_t *tsu,
 }
 
 static void
-brw_client_done_rpc (sfw_test_unit_t *tsu, srpc_client_rpc_t *rpc)
+brw_client_done_rpc(sfw_test_unit_t *tsu, srpc_client_rpc_t *rpc)
 {
__u64   magic = BRW_MAGIC;
sfw_test_instance_t *tsi = tsu->tsu_instance;
@@ -318,10 +318,10 @@ brw_client_done_rpc (sfw_test_unit_t *tsu, 
srpc_client_rpc_t *rpc)
srpc_brw_reply_t*reply = &msg->msg_body.brw_reply;
srpc_brw_reqst_t*reqst = &rpc->crpc_reqstmsg.msg_body.brw_reqst;
 
-   LASSERT (sn != NULL);
+   LASSERT(sn != NULL);
 
if (rpc->crpc_status != 0) {
-   CERROR ("BRW RPC to %s failed with %d\n",
+  

[PATCH 1/2] staging/lustre/lnet/selftest: Fix trailing statements in brw_test.c

2013-10-18 Thread Lisa Nguyen
Fix trailing statement errors generated by checkpatch.pl in
brw_test.c to meet kernel coding standards.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/lustre/lnet/selftest/brw_test.c | 27 -
 1 file changed, 18 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/lustre/lnet/selftest/brw_test.c 
b/drivers/staging/lustre/lnet/selftest/brw_test.c
index ef5064e..4b8daeb 100644
--- a/drivers/staging/lustre/lnet/selftest/brw_test.c
+++ b/drivers/staging/lustre/lnet/selftest/brw_test.c
@@ -57,7 +57,8 @@ brw_client_fini (sfw_test_instance_t *tsi)
 
list_for_each_entry (tsu, &tsi->tsi_units, tsu_list) {
bulk = tsu->tsu_private;
-   if (bulk == NULL) continue;
+   if (bulk == NULL)
+   continue;
 
srpc_free_bulk(bulk);
tsu->tsu_private = NULL;
@@ -134,11 +135,13 @@ brw_inject_one_error (void)
 {
struct timeval tv;
 
-   if (brw_inject_errors <= 0) return 0;
+   if (brw_inject_errors <= 0)
+   return 0;
 
do_gettimeofday(&tv);
 
-   if ((tv.tv_usec & 1) == 0) return 0;
+   if ((tv.tv_usec & 1) == 0)
+   return 0;
 
return brw_inject_errors--;
 }
@@ -151,7 +154,8 @@ brw_fill_page (struct page *pg, int pattern, __u64 magic)
 
LASSERT (addr != NULL);
 
-   if (pattern == LST_BRW_CHECK_NONE) return;
+   if (pattern == LST_BRW_CHECK_NONE)
+   return;
 
if (magic == BRW_MAGIC)
magic += brw_inject_one_error();
@@ -187,11 +191,13 @@ brw_check_page (struct page *pg, int pattern, __u64 magic)
 
if (pattern == LST_BRW_CHECK_SIMPLE) {
data = *((__u64 *) addr);
-   if (data != magic) goto bad_data;
+   if (data != magic)
+   goto bad_data;
 
addr += PAGE_CACHE_SIZE - BRW_MSIZE;
data = *((__u64 *) addr);
-   if (data != magic) goto bad_data;
+   if (data != magic)
+   goto bad_data;
 
return 0;
}
@@ -199,7 +205,8 @@ brw_check_page (struct page *pg, int pattern, __u64 magic)
if (pattern == LST_BRW_CHECK_FULL) {
for (i = 0; i < PAGE_CACHE_SIZE / BRW_MSIZE; i++) {
data = *(((__u64 *) addr) + i);
-   if (data != magic) goto bad_data;
+   if (data != magic)
+   goto bad_data;
}
 
return 0;
@@ -336,7 +343,8 @@ brw_client_done_rpc (sfw_test_unit_t *tsu, 
srpc_client_rpc_t *rpc)
goto out;
}
 
-   if (reqst->brw_rw == LST_BRW_WRITE) goto out;
+   if (reqst->brw_rw == LST_BRW_WRITE)
+   goto out;
 
if (brw_check_bulk(&rpc->crpc_bulk, reqst->brw_flags, magic) != 0) {
CERROR ("Bulk data from %s is corrupted!\n",
@@ -354,7 +362,8 @@ brw_server_rpc_done (srpc_server_rpc_t *rpc)
 {
srpc_bulk_t *blk = rpc->srpc_bulk;
 
-   if (blk == NULL) return;
+   if (blk == NULL)
+   return;
 
if (rpc->srpc_status != 0)
CERROR ("Bulk transfer %s %s has failed: %d\n",
-- 
1.8.1.2

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


[PATCH 2/5] staging/lustre/lnet: Move open braces to previous lines in lib-move.c

2013-10-18 Thread Lisa Nguyen
Move open braces to previous lines in lib-move.c to meet kernel
coding standards.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/lustre/lnet/lnet/lib-move.c | 12 
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/lustre/lnet/lnet/lib-move.c 
b/drivers/staging/lustre/lnet/lnet/lib-move.c
index 1b05108..f2b46b3 100644
--- a/drivers/staging/lustre/lnet/lnet/lib-move.c
+++ b/drivers/staging/lustre/lnet/lnet/lib-move.c
@@ -82,8 +82,7 @@ lnet_fail_nid(lnet_nid_t nid, unsigned int threshold)
 
if (tp->tp_threshold == 0 ||/* needs culling anyway */
nid == LNET_NID_ANY ||   /* removing all entries */
-   tp->tp_nid == nid)/* matched this one */
-   {
+   tp->tp_nid == nid) {  /* matched this one */
list_del(&tp->tp_list);
list_add(&tp->tp_list, &cull);
}
@@ -1814,8 +1813,7 @@ lnet_parse(lnet_ni_t *ni, lnet_hdr_t *hdr, lnet_nid_t 
from_nid,
 * call back lnd_recv() come what may... */
 
if (!list_empty(&the_lnet.ln_test_peers) && /* normally we don't */
-   fail_peer(src_nid, 0))   /* shall we now? */
-   {
+   fail_peer(src_nid, 0)) { /* shall we now? */
CERROR("%s, src %s: Dropping %s to simulate failure\n",
   libcfs_nid2str(from_nid), libcfs_nid2str(src_nid),
   lnet_msgtyp2str(type));
@@ -2051,8 +2049,7 @@ LNetPut(lnet_nid_t self, lnet_handle_md_t mdh, 
lnet_ack_req_t ack,
LASSERT(the_lnet.ln_refcount > 0);
 
if (!list_empty(&the_lnet.ln_test_peers) && /* normally we don't */
-   fail_peer(target.nid, 1)) /* shall we now? */
-   {
+   fail_peer(target.nid, 1)) { /* shall we now? */
CERROR("Dropping PUT to %s: simulated failure\n",
   libcfs_id2str(target));
return -EIO;
@@ -2251,8 +2248,7 @@ LNetGet(lnet_nid_t self, lnet_handle_md_t mdh,
LASSERT(the_lnet.ln_refcount > 0);
 
if (!list_empty(&the_lnet.ln_test_peers) && /* normally we don't */
-   fail_peer(target.nid, 1)) /* shall we now? */
-   {
+   fail_peer(target.nid, 1)) {   /* shall we now? */
CERROR("Dropping GET to %s: simulated failure\n",
   libcfs_id2str(target));
return -EIO;
-- 
1.8.1.2

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


[PATCH 3/5] staging/lustre/lnet: Adjust lines to meet 80 column limit in lib-move.c

2013-10-18 Thread Lisa Nguyen
Fixed lines to not exceed more than 80 columns per line to meet
kernel coding standards.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/lustre/lnet/lnet/lib-move.c | 28 +---
 1 file changed, 17 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/lustre/lnet/lnet/lib-move.c 
b/drivers/staging/lustre/lnet/lnet/lib-move.c
index f2b46b3..1373dff 100644
--- a/drivers/staging/lustre/lnet/lnet/lib-move.c
+++ b/drivers/staging/lustre/lnet/lnet/lib-move.c
@@ -290,8 +290,8 @@ EXPORT_SYMBOL(lnet_kiov_nob);
 
 void
 lnet_copy_kiov2kiov(unsigned int ndiov, lnet_kiov_t *diov, unsigned int 
doffset,
-unsigned int nsiov, lnet_kiov_t *siov, unsigned int 
soffset,
-unsigned int nob)
+   unsigned int nsiov, lnet_kiov_t *siov, unsigned int soffset,
+   unsigned int nob)
 {
/* NB diov, siov are READ-ONLY */
unsigned intthis_nob;
@@ -372,8 +372,8 @@ EXPORT_SYMBOL(lnet_copy_kiov2kiov);
 
 void
 lnet_copy_kiov2iov(unsigned int niov, struct iovec *iov, unsigned int 
iovoffset,
-   unsigned int nkiov, lnet_kiov_t *kiov, unsigned int 
kiovoffset,
-   unsigned int nob)
+  unsigned int nkiov, lnet_kiov_t *kiov,
+  unsigned int kiovoffset, unsigned int nob)
 {
/* NB iov, kiov are READ-ONLY */
unsigned intthis_nob;
@@ -441,9 +441,10 @@ lnet_copy_kiov2iov(unsigned int niov, struct iovec *iov, 
unsigned int iovoffset,
 EXPORT_SYMBOL(lnet_copy_kiov2iov);
 
 void
-lnet_copy_iov2kiov(unsigned int nkiov, lnet_kiov_t *kiov, unsigned int 
kiovoffset,
-   unsigned int niov, struct iovec *iov, unsigned int 
iovoffset,
-   unsigned int nob)
+lnet_copy_iov2kiov(unsigned int nkiov, lnet_kiov_t *kiov,
+  unsigned int kiovoffset, unsigned int niov,
+  struct iovec *iov, unsigned int iovoffset,
+  unsigned int nob)
 {
/* NB kiov, iov are READ-ONLY */
unsigned intthis_nob;
@@ -542,7 +543,8 @@ lnet_extract_kiov(int dst_niov, lnet_kiov_t *dst,
 
if (len <= frag_len) {
dst->kiov_len = len;
-   LASSERT(dst->kiov_offset + dst->kiov_len <= 
PAGE_CACHE_SIZE);
+   LASSERT(dst->kiov_offset + dst->kiov_len
+<= PAGE_CACHE_SIZE);
return (niov);
}
 
@@ -1733,7 +1735,8 @@ lnet_parse(lnet_ni_t *ni, lnet_hdr_t *hdr, lnet_nid_t 
from_nid,
 
case LNET_MSG_PUT:
case LNET_MSG_REPLY:
-   if (payload_length > (__u32)(for_me ? LNET_MAX_PAYLOAD : 
LNET_MTU)) {
+   if (payload_length >
+  (__u32)(for_me ? LNET_MAX_PAYLOAD : LNET_MTU)) {
CERROR("%s, src %s: bad %s payload %d "
   "(%d max expected)\n",
   libcfs_nid2str(from_nid),
@@ -1828,7 +1831,9 @@ lnet_parse(lnet_ni_t *ni, lnet_hdr_t *hdr, lnet_nid_t 
from_nid,
goto drop;
}
 
-   /* msg zeroed in lnet_msg_alloc; i.e. flags all clear, pointers NULL 
etc */
+   /* msg zeroed in lnet_msg_alloc;
+* i.e. flags all clear, pointers NULL etc
+*/
 
msg->msg_type = type;
msg->msg_private = private;
@@ -2226,7 +2231,8 @@ EXPORT_SYMBOL(lnet_set_reply_msg_len);
  *
  * \param self,target,portal,match_bits,offset See the discussion in LNetPut().
  * \param mdh A handle for the MD that describes the memory into which the
- * requested data will be received. The MD must be "free floating" (See 
LNetMDBind()).
+ * requested data will be received. The MD must be "free floating"
+ * (See LNetMDBind()).
  *
  * \retval  0  Success, and only in this case events will be generated
  * and logged to EQ (if it exists) of the MD.
-- 
1.8.1.2

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


[PATCH 5/5] staging/lustre/lnet: Reformat pointer variable in lib-move.c

2013-10-18 Thread Lisa Nguyen
Reformat a pointer variable in lib-move.c to meet kernel
coding standards.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/lustre/lnet/lnet/lib-move.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lnet/lnet/lib-move.c 
b/drivers/staging/lustre/lnet/lnet/lib-move.c
index 96d7f86..b6f8ad3 100644
--- a/drivers/staging/lustre/lnet/lnet/lib-move.c
+++ b/drivers/staging/lustre/lnet/lnet/lib-move.c
@@ -1635,7 +1635,7 @@ lnet_msgtyp2str(int type)
 EXPORT_SYMBOL(lnet_msgtyp2str);
 
 void
-lnet_print_hdr(lnet_hdr_t * hdr)
+lnet_print_hdr(lnet_hdr_t *hdr)
 {
lnet_process_id_t src = {0};
lnet_process_id_t dst = {0};
-- 
1.8.1.2

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


[PATCH 4/5] staging/lustre/lnet: Remove () from return statements in lib-move.c

2013-10-18 Thread Lisa Nguyen
Remove unnecessary parentheses from return statements to
eliminate errors generated by checkpatch.pl and meet kernel
coding standards.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/lustre/lnet/lnet/lib-move.c | 26 +-
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/lustre/lnet/lnet/lib-move.c 
b/drivers/staging/lustre/lnet/lnet/lib-move.c
index 1373dff..96d7f86 100644
--- a/drivers/staging/lustre/lnet/lnet/lib-move.c
+++ b/drivers/staging/lustre/lnet/lnet/lib-move.c
@@ -154,7 +154,7 @@ fail_peer(lnet_nid_t nid, int outgoing)
LIBCFS_FREE(tp, sizeof(*tp));
}
 
-   return (fail);
+   return fail;
 }
 
 unsigned int
@@ -165,7 +165,7 @@ lnet_iov_nob(unsigned int niov, struct iovec *iov)
while (niov-- > 0)
nob += (iov++)->iov_len;
 
-   return (nob);
+   return nob;
 }
 EXPORT_SYMBOL(lnet_iov_nob);
 
@@ -240,7 +240,7 @@ lnet_extract_iov(int dst_niov, struct iovec *dst,
unsigned intniov;
 
if (len == 0)  /* no data => */
-   return (0);  /* no frags */
+   return 0;/* no frags */
 
LASSERT(src_niov > 0);
while (offset >= src->iov_len) {  /* skip initial frags */
@@ -260,7 +260,7 @@ lnet_extract_iov(int dst_niov, struct iovec *dst,
 
if (len <= frag_len) {
dst->iov_len = len;
-   return (niov);
+   return niov;
}
 
dst->iov_len = frag_len;
@@ -284,7 +284,7 @@ lnet_kiov_nob(unsigned int niov, lnet_kiov_t *kiov)
while (niov-- > 0)
nob += (kiov++)->kiov_len;
 
-   return (nob);
+   return nob;
 }
 EXPORT_SYMBOL(lnet_kiov_nob);
 
@@ -522,7 +522,7 @@ lnet_extract_kiov(int dst_niov, lnet_kiov_t *dst,
unsigned intniov;
 
if (len == 0)  /* no data => */
-   return (0);  /* no frags */
+   return 0;/* no frags */
 
LASSERT(src_niov > 0);
while (offset >= src->kiov_len) {  /* skip initial frags */
@@ -545,7 +545,7 @@ lnet_extract_kiov(int dst_niov, lnet_kiov_t *dst,
dst->kiov_len = len;
LASSERT(dst->kiov_offset + dst->kiov_len
 <= PAGE_CACHE_SIZE);
-   return (niov);
+   return niov;
}
 
dst->kiov_len = frag_len;
@@ -1619,17 +1619,17 @@ lnet_msgtyp2str(int type)
 {
switch (type) {
case LNET_MSG_ACK:
-   return ("ACK");
+   return "ACK";
case LNET_MSG_PUT:
-   return ("PUT");
+   return "PUT";
case LNET_MSG_GET:
-   return ("GET");
+   return "GET";
case LNET_MSG_REPLY:
-   return ("REPLY");
+   return "REPLY";
case LNET_MSG_HELLO:
-   return ("HELLO");
+   return "HELLO";
default:
-   return ("");
+   return "";
}
 }
 EXPORT_SYMBOL(lnet_msgtyp2str);
-- 
1.8.1.2

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


[PATCH 1/5] staging/lustre/lnet: Remove unnecessary whitespace in lib-move.c

2013-10-18 Thread Lisa Nguyen
Remove unnecessary whitespace around open parentheses in lib-move.c
to meet kernel coding standards.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/lustre/lnet/lnet/lib-move.c | 294 ++--
 1 file changed, 147 insertions(+), 147 deletions(-)

diff --git a/drivers/staging/lustre/lnet/lnet/lib-move.c 
b/drivers/staging/lustre/lnet/lnet/lib-move.c
index 49b0f12..1b05108 100644
--- a/drivers/staging/lustre/lnet/lnet/lib-move.c
+++ b/drivers/staging/lustre/lnet/lnet/lib-move.c
@@ -47,14 +47,14 @@ CFS_MODULE_PARM(local_nid_dist_zero, "i", int, 0444,
"Reserved");
 
 int
-lnet_fail_nid (lnet_nid_t nid, unsigned int threshold)
+lnet_fail_nid(lnet_nid_t nid, unsigned int threshold)
 {
lnet_test_peer_t  *tp;
struct list_head*el;
struct list_head*next;
struct list_head cull;
 
-   LASSERT (the_lnet.ln_init);
+   LASSERT(the_lnet.ln_init);
 
/* NB: use lnet_net_lock(0) to serialize operations on test peers */
if (threshold != 0) {
@@ -77,31 +77,31 @@ lnet_fail_nid (lnet_nid_t nid, unsigned int threshold)
 
lnet_net_lock(0);
 
-   list_for_each_safe (el, next, &the_lnet.ln_test_peers) {
-   tp = list_entry (el, lnet_test_peer_t, tp_list);
+   list_for_each_safe(el, next, &the_lnet.ln_test_peers) {
+   tp = list_entry(el, lnet_test_peer_t, tp_list);
 
if (tp->tp_threshold == 0 ||/* needs culling anyway */
nid == LNET_NID_ANY ||   /* removing all entries */
tp->tp_nid == nid)/* matched this one */
{
-   list_del (&tp->tp_list);
-   list_add (&tp->tp_list, &cull);
+   list_del(&tp->tp_list);
+   list_add(&tp->tp_list, &cull);
}
}
 
lnet_net_unlock(0);
 
-   while (!list_empty (&cull)) {
-   tp = list_entry (cull.next, lnet_test_peer_t, tp_list);
+   while (!list_empty(&cull)) {
+   tp = list_entry(cull.next, lnet_test_peer_t, tp_list);
 
-   list_del (&tp->tp_list);
-   LIBCFS_FREE(tp, sizeof (*tp));
+   list_del(&tp->tp_list);
+   LIBCFS_FREE(tp, sizeof(*tp));
}
return 0;
 }
 
 static int
-fail_peer (lnet_nid_t nid, int outgoing)
+fail_peer(lnet_nid_t nid, int outgoing)
 {
lnet_test_peer_t *tp;
struct list_head   *el;
@@ -109,13 +109,13 @@ fail_peer (lnet_nid_t nid, int outgoing)
struct list_headcull;
intfail = 0;
 
-   INIT_LIST_HEAD (&cull);
+   INIT_LIST_HEAD(&cull);
 
/* NB: use lnet_net_lock(0) to serialize operations on test peers */
lnet_net_lock(0);
 
-   list_for_each_safe (el, next, &the_lnet.ln_test_peers) {
-   tp = list_entry (el, lnet_test_peer_t, tp_list);
+   list_for_each_safe(el, next, &the_lnet.ln_test_peers) {
+   tp = list_entry(el, lnet_test_peer_t, tp_list);
 
if (tp->tp_threshold == 0) {
/* zombie entry */
@@ -123,8 +123,8 @@ fail_peer (lnet_nid_t nid, int outgoing)
/* only cull zombies on outgoing tests,
 * since we may be at interrupt priority on
 * incoming messages. */
-   list_del (&tp->tp_list);
-   list_add (&tp->tp_list, &cull);
+   list_del(&tp->tp_list);
+   list_add(&tp->tp_list, &cull);
}
continue;
}
@@ -138,8 +138,8 @@ fail_peer (lnet_nid_t nid, int outgoing)
if (outgoing &&
tp->tp_threshold == 0) {
/* see above */
-   list_del (&tp->tp_list);
-   list_add (&tp->tp_list, &cull);
+   list_del(&tp->tp_list);
+   list_add(&tp->tp_list, &cull);
}
}
break;
@@ -148,18 +148,18 @@ fail_peer (lnet_nid_t nid, int outgoing)
 
lnet_net_unlock(0);
 
-   while (!list_empty (&cull)) {
-   tp = list_entry (cull.next, lnet_test_peer_t, tp_list);
-   list_del (&tp->tp_list);
+   while (!list_empty(&cull)) {
+   tp = list_entry(cull.next, lnet_test_peer_t, tp_list);
+   list_del(&tp->tp_list);
 
-   LIBCFS_FREE(tp, si

[PATCH 1/2] staging/lustre/lnet: Fix static initialization error in router_proc.c

2013-10-18 Thread Lisa Nguyen
Fixed the static initialization error generated by checkpatch.pl to
meet kernel coding standards.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/lustre/lnet/lnet/router_proc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lnet/lnet/router_proc.c 
b/drivers/staging/lustre/lnet/lnet/router_proc.c
index 931f6ca2..7522028 100644
--- a/drivers/staging/lustre/lnet/lnet/router_proc.c
+++ b/drivers/staging/lustre/lnet/lnet/router_proc.c
@@ -30,7 +30,7 @@
 /* This is really lnet_proc.c. You might need to update sanity test 215
  * if any file format is changed. */
 
-static ctl_table_header_t *lnet_table_header = NULL;
+static ctl_table_header_t *lnet_table_header;
 
 #define CTL_LNET(0x100)
 enum {
-- 
1.8.1.2

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


[PATCH 2/2] staging/lustre/lnet: Remove unnecessary spaces in router_proc.c

2013-10-18 Thread Lisa Nguyen
Remove unnecessary spaces between function names and open
parentheses in router_proc.c to meet kernel coding style.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/lustre/lnet/lnet/router_proc.c | 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/lustre/lnet/lnet/router_proc.c 
b/drivers/staging/lustre/lnet/lnet/router_proc.c
index 7522028..5e47de3 100644
--- a/drivers/staging/lustre/lnet/lnet/router_proc.c
+++ b/drivers/staging/lustre/lnet/lnet/router_proc.c
@@ -158,7 +158,7 @@ int LL_PROC_PROTO(proc_lnet_routes)
off = LNET_PROC_HOFF_GET(*ppos);
ver = LNET_PROC_VER_GET(*ppos);
 
-   LASSERT (!write);
+   LASSERT(!write);
 
if (*lenp == 0)
return 0;
@@ -172,11 +172,11 @@ int LL_PROC_PROTO(proc_lnet_routes)
if (*ppos == 0) {
s += snprintf(s, tmpstr + tmpsiz - s, "Routing %s\n",
  the_lnet.ln_routing ? "enabled" : "disabled");
-   LASSERT (tmpstr + tmpsiz - s > 0);
+   LASSERT(tmpstr + tmpsiz - s > 0);
 
s += snprintf(s, tmpstr + tmpsiz - s, "%-8s %4s %7s %s\n",
  "net", "hops", "state", "router");
-   LASSERT (tmpstr + tmpsiz - s > 0);
+   LASSERT(tmpstr + tmpsiz - s > 0);
 
lnet_net_lock(0);
ver = (unsigned int)the_lnet.ln_remote_nets_version;
@@ -281,7 +281,7 @@ int LL_PROC_PROTO(proc_lnet_routers)
off = LNET_PROC_HOFF_GET(*ppos);
ver = LNET_PROC_VER_GET(*ppos);
 
-   LASSERT (!write);
+   LASSERT(!write);
 
if (*lenp == 0)
return 0;
@@ -375,7 +375,7 @@ int LL_PROC_PROTO(proc_lnet_routers)
  pingsent,
  
cfs_duration_sec(cfs_time_sub(deadline, now)),
  down_ni, libcfs_nid2str(nid));
-   LASSERT (tmpstr + tmpsiz - s > 0);
+   LASSERT(tmpstr + tmpsiz - s > 0);
}
 
lnet_net_unlock(0);
@@ -437,7 +437,7 @@ int LL_PROC_PROTO(proc_lnet_peers)
  "%-24s %4s %5s %5s %5s %5s %5s %5s %5s %s\n",
  "nid", "refs", "state", "last", "max",
  "rtr", "min", "tx", "min", "queue");
-   LASSERT (tmpstr + tmpsiz - s > 0);
+   LASSERT(tmpstr + tmpsiz - s > 0);
 
hoff++;
} else {
@@ -534,7 +534,7 @@ int LL_PROC_PROTO(proc_lnet_peers)
  libcfs_nid2str(nid), nrefs, aliveness,
  lastalive, maxcr, rtrcr, minrtrcr, txcr,
  mintxcr, txqnob);
-   LASSERT (tmpstr + tmpsiz - s > 0);
+   LASSERT(tmpstr + tmpsiz - s > 0);
 
} else { /* peer is NULL */
lnet_net_unlock(cpt);
@@ -592,7 +592,7 @@ static int __proc_lnet_buffers(void *data, int write,
s += snprintf(s, tmpstr + tmpsiz - s,
  "%5s %5s %7s %7s\n",
  "pages", "count", "credits", "min");
-   LASSERT (tmpstr + tmpsiz - s > 0);
+   LASSERT(tmpstr + tmpsiz - s > 0);
 
if (the_lnet.ln_rtrpools == NULL)
goto out; /* I'm not a router */
@@ -638,7 +638,7 @@ int LL_PROC_PROTO(proc_lnet_nis)
 
DECLARE_LL_PROC_PPOS_DECL;
 
-   LASSERT (!write);
+   LASSERT(!write);
 
if (*lenp == 0)
return 0;
@@ -654,7 +654,7 @@ int LL_PROC_PROTO(proc_lnet_nis)
  "%-24s %6s %5s %4s %4s %4s %5s %5s %5s\n",
  "nid", "status", "alive", "refs", "peer",
  "rtr", "max", "tx", "min");
-   LASSERT (tmpstr + tmpsiz - s > 0);
+   LASSERT(tmpstr + tmpsiz - s > 0);
} else {
struct list_head*n;
lnet_ni_t*ni   = NULL;
-- 
1.8.1.2

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


[PATCH] staging: lustre: libcfs: Remove new typedef in bitmap.h

2013-10-19 Thread Lisa Nguyen
Fix cfs_bitmap_t struct and function parameters to eliminate the
"Do not add new typedefs" warning generated by checkpatch.pl and
meet kernel coding style.

Signed-off-by: Lisa Nguyen 
---
 .../staging/lustre/include/linux/libcfs/bitmap.h   | 22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/libcfs/bitmap.h 
b/drivers/staging/lustre/include/linux/libcfs/bitmap.h
index f3d4a89..d1538b0 100644
--- a/drivers/staging/lustre/include/linux/libcfs/bitmap.h
+++ b/drivers/staging/lustre/include/linux/libcfs/bitmap.h
@@ -37,18 +37,18 @@
 #define _LIBCFS_BITMAP_H_
 
 
-typedef struct {
+struct cfs_bitmap_t {
int  size;
unsigned long   data[0];
-} cfs_bitmap_t;
+};
 
 #define CFS_BITMAP_SIZE(nbits) \
- (((nbits/BITS_PER_LONG)+1)*sizeof(long)+sizeof(cfs_bitmap_t))
+ (((nbits/BITS_PER_LONG)+1)*sizeof(long)+sizeof(struct cfs_bitmap_t))
 
-static inline
+static inline struct
 cfs_bitmap_t *CFS_ALLOCATE_BITMAP(int size)
 {
-   cfs_bitmap_t *ptr;
+   struct cfs_bitmap_t *ptr;
 
OBD_ALLOC(ptr, CFS_BITMAP_SIZE(size));
if (ptr == NULL)
@@ -62,38 +62,38 @@ cfs_bitmap_t *CFS_ALLOCATE_BITMAP(int size)
 #define CFS_FREE_BITMAP(ptr)   OBD_FREE(ptr, CFS_BITMAP_SIZE(ptr->size))
 
 static inline
-void cfs_bitmap_set(cfs_bitmap_t *bitmap, int nbit)
+void cfs_bitmap_set(struct cfs_bitmap_t *bitmap, int nbit)
 {
set_bit(nbit, bitmap->data);
 }
 
 static inline
-void cfs_bitmap_clear(cfs_bitmap_t *bitmap, int nbit)
+void cfs_bitmap_clear(struct cfs_bitmap_t *bitmap, int nbit)
 {
test_and_clear_bit(nbit, bitmap->data);
 }
 
 static inline
-int cfs_bitmap_check(cfs_bitmap_t *bitmap, int nbit)
+int cfs_bitmap_check(struct cfs_bitmap_t *bitmap, int nbit)
 {
return test_bit(nbit, bitmap->data);
 }
 
 static inline
-int cfs_bitmap_test_and_clear(cfs_bitmap_t *bitmap, int nbit)
+int cfs_bitmap_test_and_clear(struct cfs_bitmap_t *bitmap, int nbit)
 {
return test_and_clear_bit(nbit, bitmap->data);
 }
 
 /* return 0 is bitmap has none set bits */
 static inline
-int cfs_bitmap_check_empty(cfs_bitmap_t *bitmap)
+int cfs_bitmap_check_empty(struct cfs_bitmap_t *bitmap)
 {
return find_first_bit(bitmap->data, bitmap->size) == bitmap->size;
 }
 
 static inline
-void cfs_bitmap_copy(cfs_bitmap_t *new, cfs_bitmap_t *old)
+void cfs_bitmap_copy(struct cfs_bitmap_t *new, struct cfs_bitmap_t *old)
 {
int newsize;
 
-- 
1.8.1.2

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


[PATCH v2] staging: lustre: libcfs: Remove new typedef in bitmap.h

2013-10-19 Thread Lisa Nguyen
Fix cfs_bitmap struct, function parameters, and variable
declarations to eliminate the "Do not add new typedefs"
warning generated by checkpatch.pl and meet kernel coding
style.

Signed-off-by: Lisa Nguyen 
---

Changes since v2:
- Original patch had struct cfs_bitmap_t. Struct is renamed to
cfs_bitmap, following the Linux naming convention.

 drivers/staging/lustre/include/linux/libcfs/bitmap.h | 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/libcfs/bitmap.h 
b/drivers/staging/lustre/include/linux/libcfs/bitmap.h
index d1538b0..7cf912e 100644
--- a/drivers/staging/lustre/include/linux/libcfs/bitmap.h
+++ b/drivers/staging/lustre/include/linux/libcfs/bitmap.h
@@ -37,18 +37,18 @@
 #define _LIBCFS_BITMAP_H_
 
 
-struct cfs_bitmap_t {
+struct cfs_bitmap {
int  size;
unsigned long   data[0];
 };
 
 #define CFS_BITMAP_SIZE(nbits) \
- (((nbits/BITS_PER_LONG)+1)*sizeof(long)+sizeof(struct cfs_bitmap_t))
+ (((nbits/BITS_PER_LONG)+1)*sizeof(long)+sizeof(struct cfs_bitmap))
 
 static inline struct
-cfs_bitmap_t *CFS_ALLOCATE_BITMAP(int size)
+cfs_bitmap *CFS_ALLOCATE_BITMAP(int size)
 {
-   struct cfs_bitmap_t *ptr;
+   struct cfs_bitmap *ptr;
 
OBD_ALLOC(ptr, CFS_BITMAP_SIZE(size));
if (ptr == NULL)
@@ -62,38 +62,38 @@ cfs_bitmap_t *CFS_ALLOCATE_BITMAP(int size)
 #define CFS_FREE_BITMAP(ptr)   OBD_FREE(ptr, CFS_BITMAP_SIZE(ptr->size))
 
 static inline
-void cfs_bitmap_set(struct cfs_bitmap_t *bitmap, int nbit)
+void cfs_bitmap_set(struct cfs_bitmap *bitmap, int nbit)
 {
set_bit(nbit, bitmap->data);
 }
 
 static inline
-void cfs_bitmap_clear(struct cfs_bitmap_t *bitmap, int nbit)
+void cfs_bitmap_clear(struct cfs_bitmap *bitmap, int nbit)
 {
test_and_clear_bit(nbit, bitmap->data);
 }
 
 static inline
-int cfs_bitmap_check(struct cfs_bitmap_t *bitmap, int nbit)
+int cfs_bitmap_check(struct cfs_bitmap *bitmap, int nbit)
 {
return test_bit(nbit, bitmap->data);
 }
 
 static inline
-int cfs_bitmap_test_and_clear(struct cfs_bitmap_t *bitmap, int nbit)
+int cfs_bitmap_test_and_clear(struct cfs_bitmap *bitmap, int nbit)
 {
return test_and_clear_bit(nbit, bitmap->data);
 }
 
 /* return 0 is bitmap has none set bits */
 static inline
-int cfs_bitmap_check_empty(struct cfs_bitmap_t *bitmap)
+int cfs_bitmap_check_empty(struct cfs_bitmap *bitmap)
 {
return find_first_bit(bitmap->data, bitmap->size) == bitmap->size;
 }
 
 static inline
-void cfs_bitmap_copy(struct cfs_bitmap_t *new, struct cfs_bitmap_t *old)
+void cfs_bitmap_copy(struct cfs_bitmap *new, struct cfs_bitmap *old)
 {
int newsize;
 
-- 
1.8.1.2

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


[PATCH v3] staging: lustre: libcfs: Remove new typedef in bitmap.h

2013-10-19 Thread Lisa Nguyen
Fix cfs_bitmap struct, function parameters, and variable
declarations to resolve the "Do not add new typedefs"
warning generated by checkpatch.pl in bitmap.h and meet
kernel coding style.

Signed-off-by: Lisa Nguyen 
---

Changes since v3:
- Combining the previous two patch versions into one!

 .../staging/lustre/include/linux/libcfs/bitmap.h   | 25 +++---
 1 file changed, 12 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/libcfs/bitmap.h 
b/drivers/staging/lustre/include/linux/libcfs/bitmap.h
index f3d4a89..a093d2d 100644
--- a/drivers/staging/lustre/include/linux/libcfs/bitmap.h
+++ b/drivers/staging/lustre/include/linux/libcfs/bitmap.h
@@ -36,19 +36,18 @@
 #ifndef _LIBCFS_BITMAP_H_
 #define _LIBCFS_BITMAP_H_
 
-
-typedef struct {
+struct cfs_bitmap {
int  size;
unsigned long   data[0];
-} cfs_bitmap_t;
+};
 
 #define CFS_BITMAP_SIZE(nbits) \
- (((nbits/BITS_PER_LONG)+1)*sizeof(long)+sizeof(cfs_bitmap_t))
+ (((nbits/BITS_PER_LONG)+1)*sizeof(long)+sizeof(struct cfs_bitmap))
 
-static inline
-cfs_bitmap_t *CFS_ALLOCATE_BITMAP(int size)
+static inline struct
+cfs_bitmap *CFS_ALLOCATE_BITMAP(int size)
 {
-   cfs_bitmap_t *ptr;
+   cfs_bitmap *ptr;
 
OBD_ALLOC(ptr, CFS_BITMAP_SIZE(size));
if (ptr == NULL)
@@ -62,38 +61,38 @@ cfs_bitmap_t *CFS_ALLOCATE_BITMAP(int size)
 #define CFS_FREE_BITMAP(ptr)   OBD_FREE(ptr, CFS_BITMAP_SIZE(ptr->size))
 
 static inline
-void cfs_bitmap_set(cfs_bitmap_t *bitmap, int nbit)
+void cfs_bitmap_set(struct cfs_bitmap *bitmap, int nbit)
 {
set_bit(nbit, bitmap->data);
 }
 
 static inline
-void cfs_bitmap_clear(cfs_bitmap_t *bitmap, int nbit)
+void cfs_bitmap_clear(struct cfs_bitmap *bitmap, int nbit)
 {
test_and_clear_bit(nbit, bitmap->data);
 }
 
 static inline
-int cfs_bitmap_check(cfs_bitmap_t *bitmap, int nbit)
+int cfs_bitmap_check(struct cfs_bitmap *bitmap, int nbit)
 {
return test_bit(nbit, bitmap->data);
 }
 
 static inline
-int cfs_bitmap_test_and_clear(cfs_bitmap_t *bitmap, int nbit)
+int cfs_bitmap_test_and_clear(struct cfs_bitmap *bitmap, int nbit)
 {
return test_and_clear_bit(nbit, bitmap->data);
 }
 
 /* return 0 is bitmap has none set bits */
 static inline
-int cfs_bitmap_check_empty(cfs_bitmap_t *bitmap)
+int cfs_bitmap_check_empty(struct cfs_bitmap *bitmap)
 {
return find_first_bit(bitmap->data, bitmap->size) == bitmap->size;
 }
 
 static inline
-void cfs_bitmap_copy(cfs_bitmap_t *new, cfs_bitmap_t *old)
+void cfs_bitmap_copy(struct cfs_bitmap *new, struct cfs_bitmap *old)
 {
int newsize;
 
-- 
1.8.1.2

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


Re: [PATCH v3] staging: lustre: libcfs: Remove new typedef in bitmap.h

2013-10-19 Thread Lisa Nguyen
On Sat, Oct 19, 2013 at 2:39 PM, Dan Carpenter  wrote:
> Your patch is great, but actually, are any of the functions in this
> header used?  `grep cfs_bitmap drivers/staging/lustre/ -Rl` only shows
> this header file.
>
> Perhaps we can delete the whole thing?
>
> regards,
> dan carpenter

Ah, good point. I didn't think about that. I ran your grep command and
got the same results.

Since that is the case, is there a specific protocol I have to follow
and suggest for this particular header file to be deleted? It's my
first time running into this situation.

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


Re: [PATCH v3] staging: lustre: libcfs: Remove new typedef in bitmap.h

2013-10-20 Thread Lisa Nguyen
On Sun, Oct 20, 2013 at 12:43 AM, Greg KH  wrote:
> On Sat, Oct 19, 2013 at 04:15:25PM -0700, Lisa Nguyen wrote:
>> On Sat, Oct 19, 2013 at 2:39 PM, Dan Carpenter  
>> wrote:
>> > Your patch is great, but actually, are any of the functions in this
>> > header used?  `grep cfs_bitmap drivers/staging/lustre/ -Rl` only shows
>> > this header file.
>> >
>> > Perhaps we can delete the whole thing?
>> >
>> > regards,
>> > dan carpenter
>>
>> Ah, good point. I didn't think about that. I ran your grep command and
>> got the same results.
>>
>> Since that is the case, is there a specific protocol I have to follow
>> and suggest for this particular header file to be deleted? It's my
>> first time running into this situation.
>
> Just email saying, "Ignore this patch, please replace it with this newer
> one", or just do a "v4" that does this as well.
>
> thanks,
>
> greg k-h

Greg, please ignore this patch as I have submitted a new one to be
applied. The new patch title should say, "Remove bitmap.h file".

Dan, thank you for your suggestion.

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


[PATCH] staging: lustre: libcfs: Remove bitmap.h file

2013-10-20 Thread Lisa Nguyen
The functions in the bitmap.h header file are not being used by
any source file in the lustre driver.

Unless there are any objections, please remove the bitmap.h
header file as it contains unused code in the kernel.

Signed-off-by: Lisa Nguyen 
---
 .../staging/lustre/include/linux/libcfs/bitmap.h   | 110 -
 1 file changed, 110 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/libcfs/bitmap.h 
b/drivers/staging/lustre/include/linux/libcfs/bitmap.h
index f3d4a89..8b13789 100644
--- a/drivers/staging/lustre/include/linux/libcfs/bitmap.h
+++ b/drivers/staging/lustre/include/linux/libcfs/bitmap.h
@@ -1,111 +1 @@
-/*
- * GPL HEADER START
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 only,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License version 2 for more details (a copy is included
- * in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU General Public License
- * version 2 along with this program; If not, see
- * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- *
- * GPL HEADER END
- */
-/*
- * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
- * Use is subject to license terms.
- *
- * Copyright (c) 2012, Intel Corporation.
- */
-/*
- * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
- */
-#ifndef _LIBCFS_BITMAP_H_
-#define _LIBCFS_BITMAP_H_
 
-
-typedef struct {
-   int  size;
-   unsigned long   data[0];
-} cfs_bitmap_t;
-
-#define CFS_BITMAP_SIZE(nbits) \
- (((nbits/BITS_PER_LONG)+1)*sizeof(long)+sizeof(cfs_bitmap_t))
-
-static inline
-cfs_bitmap_t *CFS_ALLOCATE_BITMAP(int size)
-{
-   cfs_bitmap_t *ptr;
-
-   OBD_ALLOC(ptr, CFS_BITMAP_SIZE(size));
-   if (ptr == NULL)
-   return ptr;
-
-   ptr->size = size;
-
-   return ptr;
-}
-
-#define CFS_FREE_BITMAP(ptr)   OBD_FREE(ptr, CFS_BITMAP_SIZE(ptr->size))
-
-static inline
-void cfs_bitmap_set(cfs_bitmap_t *bitmap, int nbit)
-{
-   set_bit(nbit, bitmap->data);
-}
-
-static inline
-void cfs_bitmap_clear(cfs_bitmap_t *bitmap, int nbit)
-{
-   test_and_clear_bit(nbit, bitmap->data);
-}
-
-static inline
-int cfs_bitmap_check(cfs_bitmap_t *bitmap, int nbit)
-{
-   return test_bit(nbit, bitmap->data);
-}
-
-static inline
-int cfs_bitmap_test_and_clear(cfs_bitmap_t *bitmap, int nbit)
-{
-   return test_and_clear_bit(nbit, bitmap->data);
-}
-
-/* return 0 is bitmap has none set bits */
-static inline
-int cfs_bitmap_check_empty(cfs_bitmap_t *bitmap)
-{
-   return find_first_bit(bitmap->data, bitmap->size) == bitmap->size;
-}
-
-static inline
-void cfs_bitmap_copy(cfs_bitmap_t *new, cfs_bitmap_t *old)
-{
-   int newsize;
-
-   LASSERT(new->size >= old->size);
-   newsize = new->size;
-   memcpy(new, old, CFS_BITMAP_SIZE(old->size));
-   new->size = newsize;
-}
-
-#define cfs_foreach_bit(bitmap, pos)   \
-   for ((pos) = find_first_bit((bitmap)->data, bitmap->size);  \
-(pos) < (bitmap)->size;\
-(pos) = find_next_bit((bitmap)->data, (bitmap)->size, (pos) + 1))
-
-#endif
-- 
1.8.1.2

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


[PATCH 00/22] staging: lustre: Update structs

2013-10-20 Thread Lisa Nguyen
This patchset includes all the changes needed to update
the structs defined in libcfs_hash.h. Doing this will 
eliminate the "Do not add new typedefs" warning
generated by checkpatch.pl and the updated format of 
those structs will meet kernel coding style.

Other header files and certain source files that use 
functions and structs defined in libcfs_hash.h have updated
struct variables.

I have CC'ed the lustre driver authors to keep them 
informed of this update.

Questions and comments are welcomed.

Lisa Nguyen (22):
  staging: lustre: Remove all new typedefs in libcfs_hash.h
  staging: lustre: Update struct variables in lu_object.h
  staging: lustre: Update struct variables in lustre_dlm.h
  staging: lustre: Update struct variables in lustre_export.h
  staging: lustre: Update struct variables in lustre_net.h
  staging: lustre: Update struct variables in obd.h
  staging: lustre: Update struct variables in lov_internal.h
  staging: lustre: Update struct variables in hash.c
  staging: lustre: Update struct variables in ldlm_flock.c
  staging: lustre: Update struct variables in ldlm_lock.c
  staging: lustre: Update struct variables in ldlm_request.c
  staging: lustre: Update struct variables in ldlm_resource.c
  staging: lustre: Update struct variables in ldlm_lockd.c
  staging: lustre: Update struct variables in vvp_dev.c
  staging: lustre: Update struct variables in lov_pool.c
  staging: lustre: Update struct variables in cl_object.c
  staging: lustre: Update struct variables in genops.c
  staging: lustre: Update struct variables in lprocfs_status.c
  staging: lustre: Update struct variables in lu_object.c
  staging: lustre: Update struct variables in obd_config.c
  staging: lustre: Update struct variables in osc_quota.c
  staging: lustre: Update struct variables in connection.c

 .../lustre/include/linux/libcfs/libcfs_hash.h  | 280 ++---
 drivers/staging/lustre/lustre/include/lu_object.h  |   4 +-
 drivers/staging/lustre/lustre/include/lustre_dlm.h |   2 +-
 .../staging/lustre/lustre/include/lustre_export.h  |   4 +-
 drivers/staging/lustre/lustre/include/lustre_net.h |   4 +-
 drivers/staging/lustre/lustre/include/obd.h|  10 +-
 drivers/staging/lustre/lustre/ldlm/ldlm_flock.c|   8 +-
 drivers/staging/lustre/lustre/ldlm/ldlm_lock.c |   4 +-
 drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c|   8 +-
 drivers/staging/lustre/lustre/ldlm/ldlm_request.c  |   4 +-
 drivers/staging/lustre/lustre/ldlm/ldlm_resource.c |  34 +--
 drivers/staging/lustre/lustre/libcfs/hash.c| 270 ++--
 drivers/staging/lustre/lustre/llite/vvp_dev.c  |   2 +-
 drivers/staging/lustre/lustre/lov/lov_internal.h   |   2 +-
 drivers/staging/lustre/lustre/lov/lov_pool.c   |   8 +-
 drivers/staging/lustre/lustre/obdclass/cl_object.c |   8 +-
 drivers/staging/lustre/lustre/obdclass/genops.c|   6 +-
 .../lustre/lustre/obdclass/lprocfs_status.c|   6 +-
 drivers/staging/lustre/lustre/obdclass/lu_object.c |  42 ++--
 .../staging/lustre/lustre/obdclass/obd_config.c|  28 +--
 drivers/staging/lustre/lustre/osc/osc_quota.c  |  10 +-
 drivers/staging/lustre/lustre/ptlrpc/connection.c  |  14 +-
 22 files changed, 379 insertions(+), 379 deletions(-)

-- 
1.8.1.2

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


[PATCH 03/22] staging: lustre: Update struct variables in lustre_dlm.h

2013-10-20 Thread Lisa Nguyen
Assuming the patch to update the structs in libcfs_hash header
file has been applied, this patch will update the struct variables
in lustre_dlm.h to avoid build errors.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/lustre/lustre/include/lustre_dlm.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre_dlm.h 
b/drivers/staging/lustre/lustre/include/lustre_dlm.h
index 7020d9c..c552903 100644
--- a/drivers/staging/lustre/lustre/include/lustre_dlm.h
+++ b/drivers/staging/lustre/lustre/include/lustre_dlm.h
@@ -375,7 +375,7 @@ struct ldlm_namespace {
ldlm_side_t ns_client;
 
/** Resource hash table for namespace. */
-   cfs_hash_t  *ns_rs_hash;
+   struct cfs_hash *ns_rs_hash;
 
/** serialize */
spinlock_t  ns_lock;
-- 
1.8.1.2

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


[PATCH 01/22] staging: lustre: Remove all new typedefs in libcfs_hash.h

2013-10-20 Thread Lisa Nguyen
Modified all structs in libcfs_hash header file to eliminate
the "Do not add new typedefs" warning generated by checkpatch.pl
and meet kernel coding style.

Signed-off-by: Lisa Nguyen 
---
 .../lustre/include/linux/libcfs/libcfs_hash.h  | 280 ++---
 1 file changed, 140 insertions(+), 140 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h 
b/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h
index 98f5be2..1e1e0f5 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h
@@ -81,10 +81,10 @@ struct cfs_hash_ops;
 struct cfs_hash_lock_ops;
 struct cfs_hash_hlist_ops;
 
-typedef union {
+union cfs_hash_lock {
rwlock_trw; /**< rwlock */
spinlock_t  spin;   /**< spinlock */
-} cfs_hash_lock_t;
+};
 
 /**
  * cfs_hash_bucket is a container of:
@@ -97,22 +97,22 @@ typedef union {
  *   which depends on requirement of user
  * - some extra bytes (caller can require it while creating hash)
  */
-typedef struct cfs_hash_bucket {
-   cfs_hash_lock_t hsb_lock;   /**< bucket lock */
+struct cfs_hash_bucket {
+   union cfs_hash_lock hsb_lock;   /**< bucket lock */
__u32   hsb_count;  /**< current entries */
__u32   hsb_version;/**< change version */
unsigned inthsb_index;  /**< index of bucket */
int hsb_depmax; /**< max depth on bucket */
longhsb_head[0];/**< hash-head array */
-} cfs_hash_bucket_t;
+};
 
 /**
  * cfs_hash bucket descriptor, it's normally in stack of caller
  */
-typedef struct cfs_hash_bd {
-   cfs_hash_bucket_t *bd_bucket;  /**< address of bucket */
+struct cfs_hash_bd {
+   struct cfs_hash_bucket *bd_bucket;  /**< address of bucket */
unsigned intbd_offset;  /**< offset in bucket */
-} cfs_hash_bd_t;
+};
 
 #define CFS_HASH_NAME_LEN 16  /**< default name length */
 #define CFS_HASH_BIGNAME_LEN   64  /**< bigname for param tree */
@@ -210,10 +210,10 @@ enum cfs_hash_tag {
  * locations; additions must take care to only insert into the new bucket.
  */
 
-typedef struct cfs_hash {
+struct cfs_hash {
/** serialize with rehash, or serialize all operations if
 * the hash-table has CFS_HASH_NO_BKTLOCK */
-   cfs_hash_lock_t  hs_lock;
+   union cfs_hash_lock  hs_lock;
/** hash operations */
struct cfs_hash_ops *hs_ops;
/** hash lock operations */
@@ -221,10 +221,10 @@ typedef struct cfs_hash {
/** hash list operations */
struct cfs_hash_hlist_ops  *hs_hops;
/** hash buckets-table */
-   cfs_hash_bucket_t**hs_buckets;
+   struct cfs_hash_bucket   **hs_buckets;
/** total number of items on this hash-table */
atomic_ths_count;
-   /** hash flags, see cfs_hash_tag for detail */
+   /** hash flags, see struct cfs_hashag for detail */
__u16  hs_flags;
/** # of extra-bytes for bucket, for user saving extended attributes */
__u16  hs_extra_bytes;
@@ -255,7 +255,7 @@ typedef struct cfs_hash {
/** refcount on this hash table */
atomic_ths_refcount;
/** rehash buckets-table */
-   cfs_hash_bucket_t**hs_rehash_buckets;
+   struct cfs_hash_bucket   **hs_rehash_buckets;
 #if CFS_HASH_DEBUG_LEVEL >= CFS_HASH_DEBUG_1
/** serialize debug members */
spinlock_t  hs_dep_lock;
@@ -272,35 +272,35 @@ typedef struct cfs_hash {
 #endif
/** name of htable */
charhs_name[0];
-} cfs_hash_t;
+};
 
-typedef struct cfs_hash_lock_ops {
+struct cfs_hash_lock_ops {
/** lock the hash table */
-   void(*hs_lock)(cfs_hash_lock_t *lock, int exclusive);
+   void(*hs_lock)(union cfs_hash_lock *lock, int exclusive);
/** unlock the hash table */
-   void(*hs_unlock)(cfs_hash_lock_t *lock, int exclusive);
+   void(*hs_unlock)(union cfs_hash_lock *lock, int exclusive);
/** lock the hash bucket */
-   void(*hs_bkt_lock)(cfs_hash_lock_t *lock, int exclusive);
+   void(*hs_bkt_lock)(union cfs_hash_lock *lock, int exclusive);
/** unlock the hash bucket */
-   void(*hs_bkt_unlock)(cfs_hash_lock_t *lock, int exclusive);
-} cfs_hash_lock_ops_t;
+   void(*hs_bkt_unlock)(union cfs_hash_lock *lock, int exclusive);
+};
 
-typedef struct cfs_hash_hlist_ops {
+struct cfs_hash_hlist_ops {
/** return hlist_head of hash-head of @bd */
-   struct hlist_head *(*hop_hhead)(cfs_hash_t *hs, cfs_hash_bd_t *bd);
+   struct hlist_hea

[PATCH 02/22] staging: lustre: Update struct variables in lu_object.h

2013-10-20 Thread Lisa Nguyen
Assuming the patch to update the structs in libcfs_hash header
file has been applied, this will update the struct variables
in lu_object.h to avoid build errors.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/lustre/lustre/include/lu_object.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lu_object.h 
b/drivers/staging/lustre/lustre/include/lu_object.h
index fa31be8..d5b8225 100644
--- a/drivers/staging/lustre/lustre/include/lu_object.h
+++ b/drivers/staging/lustre/lustre/include/lu_object.h
@@ -622,7 +622,7 @@ struct lu_site {
/**
 * objects hash table
 */
-   cfs_hash_t *ls_obj_hash;
+   struct cfs_hash*ls_obj_hash;
/**
 * index of bucket on hash table while purging
 */
@@ -659,7 +659,7 @@ struct lu_site {
 static inline struct lu_site_bkt_data *
 lu_site_bkt_from_fid(struct lu_site *site, struct lu_fid *fid)
 {
-   cfs_hash_bd_t bd;
+   struct cfs_hash_bd bd;
 
cfs_hash_bd_get(site->ls_obj_hash, fid, &bd);
return cfs_hash_bd_extra_get(site->ls_obj_hash, &bd);
-- 
1.8.1.2

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


[PATCH 04/22] staging: lustre: Update struct variables in lustre_export.h

2013-10-20 Thread Lisa Nguyen
Assuming the patch to update the structs in libcfs_hash header
file has been applied, this will update the struct variables
in lustre_export.h to avoid build errors.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/lustre/lustre/include/lustre_export.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre_export.h 
b/drivers/staging/lustre/lustre/include/lustre_export.h
index d61c020..2feb38b 100644
--- a/drivers/staging/lustre/lustre/include/lustre_export.h
+++ b/drivers/staging/lustre/lustre/include/lustre_export.h
@@ -197,12 +197,12 @@ struct obd_export {
/** Connection count value from last succesful reconnect rpc */
__u32exp_conn_cnt;
/** Hash list of all ldlm locks granted on this export */
-   cfs_hash_t *exp_lock_hash;
+   struct cfs_hash*exp_lock_hash;
/**
 * Hash list for Posix lock deadlock detection, added with
 * ldlm_lock::l_exp_flock_hash.
 */
-   cfs_hash_t *exp_flock_hash;
+   struct cfs_hash*exp_flock_hash;
struct list_headexp_outstanding_replies;
struct list_headexp_uncommitted_replies;
spinlock_texp_uncommitted_replies_lock;
-- 
1.8.1.2

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


[PATCH 05/22] staging: lustre: Update struct variables in lustre_net.h

2013-10-20 Thread Lisa Nguyen
Assuming the patch to update the structs in libcfs_hash header
file has been applied, this patch will update the struct variables
in lustre_net.h to avoid build errors.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/lustre/lustre/include/lustre_net.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre_net.h 
b/drivers/staging/lustre/lustre/include/lustre_net.h
index e947002..a86a952 100644
--- a/drivers/staging/lustre/lustre/include/lustre_net.h
+++ b/drivers/staging/lustre/lustre/include/lustre_net.h
@@ -1427,7 +1427,7 @@ struct nrs_fifo_req {
 struct nrs_crrn_net {
struct ptlrpc_nrs_resource  cn_res;
cfs_binheap_t  *cn_binheap;
-   cfs_hash_t *cn_cli_hash;
+   struct cfs_hash*cn_cli_hash;
/**
 * Used when a new scheduling round commences, in order to synchronize
 * all clients with the new round number.
@@ -1568,7 +1568,7 @@ struct nrs_orr_key {
 struct nrs_orr_data {
struct ptlrpc_nrs_resource  od_res;
cfs_binheap_t  *od_binheap;
-   cfs_hash_t *od_obj_hash;
+   struct cfs_hash*od_obj_hash;
struct kmem_cache  *od_cache;
/**
 * Used when a new scheduling round commences, in order to synchronize
-- 
1.8.1.2

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


[PATCH 06/22] staging: lustre: Update struct variables in obd.h

2013-10-20 Thread Lisa Nguyen
Assuming the patch to update the structs in libcfs_hash header
file has been applied, this patch will update the struct variables
in obd.h to avoid build errors.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/lustre/lustre/include/obd.h | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/obd.h 
b/drivers/staging/lustre/lustre/include/obd.h
index 4fd4af9..d0aea15 100644
--- a/drivers/staging/lustre/lustre/include/obd.h
+++ b/drivers/staging/lustre/lustre/include/obd.h
@@ -429,7 +429,7 @@ struct client_obd {
/* ptlrpc work for writeback in ptlrpcd context */
void*cl_writeback_work;
/* hash tables for osc_quota_info */
-   cfs_hash_t*cl_quota_hash[MAXQUOTAS];
+   struct cfs_hash   *cl_quota_hash[MAXQUOTAS];
 };
 #define obd2cli_tgt(obd) ((char *)(obd)->u.cli.cl_target_uuid.uuid)
 
@@ -556,7 +556,7 @@ struct lov_obd {
__u32  lov_tgt_size;   /* size of tgts array */
int  lov_connects;
int  lov_pool_count;
-   cfs_hash_t   *lov_pools_hash_body; /* used for key access */
+   struct cfs_hash  *lov_pools_hash_body; /* used for key access */
struct list_head  lov_pool_list; /* used for sequential 
access */
struct proc_dir_entry   *lov_pool_proc_entry;
enum lustre_sec_partlov_sp_me;
@@ -855,11 +855,11 @@ struct obd_device {
 * protection of other bits using _bh lock */
unsigned long obd_recovery_expired:1;
/* uuid-export hash body */
-   cfs_hash_t   *obd_uuid_hash;
+   struct cfs_hash  *obd_uuid_hash;
/* nid-export hash body */
-   cfs_hash_t   *obd_nid_hash;
+   struct cfs_hash  *obd_nid_hash;
/* nid stats body */
-   cfs_hash_t   *obd_nid_stats_hash;
+   struct cfs_hash  *obd_nid_stats_hash;
struct list_head  obd_nid_stats;
atomic_tobd_refcount;
wait_queue_head_tobd_refcount_waitq;
-- 
1.8.1.2

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


[PATCH 07/22] staging: lustre: Update struct variables in lov_internal.h

2013-10-20 Thread Lisa Nguyen
Assuming the patch to update the structs in libcfs_hash header
file has been applied, this patch will update the struct variables
in lov_internal.h to avoid build errors.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/lustre/lustre/lov/lov_internal.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/lov/lov_internal.h 
b/drivers/staging/lustre/lustre/lov/lov_internal.h
index 9870d36..9ec6cb0 100644
--- a/drivers/staging/lustre/lustre/lov/lov_internal.h
+++ b/drivers/staging/lustre/lustre/lov/lov_internal.h
@@ -295,7 +295,7 @@ static inline void lprocfs_lov_init_vars(struct 
lprocfs_static_vars *lvars)
 extern struct lu_device_type lov_device_type;
 
 /* pools */
-extern cfs_hash_ops_t pool_hash_operations;
+extern struct cfs_hash_ops pool_hash_operations;
 /* ost_pool methods */
 int lov_ost_pool_init(struct ost_pool *op, unsigned int count);
 int lov_ost_pool_extend(struct ost_pool *op, unsigned int min_count);
-- 
1.8.1.2

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


[PATCH 09/22] staging: lustre: Update struct variables in ldlm_flock.c

2013-10-20 Thread Lisa Nguyen
Assuming the patch to update the structs in libcfs_hash header
file has been applied, this patch will update the struct variables
in ldlm_flock.c to avoid build errors.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c 
b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c
index c68ed27..3d881a0 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c
@@ -745,7 +745,7 @@ void ldlm_flock_policy_local_to_wire(const 
ldlm_policy_data_t *lpolicy,
  * Export handle<->flock hash operations.
  */
 static unsigned
-ldlm_export_flock_hash(cfs_hash_t *hs, const void *key, unsigned mask)
+ldlm_export_flock_hash(struct cfs_hash *hs, const void *key, unsigned mask)
 {
return cfs_hash_u64_hash(*(__u64 *)key, mask);
 }
@@ -772,7 +772,7 @@ ldlm_export_flock_object(struct hlist_node *hnode)
 }
 
 static void
-ldlm_export_flock_get(cfs_hash_t *hs, struct hlist_node *hnode)
+ldlm_export_flock_get(struct cfs_hash *hs, struct hlist_node *hnode)
 {
struct ldlm_lock *lock;
struct ldlm_flock *flock;
@@ -787,7 +787,7 @@ ldlm_export_flock_get(cfs_hash_t *hs, struct hlist_node 
*hnode)
 }
 
 static void
-ldlm_export_flock_put(cfs_hash_t *hs, struct hlist_node *hnode)
+ldlm_export_flock_put(struct cfs_hash *hs, struct hlist_node *hnode)
 {
struct ldlm_lock *lock;
struct ldlm_flock *flock;
@@ -804,7 +804,7 @@ ldlm_export_flock_put(cfs_hash_t *hs, struct hlist_node 
*hnode)
}
 }
 
-static cfs_hash_ops_t ldlm_export_flock_ops = {
+static struct cfs_hash_ops ldlm_export_flock_ops = {
.hs_hash= ldlm_export_flock_hash,
.hs_key  = ldlm_export_flock_key,
.hs_keycmp  = ldlm_export_flock_keycmp,
-- 
1.8.1.2

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


[PATCH 10/22] staging: lustre: Update struct variables in ldlm_lock.c

2013-10-20 Thread Lisa Nguyen
Assuming the patch to update the structs in libcfs_hash header
file has been applied, this patch will update the struct variables
in ldlm_lock.c to avoid build errors.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c 
b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
index 027617f..3900a69 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
@@ -1891,7 +1891,7 @@ static int reprocess_one_queue(struct ldlm_resource *res, 
void *closure)
return LDLM_ITER_CONTINUE;
 }
 
-static int ldlm_reprocess_res(cfs_hash_t *hs, cfs_hash_bd_t *bd,
+static int ldlm_reprocess_res(struct cfs_hash *hs, struct cfs_hash_bd *bd,
  struct hlist_node *hnode, void *arg)
 {
struct ldlm_resource *res = cfs_hash_object(hs, hnode);
@@ -2040,7 +2040,7 @@ struct export_cl_data {
  * Iterator function for ldlm_cancel_locks_for_export.
  * Cancels passed locks.
  */
-int ldlm_cancel_locks_for_export_cb(cfs_hash_t *hs, cfs_hash_bd_t *bd,
+int ldlm_cancel_locks_for_export_cb(struct cfs_hash *hs, struct cfs_hash_bd 
*bd,
struct hlist_node *hnode, void *data)
 
 {
-- 
1.8.1.2

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


[PATCH 11/22] staging: lustre: Update struct variables in ldlm_request.c

2013-10-20 Thread Lisa Nguyen
Assuming the patch to update the structs in libcfs_hash header
file has been applied, this patch will update the struct variables
in ldlm_request.c to avoid build errors.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c 
b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c
index 21cb523..c3b6ad5 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c
@@ -1925,7 +1925,7 @@ struct ldlm_cli_cancel_arg {
void   *lc_opaque;
 };
 
-static int ldlm_cli_hash_cancel_unused(cfs_hash_t *hs, cfs_hash_bd_t *bd,
+static int ldlm_cli_hash_cancel_unused(struct cfs_hash *hs, struct cfs_hash_bd 
*bd,
   struct hlist_node *hnode, void *arg)
 {
struct ldlm_resource   *res = cfs_hash_object(hs, hnode);
@@ -2023,7 +2023,7 @@ static int ldlm_iter_helper(struct ldlm_lock *lock, void 
*closure)
return helper->iter(lock, helper->closure);
 }
 
-static int ldlm_res_iter_helper(cfs_hash_t *hs, cfs_hash_bd_t *bd,
+static int ldlm_res_iter_helper(struct cfs_hash *hs, struct cfs_hash_bd *bd,
struct hlist_node *hnode, void *arg)
 
 {
-- 
1.8.1.2

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


[PATCH 12/22] staging: lustre: Update struct variables in ldlm_resource.c

2013-10-20 Thread Lisa Nguyen
Assuming the patch to update the structs in libcfs_hash header
file has been applied, this patch will update the struct variables
in ldlm_resource.c to avoid build errors.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 34 +++---
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c 
b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
index 8d3dd6d..c44c2f5 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
@@ -159,7 +159,7 @@ static int lprocfs_ns_resources_seq_show(struct seq_file 
*m, void *v)
 {
struct ldlm_namespace *ns  = m->private;
__u64 res = 0;
-   cfs_hash_bd_t bd;
+   struct cfs_hash_bdbd;
int i;
 
/* result is not strictly consistant */
@@ -389,7 +389,7 @@ int ldlm_namespace_proc_register(struct ldlm_namespace *ns)
 
 #endif /* LPROCFS */
 
-static unsigned ldlm_res_hop_hash(cfs_hash_t *hs,
+static unsigned ldlm_res_hop_hash(struct cfs_hash *hs,
  const void *key, unsigned mask)
 {
const struct ldlm_res_id *id  = key;
@@ -401,7 +401,7 @@ static unsigned ldlm_res_hop_hash(cfs_hash_t *hs,
return val & mask;
 }
 
-static unsigned ldlm_res_hop_fid_hash(cfs_hash_t *hs,
+static unsigned ldlm_res_hop_fid_hash(struct cfs_hash *hs,
  const void *key, unsigned mask)
 {
const struct ldlm_res_id *id = key;
@@ -453,7 +453,7 @@ static void *ldlm_res_hop_object(struct hlist_node *hnode)
return hlist_entry(hnode, struct ldlm_resource, lr_hash);
 }
 
-static void ldlm_res_hop_get_locked(cfs_hash_t *hs, struct hlist_node *hnode)
+static void ldlm_res_hop_get_locked(struct cfs_hash *hs, struct hlist_node 
*hnode)
 {
struct ldlm_resource *res;
 
@@ -461,7 +461,7 @@ static void ldlm_res_hop_get_locked(cfs_hash_t *hs, struct 
hlist_node *hnode)
ldlm_resource_getref(res);
 }
 
-static void ldlm_res_hop_put_locked(cfs_hash_t *hs, struct hlist_node *hnode)
+static void ldlm_res_hop_put_locked(struct cfs_hash *hs, struct hlist_node 
*hnode)
 {
struct ldlm_resource *res;
 
@@ -470,7 +470,7 @@ static void ldlm_res_hop_put_locked(cfs_hash_t *hs, struct 
hlist_node *hnode)
ldlm_resource_putref_locked(res);
 }
 
-static void ldlm_res_hop_put(cfs_hash_t *hs, struct hlist_node *hnode)
+static void ldlm_res_hop_put(struct cfs_hash *hs, struct hlist_node *hnode)
 {
struct ldlm_resource *res;
 
@@ -478,7 +478,7 @@ static void ldlm_res_hop_put(cfs_hash_t *hs, struct 
hlist_node *hnode)
ldlm_resource_putref(res);
 }
 
-cfs_hash_ops_t ldlm_ns_hash_ops = {
+struct cfs_hash_ops ldlm_ns_hash_ops = {
.hs_hash= ldlm_res_hop_hash,
.hs_key  = ldlm_res_hop_key,
.hs_keycmp  = ldlm_res_hop_keycmp,
@@ -489,7 +489,7 @@ cfs_hash_ops_t ldlm_ns_hash_ops = {
.hs_put  = ldlm_res_hop_put
 };
 
-cfs_hash_ops_t ldlm_ns_fid_hash_ops = {
+struct cfs_hash_ops ldlm_ns_fid_hash_ops = {
.hs_hash= ldlm_res_hop_fid_hash,
.hs_key  = ldlm_res_hop_key,
.hs_keycmp  = ldlm_res_hop_keycmp,
@@ -507,7 +507,7 @@ typedef struct {
/** hash bits */
unsignednsd_all_bits;
/** hash operations */
-   cfs_hash_ops_t *nsd_hops;
+   struct cfs_hash_ops *nsd_hops;
 } ldlm_ns_hash_def_t;
 
 ldlm_ns_hash_def_t ldlm_ns_hash_defs[] =
@@ -564,7 +564,7 @@ struct ldlm_namespace *ldlm_namespace_new(struct obd_device 
*obd, char *name,
struct ldlm_namespace *ns = NULL;
struct ldlm_ns_bucket *nsb;
ldlm_ns_hash_def_t*nsd;
-   cfs_hash_bd_t bd;
+   struct cfs_hash_bdbd;
int idx;
int rc;
 
@@ -743,7 +743,7 @@ static void cleanup_resource(struct ldlm_resource *res, 
struct list_head *q,
} while (1);
 }
 
-static int ldlm_resource_clean(cfs_hash_t *hs, cfs_hash_bd_t *bd,
+static int ldlm_resource_clean(struct cfs_hash *hs, struct cfs_hash_bd *bd,
   struct hlist_node *hnode, void *arg)
 {
struct ldlm_resource *res = cfs_hash_object(hs, hnode);
@@ -756,7 +756,7 @@ static int ldlm_resource_clean(cfs_hash_t *hs, 
cfs_hash_bd_t *bd,
return 0;
 }
 
-static int ldlm_resource_complain(cfs_hash_t *hs, cfs_hash_bd_t *bd,
+static int ldlm_resource_complain(struct cfs_hash *hs, struct cfs_hash_bd *bd,
  struct hlist_node *hnode, void *arg)
 {
struct ldlm_resource  *res = cfs_hash_object(hs, hnode);
@@ -1060,7 +1060,7 @@ ldlm_resource_get(struct ldlm_namespace *ns, struct 
ldlm_resource *parent,
 {
struct hlist_node *hnode;
struct ldlm_resource *res;
-   cfs_hash_bd_tbd;
+   struct cfs_hash_bd   bd;
__u64version;

[PATCH 14/22] staging: lustre: Update struct variables in vvp_dev.c

2013-10-20 Thread Lisa Nguyen
Assuming the patch to update the structs in libcfs_hash header
file has been applied, this patch will update the struct variables
in vvp_dev.c to avoid build errors.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/lustre/lustre/llite/vvp_dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/llite/vvp_dev.c 
b/drivers/staging/lustre/lustre/llite/vvp_dev.c
index be125b9..c4d1580 100644
--- a/drivers/staging/lustre/lustre/llite/vvp_dev.c
+++ b/drivers/staging/lustre/lustre/llite/vvp_dev.c
@@ -297,7 +297,7 @@ static loff_t vvp_pgcache_id_pack(struct vvp_pgcache_id *id)
((__u64)id->vpi_bucket << PGC_OBJ_SHIFT);
 }
 
-static int vvp_pgcache_obj_get(cfs_hash_t *hs, cfs_hash_bd_t *bd,
+static int vvp_pgcache_obj_get(struct cfs_hash *hs, struct cfs_hash_bd *bd,
   struct hlist_node *hnode, void *data)
 {
struct vvp_pgcache_id   *id  = data;
-- 
1.8.1.2

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


[PATCH 15/22] staging: lustre: Update struct variables in lov_pool.c

2013-10-20 Thread Lisa Nguyen
Assuming the patch to update the structs in libcfs_hash header
file has been applied, this patch will update the struct variables
in lov_pool.c to avoid build errors.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/lustre/lustre/lov/lov_pool.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/lustre/lustre/lov/lov_pool.c 
b/drivers/staging/lustre/lustre/lov/lov_pool.c
index dd3c07d..a0d38ab 100644
--- a/drivers/staging/lustre/lustre/lov/lov_pool.c
+++ b/drivers/staging/lustre/lustre/lov/lov_pool.c
@@ -86,7 +86,7 @@ void lov_pool_putref_locked(struct pool_desc *pool)
  * Chapter 6.4.
  * Addison Wesley, 1973
  */
-static __u32 pool_hashfn(cfs_hash_t *hash_body, const void *key, unsigned mask)
+static __u32 pool_hashfn(struct cfs_hash *hash_body, const void *key, unsigned 
mask)
 {
int i;
__u32 result;
@@ -125,7 +125,7 @@ static void *pool_hashobject(struct hlist_node *hnode)
return hlist_entry(hnode, struct pool_desc, pool_hash);
 }
 
-static void pool_hashrefcount_get(cfs_hash_t *hs, struct hlist_node *hnode)
+static void pool_hashrefcount_get(struct cfs_hash *hs, struct hlist_node 
*hnode)
 {
struct pool_desc *pool;
 
@@ -133,7 +133,7 @@ static void pool_hashrefcount_get(cfs_hash_t *hs, struct 
hlist_node *hnode)
lov_pool_getref(pool);
 }
 
-static void pool_hashrefcount_put_locked(cfs_hash_t *hs,
+static void pool_hashrefcount_put_locked(struct cfs_hash *hs,
 struct hlist_node *hnode)
 {
struct pool_desc *pool;
@@ -142,7 +142,7 @@ static void pool_hashrefcount_put_locked(cfs_hash_t *hs,
lov_pool_putref_locked(pool);
 }
 
-cfs_hash_ops_t pool_hash_operations = {
+struct cfs_hash_ops pool_hash_operations = {
.hs_hash= pool_hashfn,
.hs_key  = pool_key,
.hs_keycmp  = pool_hashkey_keycmp,
-- 
1.8.1.2

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


[PATCH 16/22] staging: lustre: Update struct variables in cl_object.c

2013-10-20 Thread Lisa Nguyen
Assuming the patch to update the structs in libcfs_hash header
file has been applied, this patch will update the struct variables
in cl_object.c to avoid build errors.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/lustre/lustre/obdclass/cl_object.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/lustre/lustre/obdclass/cl_object.c 
b/drivers/staging/lustre/lustre/obdclass/cl_object.c
index 7b0e9d2..7ed8c86 100644
--- a/drivers/staging/lustre/lustre/obdclass/cl_object.c
+++ b/drivers/staging/lustre/lustre/obdclass/cl_object.c
@@ -577,9 +577,9 @@ static void cl_env_init0(struct cl_env *cle, void *debug)
  * The implementation of using hash table to connect cl_env and thread
  */
 
-static cfs_hash_t *cl_env_hash;
+static struct cfs_hash *cl_env_hash;
 
-static unsigned cl_env_hops_hash(cfs_hash_t *lh,
+static unsigned cl_env_hops_hash(struct cfs_hash *lh,
 const void *key, unsigned mask)
 {
 #if BITS_PER_LONG == 64
@@ -604,13 +604,13 @@ static int cl_env_hops_keycmp(const void *key, struct 
hlist_node *hn)
return (key == cle->ce_owner);
 }
 
-static void cl_env_hops_noop(cfs_hash_t *hs, struct hlist_node *hn)
+static void cl_env_hops_noop(struct cfs_hash *hs, struct hlist_node *hn)
 {
struct cl_env *cle = hlist_entry(hn, struct cl_env, ce_node);
LASSERT(cle->ce_magic == &cl_env_init0);
 }
 
-static cfs_hash_ops_t cl_env_hops = {
+static struct cfs_hash_ops cl_env_hops = {
.hs_hash= cl_env_hops_hash,
.hs_key  = cl_env_hops_obj,
.hs_keycmp  = cl_env_hops_keycmp,
-- 
1.8.1.2

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


[PATCH 17/22] staging: lustre: Update struct variables in genops.c

2013-10-20 Thread Lisa Nguyen
Assuming the patch to update the structs in libcfs_hash header
file has been applied, this patch will update the struct variables
in genops.c to avoid build errors.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/lustre/lustre/obdclass/genops.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/lustre/lustre/obdclass/genops.c 
b/drivers/staging/lustre/lustre/obdclass/genops.c
index 68fe71c..f6fae16 100644
--- a/drivers/staging/lustre/lustre/obdclass/genops.c
+++ b/drivers/staging/lustre/lustre/obdclass/genops.c
@@ -816,7 +816,7 @@ struct obd_export *class_new_export(struct obd_device *obd,
struct obd_uuid *cluuid)
 {
struct obd_export *export;
-   cfs_hash_t *hash = NULL;
+   struct cfs_hash *hash = NULL;
int rc = 0;
 
OBD_ALLOC_PTR(export);
@@ -1384,7 +1384,7 @@ EXPORT_SYMBOL(obd_export_nid2str);
 
 int obd_export_evict_by_nid(struct obd_device *obd, const char *nid)
 {
-   cfs_hash_t *nid_hash;
+   struct cfs_hash *nid_hash;
struct obd_export *doomed_exp = NULL;
int exports_evicted = 0;
 
@@ -1432,7 +1432,7 @@ EXPORT_SYMBOL(obd_export_evict_by_nid);
 
 int obd_export_evict_by_uuid(struct obd_device *obd, const char *uuid)
 {
-   cfs_hash_t *uuid_hash;
+   struct cfs_hash *uuid_hash;
struct obd_export *doomed_exp = NULL;
struct obd_uuid doomed_uuid;
int exports_evicted = 0;
-- 
1.8.1.2

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


[PATCH 21/22] staging: lustre: Update struct variables in osc_quota.c

2013-10-20 Thread Lisa Nguyen
Assuming the patch to update the structs in libcfs_hash header
file has been applied, this patch will update the struct variables
in osc_quota.c to avoid build errors.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/lustre/lustre/osc/osc_quota.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/lustre/lustre/osc/osc_quota.c 
b/drivers/staging/lustre/lustre/osc/osc_quota.c
index 9720c0e..43f0b2b 100644
--- a/drivers/staging/lustre/lustre/osc/osc_quota.c
+++ b/drivers/staging/lustre/lustre/osc/osc_quota.c
@@ -139,7 +139,7 @@ int osc_quota_setdq(struct client_obd *cli, const unsigned 
int qid[],
  * Hash operations for uid/gid <-> osc_quota_info
  */
 static unsigned
-oqi_hashfn(cfs_hash_t *hs, const void *key, unsigned mask)
+oqi_hashfn(struct cfs_hash *hs, const void *key, unsigned mask)
 {
return cfs_hash_u32_hash(*((__u32*)key), mask);
 }
@@ -172,17 +172,17 @@ oqi_object(struct hlist_node *hnode)
 }
 
 static void
-oqi_get(cfs_hash_t *hs, struct hlist_node *hnode)
+oqi_get(struct cfs_hash *hs, struct hlist_node *hnode)
 {
 }
 
 static void
-oqi_put_locked(cfs_hash_t *hs, struct hlist_node *hnode)
+oqi_put_locked(struct cfs_hash *hs, struct hlist_node *hnode)
 {
 }
 
 static void
-oqi_exit(cfs_hash_t *hs, struct hlist_node *hnode)
+oqi_exit(struct cfs_hash *hs, struct hlist_node *hnode)
 {
struct osc_quota_info *oqi;
 
@@ -195,7 +195,7 @@ oqi_exit(cfs_hash_t *hs, struct hlist_node *hnode)
 #define HASH_QUOTA_CUR_BITS 5
 #define HASH_QUOTA_MAX_BITS 15
 
-static cfs_hash_ops_t quota_hash_ops = {
+static struct cfs_hash_ops quota_hash_ops = {
.hs_hash= oqi_hashfn,
.hs_keycmp  = oqi_keycmp,
.hs_key = oqi_key,
-- 
1.8.1.2

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


[PATCH 19/22] staging: lustre: Update struct variables in lu_object.c

2013-10-20 Thread Lisa Nguyen
Assuming the patch to update the structs in libcfs_hash header
file has been applied, this patch will update the struct variables
in lu_object.c to avoid build errors.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/lustre/lustre/obdclass/lu_object.c | 42 +++---
 1 file changed, 21 insertions(+), 21 deletions(-)

diff --git a/drivers/staging/lustre/lustre/obdclass/lu_object.c 
b/drivers/staging/lustre/lustre/obdclass/lu_object.c
index e8f2607..43c452e 100644
--- a/drivers/staging/lustre/lustre/obdclass/lu_object.c
+++ b/drivers/staging/lustre/lustre/obdclass/lu_object.c
@@ -71,7 +71,7 @@ void lu_object_put(const struct lu_env *env, struct lu_object 
*o)
struct lu_object_header *top;
struct lu_site*site;
struct lu_object*orig;
-   cfs_hash_bd_t   bd;
+   struct cfs_hash_bd  bd;
const struct lu_fid *fid;
 
top  = o->lo_header;
@@ -175,8 +175,8 @@ void lu_object_unhash(const struct lu_env *env, struct 
lu_object *o)
top = o->lo_header;
set_bit(LU_OBJECT_HEARD_BANSHEE, &top->loh_flags);
if (!test_and_set_bit(LU_OBJECT_UNHASHED, &top->loh_flags)) {
-   cfs_hash_t *obj_hash = o->lo_dev->ld_site->ls_obj_hash;
-   cfs_hash_bd_t bd;
+   struct cfs_hash *obj_hash = o->lo_dev->ld_site->ls_obj_hash;
+   struct cfs_hash_bd bd;
 
cfs_hash_bd_get_and_lock(obj_hash, &top->loh_fid, &bd, 1);
list_del_init(&top->loh_lru);
@@ -306,8 +306,8 @@ int lu_site_purge(const struct lu_env *env, struct lu_site 
*s, int nr)
struct lu_object_header *h;
struct lu_object_header *temp;
struct lu_site_bkt_data *bkt;
-   cfs_hash_bd_t   bd;
-   cfs_hash_bd_t   bd2;
+   struct cfs_hash_bd  bd;
+   struct cfs_hash_bd  bd2;
struct list_head   dispose;
int   did_sth;
int   start;
@@ -526,7 +526,7 @@ int lu_object_invariant(const struct lu_object *o)
 EXPORT_SYMBOL(lu_object_invariant);
 
 static struct lu_object *htable_lookup(struct lu_site *s,
-  cfs_hash_bd_t *bd,
+  struct cfs_hash_bd *bd,
   const struct lu_fid *f,
   wait_queue_t *waiter,
   __u64 *version)
@@ -589,8 +589,8 @@ static struct lu_object *lu_object_new(const struct lu_env 
*env,
   const struct lu_object_conf *conf)
 {
struct lu_object*o;
-   cfs_hash_t*hs;
-   cfs_hash_bd_t   bd;
+   struct cfs_hash   *hs;
+   struct cfs_hash_bd  bd;
struct lu_site_bkt_data *bkt;
 
o = lu_object_alloc(env, dev, f, conf);
@@ -618,8 +618,8 @@ static struct lu_object *lu_object_find_try(const struct 
lu_env *env,
struct lu_object  *o;
struct lu_object  *shadow;
struct lu_site  *s;
-   cfs_hash_t  *hs;
-   cfs_hash_bd_t bd;
+   struct cfs_hash *hs;
+   struct cfs_hash_bdbd;
__u64 version = 0;
 
/*
@@ -788,7 +788,7 @@ struct lu_site_print_arg {
 };
 
 static int
-lu_site_obj_print(cfs_hash_t *hs, cfs_hash_bd_t *bd,
+lu_site_obj_print(struct cfs_hash *hs, struct cfs_hash_bd *bd,
  struct hlist_node *hnode, void *data)
 {
struct lu_site_print_arg *arg = (struct lu_site_print_arg *)data;
@@ -874,7 +874,7 @@ static int lu_htable_order(void)
return bits;
 }
 
-static unsigned lu_obj_hop_hash(cfs_hash_t *hs,
+static unsigned lu_obj_hop_hash(struct cfs_hash *hs,
const void *key, unsigned mask)
 {
struct lu_fid  *fid = (struct lu_fid *)key;
@@ -914,14 +914,14 @@ static int lu_obj_hop_keycmp(const void *key, struct 
hlist_node *hnode)
return lu_fid_eq(&h->loh_fid, (struct lu_fid *)key);
 }
 
-static void lu_obj_hop_get(cfs_hash_t *hs, struct hlist_node *hnode)
+static void lu_obj_hop_get(struct cfs_hash *hs, struct hlist_node *hnode)
 {
struct lu_object_header *h;
 
h = hlist_entry(hnode, struct lu_object_header, loh_hash);
if (atomic_add_return(1, &h->loh_ref) == 1) {
struct lu_site_bkt_data *bkt;
-   cfs_hash_bd_t   bd;
+   struct cfs_hash_bd  bd;
 
cfs_hash_bd_get(hs, &h->loh_fid, &bd);
bkt = cfs_hash_bd_extra_get(hs, &bd);
@@ -929,12 +929,12 @@ static void lu_obj_hop_get(cfs_hash_t *hs, struct 
hlist_node *hnode)
}
 }
 
-static void lu_obj_hop_put_locked(cfs_hash_t *hs, struct hlist_node *hnode)
+static void lu_obj_hop_put_locked(struct cfs_hash *hs, struct hlist_node 
*hnode)
 {
LBUG(); /* we sho

[PATCH 20/22] staging: lustre: Update struct variables in obd_config.c

2013-10-20 Thread Lisa Nguyen
Assuming the patch to update the structs in libcfs_hash header
file has been applied, this patch will update the struct variables
in obd_config.c to avoid build errors.

Signed-off-by: Lisa Nguyen 
---
 .../staging/lustre/lustre/obdclass/obd_config.c| 28 +++---
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/lustre/lustre/obdclass/obd_config.c 
b/drivers/staging/lustre/lustre/obdclass/obd_config.c
index 73e2571..a5ff317 100644
--- a/drivers/staging/lustre/lustre/obdclass/obd_config.c
+++ b/drivers/staging/lustre/lustre/obdclass/obd_config.c
@@ -47,9 +47,9 @@
 
 #include "llog_internal.h"
 
-static cfs_hash_ops_t uuid_hash_ops;
-static cfs_hash_ops_t nid_hash_ops;
-static cfs_hash_ops_t nid_stat_hash_ops;
+static struct cfs_hash_ops uuid_hash_ops;
+static struct cfs_hash_ops nid_hash_ops;
+static struct cfs_hash_ops nid_stat_hash_ops;
 
 /*** string parsing utils */
 
@@ -1692,7 +1692,7 @@ EXPORT_SYMBOL(class_manual_cleanup);
  */
 
 static unsigned
-uuid_hash(cfs_hash_t *hs, const void *key, unsigned mask)
+uuid_hash(struct cfs_hash *hs, const void *key, unsigned mask)
 {
return cfs_hash_djb2_hash(((struct obd_uuid *)key)->uuid,
  sizeof(((struct obd_uuid *)key)->uuid), mask);
@@ -1731,7 +1731,7 @@ uuid_export_object(struct hlist_node *hnode)
 }
 
 static void
-uuid_export_get(cfs_hash_t *hs, struct hlist_node *hnode)
+uuid_export_get(struct cfs_hash *hs, struct hlist_node *hnode)
 {
struct obd_export *exp;
 
@@ -1740,7 +1740,7 @@ uuid_export_get(cfs_hash_t *hs, struct hlist_node *hnode)
 }
 
 static void
-uuid_export_put_locked(cfs_hash_t *hs, struct hlist_node *hnode)
+uuid_export_put_locked(struct cfs_hash *hs, struct hlist_node *hnode)
 {
struct obd_export *exp;
 
@@ -1748,7 +1748,7 @@ uuid_export_put_locked(cfs_hash_t *hs, struct hlist_node 
*hnode)
class_export_put(exp);
 }
 
-static cfs_hash_ops_t uuid_hash_ops = {
+static struct cfs_hash_ops uuid_hash_ops = {
.hs_hash= uuid_hash,
.hs_key  = uuid_key,
.hs_keycmp  = uuid_keycmp,
@@ -1763,7 +1763,7 @@ static cfs_hash_ops_t uuid_hash_ops = {
  */
 
 static unsigned
-nid_hash(cfs_hash_t *hs, const void *key, unsigned mask)
+nid_hash(struct cfs_hash *hs, const void *key, unsigned mask)
 {
return cfs_hash_djb2_hash(key, sizeof(lnet_nid_t), mask);
 }
@@ -1801,7 +1801,7 @@ nid_export_object(struct hlist_node *hnode)
 }
 
 static void
-nid_export_get(cfs_hash_t *hs, struct hlist_node *hnode)
+nid_export_get(struct cfs_hash *hs, struct hlist_node *hnode)
 {
struct obd_export *exp;
 
@@ -1810,7 +1810,7 @@ nid_export_get(cfs_hash_t *hs, struct hlist_node *hnode)
 }
 
 static void
-nid_export_put_locked(cfs_hash_t *hs, struct hlist_node *hnode)
+nid_export_put_locked(struct cfs_hash *hs, struct hlist_node *hnode)
 {
struct obd_export *exp;
 
@@ -1818,7 +1818,7 @@ nid_export_put_locked(cfs_hash_t *hs, struct hlist_node 
*hnode)
class_export_put(exp);
 }
 
-static cfs_hash_ops_t nid_hash_ops = {
+static struct cfs_hash_ops nid_hash_ops = {
.hs_hash= nid_hash,
.hs_key  = nid_key,
.hs_keycmp  = nid_kepcmp,
@@ -1855,7 +1855,7 @@ nidstats_object(struct hlist_node *hnode)
 }
 
 static void
-nidstats_get(cfs_hash_t *hs, struct hlist_node *hnode)
+nidstats_get(struct cfs_hash *hs, struct hlist_node *hnode)
 {
struct nid_stat *ns;
 
@@ -1864,7 +1864,7 @@ nidstats_get(cfs_hash_t *hs, struct hlist_node *hnode)
 }
 
 static void
-nidstats_put_locked(cfs_hash_t *hs, struct hlist_node *hnode)
+nidstats_put_locked(struct cfs_hash *hs, struct hlist_node *hnode)
 {
struct nid_stat *ns;
 
@@ -1872,7 +1872,7 @@ nidstats_put_locked(cfs_hash_t *hs, struct hlist_node 
*hnode)
nidstat_putref(ns);
 }
 
-static cfs_hash_ops_t nid_stat_hash_ops = {
+static struct cfs_hash_ops nid_stat_hash_ops = {
.hs_hash= nid_hash,
.hs_key  = nidstats_key,
.hs_keycmp  = nidstats_keycmp,
-- 
1.8.1.2

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


[PATCH 22/22] staging: lustre: Update struct variables in connection.c

2013-10-20 Thread Lisa Nguyen
Assuming the patch to update the structs in libcfs_hash header
file has been applied, this patch will update the struct variables
in connection.c to avoid build errors.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/lustre/lustre/ptlrpc/connection.c | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/lustre/lustre/ptlrpc/connection.c 
b/drivers/staging/lustre/lustre/ptlrpc/connection.c
index 17ca842..0fd6409 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/connection.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/connection.c
@@ -41,8 +41,8 @@
 
 #include "ptlrpc_internal.h"
 
-static cfs_hash_t *conn_hash = NULL;
-static cfs_hash_ops_t conn_hash_ops;
+static struct cfs_hash *conn_hash = NULL;
+static struct cfs_hash_ops conn_hash_ops;
 
 struct ptlrpc_connection *
 ptlrpc_connection_get(lnet_process_id_t peer, lnet_nid_t self,
@@ -161,7 +161,7 @@ EXPORT_SYMBOL(ptlrpc_connection_fini);
  * Hash operations for net_peer<->connection
  */
 static unsigned
-conn_hashfn(cfs_hash_t *hs, const void *key, unsigned mask)
+conn_hashfn(struct cfs_hash *hs, const void *key, unsigned mask)
 {
return cfs_hash_djb2_hash(key, sizeof(lnet_process_id_t), mask);
 }
@@ -195,7 +195,7 @@ conn_object(struct hlist_node *hnode)
 }
 
 static void
-conn_get(cfs_hash_t *hs, struct hlist_node *hnode)
+conn_get(struct cfs_hash *hs, struct hlist_node *hnode)
 {
struct ptlrpc_connection *conn;
 
@@ -204,7 +204,7 @@ conn_get(cfs_hash_t *hs, struct hlist_node *hnode)
 }
 
 static void
-conn_put_locked(cfs_hash_t *hs, struct hlist_node *hnode)
+conn_put_locked(struct cfs_hash *hs, struct hlist_node *hnode)
 {
struct ptlrpc_connection *conn;
 
@@ -213,7 +213,7 @@ conn_put_locked(cfs_hash_t *hs, struct hlist_node *hnode)
 }
 
 static void
-conn_exit(cfs_hash_t *hs, struct hlist_node *hnode)
+conn_exit(struct cfs_hash *hs, struct hlist_node *hnode)
 {
struct ptlrpc_connection *conn;
 
@@ -229,7 +229,7 @@ conn_exit(cfs_hash_t *hs, struct hlist_node *hnode)
OBD_FREE_PTR(conn);
 }
 
-static cfs_hash_ops_t conn_hash_ops = {
+static struct cfs_hash_ops conn_hash_ops = {
.hs_hash= conn_hashfn,
.hs_keycmp  = conn_keycmp,
.hs_key  = conn_key,
-- 
1.8.1.2

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


[PATCH 08/22] staging: lustre: Update struct variables in hash.c

2013-10-20 Thread Lisa Nguyen
Assuming the patch to update the structs in libcfs_hash header
file has been applied, this patch will update the struct variables
in hash.c to avoid build errors.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/lustre/lustre/libcfs/hash.c | 270 ++--
 1 file changed, 135 insertions(+), 135 deletions(-)

diff --git a/drivers/staging/lustre/lustre/libcfs/hash.c 
b/drivers/staging/lustre/lustre/libcfs/hash.c
index 29ce380..66cba5a 100644
--- a/drivers/staging/lustre/lustre/libcfs/hash.c
+++ b/drivers/staging/lustre/lustre/libcfs/hash.c
@@ -119,25 +119,25 @@ CFS_MODULE_PARM(warn_on_depth, "i", uint, 0644,
 struct cfs_wi_sched *cfs_sched_rehash;
 
 static inline void
-cfs_hash_nl_lock(cfs_hash_lock_t *lock, int exclusive) {}
+cfs_hash_nl_lock(union cfs_hash_lock *lock, int exclusive) {}
 
 static inline void
-cfs_hash_nl_unlock(cfs_hash_lock_t *lock, int exclusive) {}
+cfs_hash_nl_unlock(union cfs_hash_lock *lock, int exclusive) {}
 
 static inline void
-cfs_hash_spin_lock(cfs_hash_lock_t *lock, int exclusive)
+cfs_hash_spin_lock(union cfs_hash_lock *lock, int exclusive)
 {
spin_lock(&lock->spin);
 }
 
 static inline void
-cfs_hash_spin_unlock(cfs_hash_lock_t *lock, int exclusive)
+cfs_hash_spin_unlock(union cfs_hash_lock *lock, int exclusive)
 {
spin_unlock(&lock->spin);
 }
 
 static inline void
-cfs_hash_rw_lock(cfs_hash_lock_t *lock, int exclusive)
+cfs_hash_rw_lock(union cfs_hash_lock *lock, int exclusive)
 {
if (!exclusive)
read_lock(&lock->rw);
@@ -146,7 +146,7 @@ cfs_hash_rw_lock(cfs_hash_lock_t *lock, int exclusive)
 }
 
 static inline void
-cfs_hash_rw_unlock(cfs_hash_lock_t *lock, int exclusive)
+cfs_hash_rw_unlock(union cfs_hash_lock *lock, int exclusive)
 {
if (!exclusive)
read_unlock(&lock->rw);
@@ -155,7 +155,7 @@ cfs_hash_rw_unlock(cfs_hash_lock_t *lock, int exclusive)
 }
 
 /** No lock hash */
-static cfs_hash_lock_ops_t cfs_hash_nl_lops =
+static struct cfs_hash_lock_ops cfs_hash_nl_lops =
 {
.hs_lock= cfs_hash_nl_lock,
.hs_unlock  = cfs_hash_nl_unlock,
@@ -164,7 +164,7 @@ static cfs_hash_lock_ops_t cfs_hash_nl_lops =
 };
 
 /** no bucket lock, one spinlock to protect everything */
-static cfs_hash_lock_ops_t cfs_hash_nbl_lops =
+static struct cfs_hash_lock_ops cfs_hash_nbl_lops =
 {
.hs_lock= cfs_hash_spin_lock,
.hs_unlock  = cfs_hash_spin_unlock,
@@ -173,7 +173,7 @@ static cfs_hash_lock_ops_t cfs_hash_nbl_lops =
 };
 
 /** spin bucket lock, rehash is enabled */
-static cfs_hash_lock_ops_t cfs_hash_bkt_spin_lops =
+static struct cfs_hash_lock_ops cfs_hash_bkt_spin_lops =
 {
.hs_lock= cfs_hash_rw_lock,
.hs_unlock  = cfs_hash_rw_unlock,
@@ -182,7 +182,7 @@ static cfs_hash_lock_ops_t cfs_hash_bkt_spin_lops =
 };
 
 /** rw bucket lock, rehash is enabled */
-static cfs_hash_lock_ops_t cfs_hash_bkt_rw_lops =
+static struct cfs_hash_lock_ops cfs_hash_bkt_rw_lops =
 {
.hs_lock= cfs_hash_rw_lock,
.hs_unlock  = cfs_hash_rw_unlock,
@@ -191,7 +191,7 @@ static cfs_hash_lock_ops_t cfs_hash_bkt_rw_lops =
 };
 
 /** spin bucket lock, rehash is disabled */
-static cfs_hash_lock_ops_t cfs_hash_nr_bkt_spin_lops =
+static struct cfs_hash_lock_ops cfs_hash_nr_bkt_spin_lops =
 {
.hs_lock= cfs_hash_nl_lock,
.hs_unlock  = cfs_hash_nl_unlock,
@@ -200,7 +200,7 @@ static cfs_hash_lock_ops_t cfs_hash_nr_bkt_spin_lops =
 };
 
 /** rw bucket lock, rehash is disabled */
-static cfs_hash_lock_ops_t cfs_hash_nr_bkt_rw_lops =
+static struct cfs_hash_lock_ops cfs_hash_nr_bkt_rw_lops =
 {
.hs_lock= cfs_hash_nl_lock,
.hs_unlock  = cfs_hash_nl_unlock,
@@ -209,7 +209,7 @@ static cfs_hash_lock_ops_t cfs_hash_nr_bkt_rw_lops =
 };
 
 static void
-cfs_hash_lock_setup(cfs_hash_t *hs)
+cfs_hash_lock_setup(struct cfs_hash *hs)
 {
if (cfs_hash_with_no_lock(hs)) {
hs->hs_lops = &cfs_hash_nl_lops;
@@ -246,13 +246,13 @@ typedef struct {
 } cfs_hash_head_t;
 
 static int
-cfs_hash_hh_hhead_size(cfs_hash_t *hs)
+cfs_hash_hh_hhead_size(struct cfs_hash *hs)
 {
return sizeof(cfs_hash_head_t);
 }
 
 static struct hlist_head *
-cfs_hash_hh_hhead(cfs_hash_t *hs, cfs_hash_bd_t *bd)
+cfs_hash_hh_hhead(struct cfs_hash *hs, struct cfs_hash_bd *bd)
 {
cfs_hash_head_t *head = (cfs_hash_head_t *)&bd->bd_bucket->hsb_head[0];
 
@@ -260,7 +260,7 @@ cfs_hash_hh_hhead(cfs_hash_t *hs, cfs_hash_bd_t *bd)
 }
 
 static int
-cfs_hash_hh_hnode_add(cfs_hash_t *hs, cfs_hash_bd_t *bd,
+cfs_hash_hh_hnode_add(struct cfs_hash *hs, struct cfs_hash_bd *bd,
  struct hlist_node *hnode)
 {
hlist_add_head(hnode, cfs_hash_hh_hhead(hs, bd));
@@ -268,7 +268,7 @@ cfs_hash_hh_hnode_add(cfs_hash_t *hs, cfs_hash_bd_t *bd,
 }
 
 static int
-cfs_hash_hh_hnode_del(cfs_hash_t *hs, cfs_hash_bd_t *bd,
+cfs_hash_h

[PATCH 18/22] staging: lustre: Update struct variables in lprocfs_status.c

2013-10-20 Thread Lisa Nguyen
Assuming the patch to update the structs in libcfs_hash header
file has been applied, this patch will update the struct variables
in lprocfs_status.c to avoid build errors.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/lustre/lustre/obdclass/lprocfs_status.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c 
b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
index a95f60a..4b2cb81 100644
--- a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
+++ b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
@@ -898,7 +898,7 @@ static void lprocfs_free_client_stats(struct nid_stat 
*client_stat)
 
 void lprocfs_free_per_client_stats(struct obd_device *obd)
 {
-   cfs_hash_t *hash = obd->obd_nid_stats_hash;
+   struct cfs_hash *hash = obd->obd_nid_stats_hash;
struct nid_stat *stat;
 
/* we need extra list - because hash_exit called to early */
@@ -1422,7 +1422,7 @@ void lprocfs_init_ldlm_stats(struct lprocfs_stats 
*ldlm_stats)
 }
 EXPORT_SYMBOL(lprocfs_init_ldlm_stats);
 
-int lprocfs_exp_print_uuid(cfs_hash_t *hs, cfs_hash_bd_t *bd,
+int lprocfs_exp_print_uuid(struct cfs_hash *hs, struct cfs_hash_bd *bd,
   struct hlist_node *hnode, void *data)
 
 {
@@ -1453,7 +1453,7 @@ struct exp_hash_cb_data {
boolfirst;
 };
 
-int lprocfs_exp_print_hash(cfs_hash_t *hs, cfs_hash_bd_t *bd,
+int lprocfs_exp_print_hash(struct cfs_hash *hs, struct cfs_hash_bd *bd,
   struct hlist_node *hnode, void *cb_data)
 
 {
-- 
1.8.1.2

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


[PATCH 13/22] staging: lustre: Update struct variables in ldlm_lockd.c

2013-10-20 Thread Lisa Nguyen
Assuming the patch to update the structs in libcfs_hash header
file has been applied, this patch will update the struct variables
in ldlm_lockd.c to avoid build errors.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c 
b/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c
index a100a0b..9c77e0a 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c
@@ -937,7 +937,7 @@ EXPORT_SYMBOL(ldlm_put_ref);
  * Export handle<->lock hash operations.
  */
 static unsigned
-ldlm_export_lock_hash(cfs_hash_t *hs, const void *key, unsigned mask)
+ldlm_export_lock_hash(struct cfs_hash *hs, const void *key, unsigned mask)
 {
return cfs_hash_u64_hash(((struct lustre_handle *)key)->cookie, mask);
 }
@@ -973,7 +973,7 @@ ldlm_export_lock_object(struct hlist_node *hnode)
 }
 
 static void
-ldlm_export_lock_get(cfs_hash_t *hs, struct hlist_node *hnode)
+ldlm_export_lock_get(struct cfs_hash *hs, struct hlist_node *hnode)
 {
struct ldlm_lock *lock;
 
@@ -982,7 +982,7 @@ ldlm_export_lock_get(cfs_hash_t *hs, struct hlist_node 
*hnode)
 }
 
 static void
-ldlm_export_lock_put(cfs_hash_t *hs, struct hlist_node *hnode)
+ldlm_export_lock_put(struct cfs_hash *hs, struct hlist_node *hnode)
 {
struct ldlm_lock *lock;
 
@@ -990,7 +990,7 @@ ldlm_export_lock_put(cfs_hash_t *hs, struct hlist_node 
*hnode)
LDLM_LOCK_RELEASE(lock);
 }
 
-static cfs_hash_ops_t ldlm_export_lock_ops = {
+static struct cfs_hash_ops ldlm_export_lock_ops = {
.hs_hash= ldlm_export_lock_hash,
.hs_key  = ldlm_export_lock_key,
.hs_keycmp  = ldlm_export_lock_keycmp,
-- 
1.8.1.2

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


Re: [PATCH 01/22] staging: lustre: Remove all new typedefs in libcfs_hash.h

2013-10-20 Thread Lisa Nguyen
On Sun, Oct 20, 2013 at 8:22 PM, Dan Carpenter  wrote:
> On Sun, Oct 20, 2013 at 03:45:46PM -0700, Lisa Nguyen wrote:
>> Modified all structs in libcfs_hash header file to eliminate
>> the "Do not add new typedefs" warning generated by checkpatch.pl
>> and meet kernel coding style.
>>
>
> Can you redo this whole series?
>
> The driver needs to be able to recompiled after each patch.  Otherwise
> it breaks git bisect. So for example, this patch should modify
> drivers/staging/lustre/lustre/libcfs/hash.c as well as the .h file.
>
> regards,
> dan carpenter

Yes, I will redo the whole series.

Thanks for your feedback.

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


Re: [PATCH 01/22] staging: lustre: Remove all new typedefs in libcfs_hash.h

2013-10-20 Thread Lisa Nguyen
On Sun, Oct 20, 2013 at 8:23 PM, Greg KH  wrote:
> On Sun, Oct 20, 2013 at 03:45:46PM -0700, Lisa Nguyen wrote:
>> Modified all structs in libcfs_hash header file to eliminate
>> the "Do not add new typedefs" warning generated by checkpatch.pl
>> and meet kernel coding style.
>>
>> Signed-off-by: Lisa Nguyen 
>
> This patch breaks the build so badly, I know you didn't test it alone :(
>
> Your follow-on patches do fix up the build breakage, which is nice, but
> you can never break the build with any individual patch, that's not how
> kernel development works, sorry.
>

Good to know. Something new I learned today and will know how to keep
maintainers happy :)

> So, can you change this to just fix one typedef at a time, for the whole
> chunk of code?  That should be managable, and reviewable, instead of
> having to put all 22 patches here into one big patch (which isn't ok.)
>
> thanks,
>
> greg k-h

I will do one typedef at a time and will resend for feedback.

Please ignore this patch series. I will create a new patchset to
modify one typedef at a time before I send more.

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


Re: [PATCH 00/22] staging: lustre: Update structs

2013-10-20 Thread Lisa Nguyen
On Sun, Oct 20, 2013 at 8:07 PM, Peng, Tao  wrote:
> Hi Lisa,
>
> Thanks for the patch. I assume you were using coccinelle (or sed) to do the 
> conversion. Are there change done by hand other than scripting? Can you 
> please also put your scripts (such as in [PATCH 01/22]) in the commit message?
>
> Thanks,
> Tao
>

Hi Tao,

I didn't use any other script besides checkpatch.pl, which was
included in the kernel source code under the scripts directory. I used
sed to make replacements in vim for each file and relied on cscope and
grep to detect all the dependent files.

If there are other scripts I used, I will make a note of it in my
commit message(s).

After receiving feedback from Dan and Greg, I will respin a new patch
series to change one typedef at a time, rather than multiple ones for
one header file as I learned more about the building process.

Hope this answers your question and let me know if anything comes up.

Thanks,
Lisa

>>-Original Message-
>>From: Lisa Nguyen [mailto:l...@xenapiadmin.com]
>>Sent: Monday, October 21, 2013 6:45 AM
>>To: gre...@linuxfoundation.org
>>Cc: Peng, Tao; andreas.dil...@intel.com; de...@driverdev.osuosl.org
>>Subject: [PATCH 00/22] staging: lustre: Update structs
>>
>>This patchset includes all the changes needed to update the structs defined in
>>libcfs_hash.h. Doing this will eliminate the "Do not add new typedefs" warning
>>generated by checkpatch.pl and the updated format of those structs will meet
>>kernel coding style.
>>
>>Other header files and certain source files that use functions and structs
>>defined in libcfs_hash.h have updated struct variables.
>>
>>I have CC'ed the lustre driver authors to keep them informed of this update.
>>
>>Questions and comments are welcomed.
>>
>>Lisa Nguyen (22):
>>  staging: lustre: Remove all new typedefs in libcfs_hash.h
>>  staging: lustre: Update struct variables in lu_object.h
>>  staging: lustre: Update struct variables in lustre_dlm.h
>>  staging: lustre: Update struct variables in lustre_export.h
>>  staging: lustre: Update struct variables in lustre_net.h
>>  staging: lustre: Update struct variables in obd.h
>>  staging: lustre: Update struct variables in lov_internal.h
>>  staging: lustre: Update struct variables in hash.c
>>  staging: lustre: Update struct variables in ldlm_flock.c
>>  staging: lustre: Update struct variables in ldlm_lock.c
>>  staging: lustre: Update struct variables in ldlm_request.c
>>  staging: lustre: Update struct variables in ldlm_resource.c
>>  staging: lustre: Update struct variables in ldlm_lockd.c
>>  staging: lustre: Update struct variables in vvp_dev.c
>>  staging: lustre: Update struct variables in lov_pool.c
>>  staging: lustre: Update struct variables in cl_object.c
>>  staging: lustre: Update struct variables in genops.c
>>  staging: lustre: Update struct variables in lprocfs_status.c
>>  staging: lustre: Update struct variables in lu_object.c
>>  staging: lustre: Update struct variables in obd_config.c
>>  staging: lustre: Update struct variables in osc_quota.c
>>  staging: lustre: Update struct variables in connection.c
>>
>> .../lustre/include/linux/libcfs/libcfs_hash.h  | 280 
>> ++---
>> drivers/staging/lustre/lustre/include/lu_object.h  |   4 +-
>> drivers/staging/lustre/lustre/include/lustre_dlm.h |   2 +-
>> .../staging/lustre/lustre/include/lustre_export.h  |   4 +-
>> drivers/staging/lustre/lustre/include/lustre_net.h |   4 +-
>> drivers/staging/lustre/lustre/include/obd.h|  10 +-
>> drivers/staging/lustre/lustre/ldlm/ldlm_flock.c|   8 +-
>> drivers/staging/lustre/lustre/ldlm/ldlm_lock.c |   4 +-
>> drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c|   8 +-
>> drivers/staging/lustre/lustre/ldlm/ldlm_request.c  |   4 +-
>> drivers/staging/lustre/lustre/ldlm/ldlm_resource.c |  34 +--
>> drivers/staging/lustre/lustre/libcfs/hash.c| 270 ++--
>> drivers/staging/lustre/lustre/llite/vvp_dev.c  |   2 +-
>> drivers/staging/lustre/lustre/lov/lov_internal.h   |   2 +-
>> drivers/staging/lustre/lustre/lov/lov_pool.c   |   8 +-
>> drivers/staging/lustre/lustre/obdclass/cl_object.c |   8 +-
>> drivers/staging/lustre/lustre/obdclass/genops.c|   6 +-
>> .../lustre/lustre/obdclass/lprocfs_status.c|   6 +-
>> drivers/staging/lustre/lustre/obdclass/lu_object.c |  42 ++--
>> .../staging/lustre/lustre/obdclass/obd_config.c|  28 +--
>> drivers/staging/lustre/lustre/osc/osc_quota.c  |  10 +-
>> drivers/staging/lustre/lustre/ptlrpc/connection.c  |  14 +-
>> 22 files changed, 379 insertions(+), 379 deletions(-)
>>
>>--
>>1.8.1.2
>>
>
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: lustre: Remove typedef and update cfs_hash_lock union

2013-10-20 Thread Lisa Nguyen
Remove typedef keyword and rename the cfs_hash_lock_t
union to cfs_hash_lock in libcfs_hash.h. These changes
resolve the "Do not add new typedefs" warning
generated by checkpatch.pl and meet kernel coding style.

The union variables in hash.c are updated to reflect this
change as well.

Signed-off-by: Lisa Nguyen 
---
 .../staging/lustre/include/linux/libcfs/libcfs_hash.h| 16 
 drivers/staging/lustre/lustre/libcfs/hash.c  | 12 ++--
 2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h 
b/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h
index 98f5be2..b06505d 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h
@@ -81,10 +81,10 @@ struct cfs_hash_ops;
 struct cfs_hash_lock_ops;
 struct cfs_hash_hlist_ops;
 
-typedef union {
+union cfs_hash_lock {
rwlock_trw; /**< rwlock */
spinlock_t  spin;   /**< spinlock */
-} cfs_hash_lock_t;
+};
 
 /**
  * cfs_hash_bucket is a container of:
@@ -98,7 +98,7 @@ typedef union {
  * - some extra bytes (caller can require it while creating hash)
  */
 typedef struct cfs_hash_bucket {
-   cfs_hash_lock_t hsb_lock;   /**< bucket lock */
+   union cfs_hash_lock hsb_lock;   /**< bucket lock */
__u32   hsb_count;  /**< current entries */
__u32   hsb_version;/**< change version */
unsigned inthsb_index;  /**< index of bucket */
@@ -213,7 +213,7 @@ enum cfs_hash_tag {
 typedef struct cfs_hash {
/** serialize with rehash, or serialize all operations if
 * the hash-table has CFS_HASH_NO_BKTLOCK */
-   cfs_hash_lock_t  hs_lock;
+   union cfs_hash_lock  hs_lock;
/** hash operations */
struct cfs_hash_ops *hs_ops;
/** hash lock operations */
@@ -276,13 +276,13 @@ typedef struct cfs_hash {
 
 typedef struct cfs_hash_lock_ops {
/** lock the hash table */
-   void(*hs_lock)(cfs_hash_lock_t *lock, int exclusive);
+   void(*hs_lock)(union cfs_hash_lock *lock, int exclusive);
/** unlock the hash table */
-   void(*hs_unlock)(cfs_hash_lock_t *lock, int exclusive);
+   void(*hs_unlock)(union cfs_hash_lock *lock, int exclusive);
/** lock the hash bucket */
-   void(*hs_bkt_lock)(cfs_hash_lock_t *lock, int exclusive);
+   void(*hs_bkt_lock)(union cfs_hash_lock *lock, int exclusive);
/** unlock the hash bucket */
-   void(*hs_bkt_unlock)(cfs_hash_lock_t *lock, int exclusive);
+   void(*hs_bkt_unlock)(union cfs_hash_lock *lock, int exclusive);
 } cfs_hash_lock_ops_t;
 
 typedef struct cfs_hash_hlist_ops {
diff --git a/drivers/staging/lustre/lustre/libcfs/hash.c 
b/drivers/staging/lustre/lustre/libcfs/hash.c
index 29ce380..b0b8e3f 100644
--- a/drivers/staging/lustre/lustre/libcfs/hash.c
+++ b/drivers/staging/lustre/lustre/libcfs/hash.c
@@ -119,25 +119,25 @@ CFS_MODULE_PARM(warn_on_depth, "i", uint, 0644,
 struct cfs_wi_sched *cfs_sched_rehash;
 
 static inline void
-cfs_hash_nl_lock(cfs_hash_lock_t *lock, int exclusive) {}
+cfs_hash_nl_lock(union cfs_hash_lock *lock, int exclusive) {}
 
 static inline void
-cfs_hash_nl_unlock(cfs_hash_lock_t *lock, int exclusive) {}
+cfs_hash_nl_unlock(union cfs_hash_lock *lock, int exclusive) {}
 
 static inline void
-cfs_hash_spin_lock(cfs_hash_lock_t *lock, int exclusive)
+cfs_hash_spin_lock(union cfs_hash_lock *lock, int exclusive)
 {
spin_lock(&lock->spin);
 }
 
 static inline void
-cfs_hash_spin_unlock(cfs_hash_lock_t *lock, int exclusive)
+cfs_hash_spin_unlock(union cfs_hash_lock *lock, int exclusive)
 {
spin_unlock(&lock->spin);
 }
 
 static inline void
-cfs_hash_rw_lock(cfs_hash_lock_t *lock, int exclusive)
+cfs_hash_rw_lock(union cfs_hash_lock *lock, int exclusive)
 {
if (!exclusive)
read_lock(&lock->rw);
@@ -146,7 +146,7 @@ cfs_hash_rw_lock(cfs_hash_lock_t *lock, int exclusive)
 }
 
 static inline void
-cfs_hash_rw_unlock(cfs_hash_lock_t *lock, int exclusive)
+cfs_hash_rw_unlock(union cfs_hash_lock *lock, int exclusive)
 {
if (!exclusive)
read_unlock(&lock->rw);
-- 
1.8.1.2

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


[PATCH] staging: lustre: Remove typedef and update cfs_hash_bucket struct

2013-10-20 Thread Lisa Nguyen
Remove typedef keyword and rename the cfs_hash_bucket_t struct to
cfs_hash_bucket in libcfs_hash.h. These changes resolve the
"Do not add new typedefs" warning generated by checkpatch.pl and
meet kernel coding style.

The struct variables in hash.c are updated to reflect this change
as well.

Signed-off-by: Lisa Nguyen 
---
 .../lustre/include/linux/libcfs/libcfs_hash.h  | 12 ++--
 drivers/staging/lustre/lustre/libcfs/hash.c| 22 +++---
 2 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h 
b/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h
index b06505d..26c10d9 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h
@@ -97,20 +97,20 @@ union cfs_hash_lock {
  *   which depends on requirement of user
  * - some extra bytes (caller can require it while creating hash)
  */
-typedef struct cfs_hash_bucket {
+struct cfs_hash_bucket {
union cfs_hash_lock hsb_lock;   /**< bucket lock */
__u32   hsb_count;  /**< current entries */
__u32   hsb_version;/**< change version */
unsigned inthsb_index;  /**< index of bucket */
int hsb_depmax; /**< max depth on bucket */
longhsb_head[0];/**< hash-head array */
-} cfs_hash_bucket_t;
+};
 
 /**
  * cfs_hash bucket descriptor, it's normally in stack of caller
  */
 typedef struct cfs_hash_bd {
-   cfs_hash_bucket_t *bd_bucket;  /**< address of bucket */
+   struct cfs_hash_bucket  *bd_bucket;  /**< address of bucket */
unsigned intbd_offset;  /**< offset in bucket */
 } cfs_hash_bd_t;
 
@@ -221,7 +221,7 @@ typedef struct cfs_hash {
/** hash list operations */
struct cfs_hash_hlist_ops  *hs_hops;
/** hash buckets-table */
-   cfs_hash_bucket_t**hs_buckets;
+   struct cfs_hash_bucket   **hs_buckets;
/** total number of items on this hash-table */
atomic_ths_count;
/** hash flags, see cfs_hash_tag for detail */
@@ -255,7 +255,7 @@ typedef struct cfs_hash {
/** refcount on this hash table */
atomic_ths_refcount;
/** rehash buckets-table */
-   cfs_hash_bucket_t**hs_rehash_buckets;
+   struct cfs_hash_bucket   **hs_rehash_buckets;
 #if CFS_HASH_DEBUG_LEVEL >= CFS_HASH_DEBUG_1
/** serialize debug members */
spinlock_t  hs_dep_lock;
@@ -451,7 +451,7 @@ cfs_hash_is_iterating(cfs_hash_t *hs)
 static inline int
 cfs_hash_bkt_size(cfs_hash_t *hs)
 {
-   return offsetof(cfs_hash_bucket_t, hsb_head[0]) +
+   return offsetof(struct cfs_hash_bucket, hsb_head[0]) +
   hs->hs_hops->hop_hhead_size(hs) * CFS_HASH_BKT_NHLIST(hs) +
   hs->hs_extra_bytes;
 }
diff --git a/drivers/staging/lustre/lustre/libcfs/hash.c 
b/drivers/staging/lustre/lustre/libcfs/hash.c
index b0b8e3f..c3cb1c0 100644
--- a/drivers/staging/lustre/lustre/libcfs/hash.c
+++ b/drivers/staging/lustre/lustre/libcfs/hash.c
@@ -469,7 +469,7 @@ cfs_hash_hlist_setup(cfs_hash_t *hs)
 }
 
 static void
-cfs_hash_bd_from_key(cfs_hash_t *hs, cfs_hash_bucket_t **bkts,
+cfs_hash_bd_from_key(cfs_hash_t *hs, struct cfs_hash_bucket **bkts,
 unsigned int bits, const void *key, cfs_hash_bd_t *bd)
 {
unsigned int index = cfs_hash_id(hs, key, (1U << bits) - 1);
@@ -563,8 +563,8 @@ void
 cfs_hash_bd_move_locked(cfs_hash_t *hs, cfs_hash_bd_t *bd_old,
cfs_hash_bd_t *bd_new, struct hlist_node *hnode)
 {
-   cfs_hash_bucket_t *obkt = bd_old->bd_bucket;
-   cfs_hash_bucket_t *nbkt = bd_new->bd_bucket;
+   struct cfs_hash_bucket *obkt = bd_old->bd_bucket;
+   struct cfs_hash_bucket *nbkt = bd_new->bd_bucket;
int rc;
 
if (cfs_hash_bd_compare(bd_old, bd_new) == 0)
@@ -698,7 +698,7 @@ static void
 cfs_hash_multi_bd_lock(cfs_hash_t *hs, cfs_hash_bd_t *bds,
   unsigned n, int excl)
 {
-   cfs_hash_bucket_t *prev = NULL;
+   struct cfs_hash_bucket *prev = NULL;
int i;
 
/**
@@ -721,7 +721,7 @@ static void
 cfs_hash_multi_bd_unlock(cfs_hash_t *hs, cfs_hash_bd_t *bds,
 unsigned n, int excl)
 {
-   cfs_hash_bucket_t *prev = NULL;
+   struct cfs_hash_bucket *prev = NULL;
int i;
 
cfs_hash_for_each_bd(bds, n, i) {
@@ -884,7 +884,7 @@ cfs_hash_dual_bd_finddel_locked(cfs_hash_t *hs, 
cfs_hash_bd_t *bds,
 EXPORT_SYMBOL(cfs_hash_dual_bd_finddel_locked);
 
 static void
-cfs_hash_buckets_free(cfs_hash_bucket_t **buckets,
+cfs_hash_buckets_free(struct cfs_hash_bucket **buckets,
 

[PATCH 2/3] staging: lustre: Remove typedef and update cfs_hash_bd struct

2013-10-21 Thread Lisa Nguyen
Remove typedef keyword and rename the cfs_hash_bd_t struct to
cfs_hash_bd in libcfs_hash.h. These changes resolve the
"Do not add new typedefs" warning generated by checkpatch.pl
and meet kernel coding style.

Struct variables in other header and source files that depend
on libcfs_hash.h are updated as well.

Signed-off-by: Lisa Nguyen 
---
 .../lustre/include/linux/libcfs/libcfs_hash.h  |  76 +++---
 drivers/staging/lustre/lustre/include/lu_object.h  |   2 +-
 drivers/staging/lustre/lustre/ldlm/ldlm_lock.c |   4 +-
 drivers/staging/lustre/lustre/ldlm/ldlm_request.c  |   4 +-
 drivers/staging/lustre/lustre/ldlm/ldlm_resource.c |  18 ++--
 drivers/staging/lustre/lustre/libcfs/hash.c| 114 ++---
 drivers/staging/lustre/lustre/llite/vvp_dev.c  |   2 +-
 .../lustre/lustre/obdclass/lprocfs_status.c|   4 +-
 drivers/staging/lustre/lustre/obdclass/lu_object.c |  24 ++---
 9 files changed, 124 insertions(+), 124 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h 
b/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h
index 26c10d9..61e4fca 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h
@@ -109,10 +109,10 @@ struct cfs_hash_bucket {
 /**
  * cfs_hash bucket descriptor, it's normally in stack of caller
  */
-typedef struct cfs_hash_bd {
+struct cfs_hash_bd {
struct cfs_hash_bucket  *bd_bucket;  /**< address of bucket */
unsigned intbd_offset;  /**< offset in bucket */
-} cfs_hash_bd_t;
+};
 
 #define CFS_HASH_NAME_LEN 16  /**< default name length */
 #define CFS_HASH_BIGNAME_LEN   64  /**< bigname for param tree */
@@ -287,15 +287,15 @@ typedef struct cfs_hash_lock_ops {
 
 typedef struct cfs_hash_hlist_ops {
/** return hlist_head of hash-head of @bd */
-   struct hlist_head *(*hop_hhead)(cfs_hash_t *hs, cfs_hash_bd_t *bd);
+   struct hlist_head *(*hop_hhead)(cfs_hash_t *hs, struct cfs_hash_bd *bd);
/** return hash-head size */
int (*hop_hhead_size)(cfs_hash_t *hs);
/** add @hnode to hash-head of @bd */
int (*hop_hnode_add)(cfs_hash_t *hs,
-cfs_hash_bd_t *bd, struct hlist_node *hnode);
+struct cfs_hash_bd *bd, struct hlist_node *hnode);
/** remove @hnode from hash-head of @bd */
int (*hop_hnode_del)(cfs_hash_t *hs,
-cfs_hash_bd_t *bd, struct hlist_node *hnode);
+struct cfs_hash_bd *bd, struct hlist_node *hnode);
 } cfs_hash_hlist_ops_t;
 
 typedef struct cfs_hash_ops {
@@ -539,13 +539,13 @@ static inline int cfs_hash_dec_and_lock(cfs_hash_t *hs,
 }
 
 static inline void cfs_hash_bd_lock(cfs_hash_t *hs,
-   cfs_hash_bd_t *bd, int excl)
+   struct cfs_hash_bd *bd, int excl)
 {
hs->hs_lops->hs_bkt_lock(&bd->bd_bucket->hsb_lock, excl);
 }
 
 static inline void cfs_hash_bd_unlock(cfs_hash_t *hs,
- cfs_hash_bd_t *bd, int excl)
+ struct cfs_hash_bd *bd, int excl)
 {
hs->hs_lops->hs_bkt_unlock(&bd->bd_bucket->hsb_lock, excl);
 }
@@ -554,56 +554,56 @@ static inline void cfs_hash_bd_unlock(cfs_hash_t *hs,
  * operations on cfs_hash bucket (bd: bucket descriptor),
  * they are normally for hash-table without rehash
  */
-void cfs_hash_bd_get(cfs_hash_t *hs, const void *key, cfs_hash_bd_t *bd);
+void cfs_hash_bd_get(cfs_hash_t *hs, const void *key, struct cfs_hash_bd *bd);
 
 static inline void cfs_hash_bd_get_and_lock(cfs_hash_t *hs, const void *key,
-   cfs_hash_bd_t *bd, int excl)
+   struct cfs_hash_bd *bd, int excl)
 {
cfs_hash_bd_get(hs, key, bd);
cfs_hash_bd_lock(hs, bd, excl);
 }
 
-static inline unsigned cfs_hash_bd_index_get(cfs_hash_t *hs, cfs_hash_bd_t *bd)
+static inline unsigned cfs_hash_bd_index_get(cfs_hash_t *hs, struct 
cfs_hash_bd *bd)
 {
return bd->bd_offset | (bd->bd_bucket->hsb_index << hs->hs_bkt_bits);
 }
 
 static inline void cfs_hash_bd_index_set(cfs_hash_t *hs,
-unsigned index, cfs_hash_bd_t *bd)
+unsigned index, struct cfs_hash_bd *bd)
 {
bd->bd_bucket = hs->hs_buckets[index >> hs->hs_bkt_bits];
bd->bd_offset = index & (CFS_HASH_BKT_NHLIST(hs) - 1U);
 }
 
 static inline void *
-cfs_hash_bd_extra_get(cfs_hash_t *hs, cfs_hash_bd_t *bd)
+cfs_hash_bd_extra_get(cfs_hash_t *hs, struct cfs_hash_bd *bd)
 {
return (void *)bd->bd_bucket +
   cfs_hash_bkt_size(hs) - hs->hs_extra_bytes;
 }
 
 static inline __u32
-cfs_hash_bd_version_get(cfs

[PATCH 1/3] staging: lustre: Remove typedef and update cfs_debug_limit_state struct

2013-10-21 Thread Lisa Nguyen
Removed typedef keyword and rename the cfs_debug_limit_state_t
struct to cfs_debug_limit_state in libcfs_debug.h. These changes
resolve the "Do not add new typedefs" warning generated by
checkpatch.pl and meet kernel coding style.

Struct variables in other header and source files
that depend on libcfs_debug.h are updated as well.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h | 8 
 drivers/staging/lustre/lustre/include/lustre_dlm.h | 2 +-
 drivers/staging/lustre/lustre/include/lustre_net.h | 2 +-
 drivers/staging/lustre/lustre/libcfs/tracefile.c   | 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h 
b/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h
index e6439d1..40282b7 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h
@@ -165,11 +165,11 @@ struct ptldebug_header {
 #define CDEBUG_DEFAULT_MAX_DELAY (cfs_time_seconds(600))/* jiffies */
 #define CDEBUG_DEFAULT_MIN_DELAY ((cfs_time_seconds(1) + 1) / 2) /* jiffies */
 #define CDEBUG_DEFAULT_BACKOFF   2
-typedef struct {
+struct cfs_debug_limit_state {
cfs_time_t  cdls_next;
unsigned intcdls_delay;
int  cdls_count;
-} cfs_debug_limit_state_t;
+};
 
 struct libcfs_debug_msg_data {
const char *msg_file;
@@ -177,7 +177,7 @@ struct libcfs_debug_msg_data {
int   msg_subsys;
int   msg_line;
int   msg_mask;
-   cfs_debug_limit_state_t  *msg_cdls;
+   struct cfs_debug_limit_state  *msg_cdls;
 };
 
 #define LIBCFS_DEBUG_MSG_DATA_INIT(data, mask, cdls)   \
@@ -226,7 +226,7 @@ do {
\
 
 #define CDEBUG_LIMIT(mask, format, ...) \
 do {   \
-   static cfs_debug_limit_state_t cdls;\
+   static struct cfs_debug_limit_state cdls;\
\
__CDEBUG(&cdls, mask, format, ## __VA_ARGS__);\
 } while (0)
diff --git a/drivers/staging/lustre/lustre/include/lustre_dlm.h 
b/drivers/staging/lustre/lustre/include/lustre_dlm.h
index 7020d9c..122441f 100644
--- a/drivers/staging/lustre/lustre/include/lustre_dlm.h
+++ b/drivers/staging/lustre/lustre/include/lustre_dlm.h
@@ -1083,7 +1083,7 @@ void _ldlm_lock_debug(struct ldlm_lock *lock,
  * Rate-limited version of lock printing function.
  */
 #define LDLM_DEBUG_LIMIT(mask, lock, fmt, a...) do {\
-   static cfs_debug_limit_state_t _ldlm_cdls; \
+   static struct cfs_debug_limit_state _ldlm_cdls;\
LIBCFS_DEBUG_MSG_DATA_DECL(msgdata, mask, &_ldlm_cdls);   \
ldlm_lock_debug(&msgdata, mask, &_ldlm_cdls, lock, "### " fmt , ##a);\
 } while (0)
diff --git a/drivers/staging/lustre/lustre/include/lustre_net.h 
b/drivers/staging/lustre/lustre/include/lustre_net.h
index e947002..cf2b90d 100644
--- a/drivers/staging/lustre/lustre/include/lustre_net.h
+++ b/drivers/staging/lustre/lustre/include/lustre_net.h
@@ -2206,7 +2206,7 @@ do {  
  \
 #define DEBUG_REQ(level, req, fmt, args...)   \
 do { \
if ((level) & (D_ERROR | D_WARNING)) {  \
-   static cfs_debug_limit_state_t cdls;  \
+   static struct cfs_debug_limit_state cdls;   
  \
LIBCFS_DEBUG_MSG_DATA_DECL(msgdata, level, &cdls);  \
debug_req(&msgdata, level, &cdls, req, "@@@ "fmt" ", ## args);\
} else {  \
diff --git a/drivers/staging/lustre/lustre/libcfs/tracefile.c 
b/drivers/staging/lustre/lustre/libcfs/tracefile.c
index 357f400..f71a3cc 100644
--- a/drivers/staging/lustre/lustre/libcfs/tracefile.c
+++ b/drivers/staging/lustre/lustre/libcfs/tracefile.c
@@ -276,7 +276,7 @@ int libcfs_debug_vmsg2(struct libcfs_debug_msg_data 
*msgdata,
int remain;
int mask = msgdata->msg_mask;
const char  *file = kbasename(msgdata->msg_file);
-   cfs_debug_limit_state_t   *cdls = msgdata->msg_cdls;
+   struct cfs_debug_limit_state   *cdls = msgdata->msg_cdls;
 
tcd = cfs_trace_get_tcd();
 
-- 
1.8.1.2

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


[PATCH 2/3] staging: lustre: lnet: Remove unnecessary () from return statements

2013-10-21 Thread Lisa Nguyen
Remove unnecessary parentheses from return statements in lib-lnet.h
to meet kernel coding style.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/lustre/include/linux/lnet/lib-lnet.h | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h 
b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
index 8869f10..0eb2e06 100644
--- a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
+++ b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
@@ -199,11 +199,11 @@ lnet_freelist_alloc(lnet_freelist_t *fl)
lnet_freeobj_t *o;
 
if (list_empty(&fl->fl_list))
-   return (NULL);
+   return NULL;
 
o = list_entry(fl->fl_list.next, lnet_freeobj_t, fo_list);
list_del(&o->fo_list);
-   return ((void *)&o->fo_contents);
+   return (void *)&o->fo_contents;
 }
 
 static inline void
@@ -369,7 +369,7 @@ lnet_eq_alloc(void)
lnet_eq_t *eq;
 
LIBCFS_ALLOC(eq, sizeof(*eq));
-   return (eq);
+   return eq;
 }
 
 static inline void
@@ -405,7 +405,7 @@ lnet_md_alloc(lnet_md_t *umd)
INIT_LIST_HEAD(&md->md_list);
}
 
-   return (md);
+   return md;
 }
 
 static inline void
@@ -429,7 +429,7 @@ lnet_me_alloc(void)
lnet_me_t *me;
 
LIBCFS_ALLOC(me, sizeof(*me));
-   return (me);
+   return me;
 }
 
 static inline void
@@ -448,7 +448,7 @@ lnet_msg_alloc(void)
LIBCFS_ALLOC(msg, sizeof(*msg));
 
/* no need to zero, LIBCFS_ALLOC does for us */
-   return (msg);
+   return msg;
 }
 
 static inline void
-- 
1.8.1.2

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


[PATCH 1/3] staging: lustre: lnet: Remove unnecessary spaces in lib-lnet.h

2013-10-21 Thread Lisa Nguyen
Remove spaces between function names and open parentheses to
meet kernel coding style and eliminate extra space warnings
generated by checkpatch.pl

Signed-off-by: Lisa Nguyen 
---
 .../staging/lustre/include/linux/lnet/lib-lnet.h   | 78 +++---
 1 file changed, 39 insertions(+), 39 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h 
b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
index 59bff0b..8869f10 100644
--- a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
+++ b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
@@ -79,20 +79,20 @@ extern lnet_t  the_lnet;/* THE network 
*/
 /** exclusive lock */
 #define LNET_LOCK_EX   CFS_PERCPT_LOCK_EX
 
-static inline int lnet_is_wire_handle_none (lnet_handle_wire_t *wh)
+static inline int lnet_is_wire_handle_none(lnet_handle_wire_t *wh)
 {
return (wh->wh_interface_cookie == LNET_WIRE_HANDLE_COOKIE_NONE &&
wh->wh_object_cookie == LNET_WIRE_HANDLE_COOKIE_NONE);
 }
 
-static inline int lnet_md_exhausted (lnet_libmd_t *md)
+static inline int lnet_md_exhausted(lnet_libmd_t *md)
 {
return (md->md_threshold == 0 ||
((md->md_options & LNET_MD_MAX_SIZE) != 0 &&
 md->md_offset + md->md_max_size > md->md_length));
 }
 
-static inline int lnet_md_unlinkable (lnet_libmd_t *md)
+static inline int lnet_md_unlinkable(lnet_libmd_t *md)
 {
/* Should unlink md when its refcount is 0 and either:
 *  - md has been flagged for deletion (by auto unlink or 
LNetM[DE]Unlink,
@@ -193,31 +193,31 @@ int lnet_freelist_init(lnet_freelist_t *fl, int n, int 
size);
 void lnet_freelist_fini(lnet_freelist_t *fl);
 
 static inline void *
-lnet_freelist_alloc (lnet_freelist_t *fl)
+lnet_freelist_alloc(lnet_freelist_t *fl)
 {
/* ALWAYS called with liblock held */
lnet_freeobj_t *o;
 
-   if (list_empty (&fl->fl_list))
+   if (list_empty(&fl->fl_list))
return (NULL);
 
-   o = list_entry (fl->fl_list.next, lnet_freeobj_t, fo_list);
-   list_del (&o->fo_list);
+   o = list_entry(fl->fl_list.next, lnet_freeobj_t, fo_list);
+   list_del(&o->fo_list);
return ((void *)&o->fo_contents);
 }
 
 static inline void
-lnet_freelist_free (lnet_freelist_t *fl, void *obj)
+lnet_freelist_free(lnet_freelist_t *fl, void *obj)
 {
/* ALWAYS called with liblock held */
-   lnet_freeobj_t *o = list_entry (obj, lnet_freeobj_t, fo_contents);
+   lnet_freeobj_t *o = list_entry(obj, lnet_freeobj_t, fo_contents);
 
-   list_add (&o->fo_list, &fl->fl_list);
+   list_add(&o->fo_list, &fl->fl_list);
 }
 
 
 static inline lnet_eq_t *
-lnet_eq_alloc (void)
+lnet_eq_alloc(void)
 {
/* NEVER called with resource lock held */
struct lnet_res_container *rec = &the_lnet.ln_eq_container;
@@ -251,7 +251,7 @@ lnet_eq_free(lnet_eq_t *eq)
 }
 
 static inline lnet_libmd_t *
-lnet_md_alloc (lnet_md_t *umd)
+lnet_md_alloc(lnet_md_t *umd)
 {
/* NEVER called with resource lock held */
struct lnet_res_container *rec = the_lnet.ln_md_containers[0];
@@ -322,7 +322,7 @@ lnet_me_free(lnet_me_t *me)
 }
 
 static inline lnet_msg_t *
-lnet_msg_alloc (void)
+lnet_msg_alloc(void)
 {
/* NEVER called with network lock held */
struct lnet_msg_container *msc = the_lnet.ln_msg_containers[0];
@@ -353,7 +353,7 @@ lnet_msg_free_locked(lnet_msg_t *msg)
 }
 
 static inline void
-lnet_msg_free (lnet_msg_t *msg)
+lnet_msg_free(lnet_msg_t *msg)
 {
lnet_net_lock(0);
lnet_msg_free_locked(msg);
@@ -363,7 +363,7 @@ lnet_msg_free (lnet_msg_t *msg)
 #else /* !LNET_USE_LIB_FREELIST */
 
 static inline lnet_eq_t *
-lnet_eq_alloc (void)
+lnet_eq_alloc(void)
 {
/* NEVER called with liblock held */
lnet_eq_t *eq;
@@ -380,7 +380,7 @@ lnet_eq_free(lnet_eq_t *eq)
 }
 
 static inline lnet_libmd_t *
-lnet_md_alloc (lnet_md_t *umd)
+lnet_md_alloc(lnet_md_t *umd)
 {
/* NEVER called with liblock held */
lnet_libmd_t *md;
@@ -423,7 +423,7 @@ lnet_md_free(lnet_libmd_t *md)
 }
 
 static inline lnet_me_t *
-lnet_me_alloc (void)
+lnet_me_alloc(void)
 {
/* NEVER called with liblock held */
lnet_me_t *me;
@@ -479,7 +479,7 @@ lnet_res_lh_invalidate(lnet_libhandle_t *lh)
 }
 
 static inline void
-lnet_eq2handle (lnet_handle_eq_t *handle, lnet_eq_t *eq)
+lnet_eq2handle(lnet_handle_eq_t *handle, lnet_eq_t *eq)
 {
if (eq == NULL) {
LNetInvalidateHandle(handle);
@@ -503,7 +503,7 @@ lnet_handle2eq(lnet_handle_eq_t *handle)
 }
 
 static inline void
-lnet_md2handle (lnet_handle_md_t *handle, lnet_libmd_t *md)
+lnet_md2handle(lnet_handle_md_t *handle, lnet_libmd_t *md)
 {
handle->cookie = md->md_lh.lh_cookie;
 }
@@ -544,7 +544,7 @@ lnet_wire_handle2md(lnet_handle_wire_t *wh)
 }
 
 static in

[PATCH 3/3] staging: lustre: lnet: Reformat pointer variable in lib-lnet.h

2013-10-21 Thread Lisa Nguyen
Reformat a pointer variable in lib-lnet.h to meet kernel
coding style and eliminate pointer format warning
generated by checkpatch.pl

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/lustre/include/linux/lnet/lib-lnet.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h 
b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
index 0eb2e06..bf30104 100644
--- a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
+++ b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
@@ -749,7 +749,7 @@ void lnet_msg_containers_destroy(void);
 int lnet_msg_containers_create(void);
 
 char *lnet_msgtyp2str(int type);
-void lnet_print_hdr(lnet_hdr_t * hdr);
+void lnet_print_hdr(lnet_hdr_t *hdr);
 int lnet_fail_nid(lnet_nid_t nid, unsigned int threshold);
 
 void lnet_counters_get(lnet_counters_t *counters);
-- 
1.8.1.2

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


[PATCH 3/4] staging: lustre: Remove typedef and update cfs_hash_bd struct

2013-10-25 Thread Lisa Nguyen
Remove typedef keyword and rename the cfs_hash_bd_t struct to
cfs_hash_bd in libcfs_hash.h. These changes resolve the
"Do not add new typedefs" warning generated by checkpatch.pl
and meet kernel coding style.

Struct variables in other header and source files that depend
on libcfs_hash.h are updated as well.

Signed-off-by: Lisa Nguyen 
---
 .../lustre/include/linux/libcfs/libcfs_hash.h  |  76 +++---
 drivers/staging/lustre/lustre/include/lu_object.h  |   2 +-
 drivers/staging/lustre/lustre/ldlm/ldlm_lock.c |   4 +-
 drivers/staging/lustre/lustre/ldlm/ldlm_request.c  |   4 +-
 drivers/staging/lustre/lustre/ldlm/ldlm_resource.c |  18 ++--
 drivers/staging/lustre/lustre/libcfs/hash.c| 114 ++---
 drivers/staging/lustre/lustre/llite/vvp_dev.c  |   2 +-
 .../lustre/lustre/obdclass/lprocfs_status.c|   4 +-
 drivers/staging/lustre/lustre/obdclass/lu_object.c |  24 ++---
 9 files changed, 124 insertions(+), 124 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h 
b/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h
index 26c10d9..61e4fca 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h
@@ -109,10 +109,10 @@ struct cfs_hash_bucket {
 /**
  * cfs_hash bucket descriptor, it's normally in stack of caller
  */
-typedef struct cfs_hash_bd {
+struct cfs_hash_bd {
struct cfs_hash_bucket  *bd_bucket;  /**< address of bucket */
unsigned intbd_offset;  /**< offset in bucket */
-} cfs_hash_bd_t;
+};
 
 #define CFS_HASH_NAME_LEN 16  /**< default name length */
 #define CFS_HASH_BIGNAME_LEN   64  /**< bigname for param tree */
@@ -287,15 +287,15 @@ typedef struct cfs_hash_lock_ops {
 
 typedef struct cfs_hash_hlist_ops {
/** return hlist_head of hash-head of @bd */
-   struct hlist_head *(*hop_hhead)(cfs_hash_t *hs, cfs_hash_bd_t *bd);
+   struct hlist_head *(*hop_hhead)(cfs_hash_t *hs, struct cfs_hash_bd *bd);
/** return hash-head size */
int (*hop_hhead_size)(cfs_hash_t *hs);
/** add @hnode to hash-head of @bd */
int (*hop_hnode_add)(cfs_hash_t *hs,
-cfs_hash_bd_t *bd, struct hlist_node *hnode);
+struct cfs_hash_bd *bd, struct hlist_node *hnode);
/** remove @hnode from hash-head of @bd */
int (*hop_hnode_del)(cfs_hash_t *hs,
-cfs_hash_bd_t *bd, struct hlist_node *hnode);
+struct cfs_hash_bd *bd, struct hlist_node *hnode);
 } cfs_hash_hlist_ops_t;
 
 typedef struct cfs_hash_ops {
@@ -539,13 +539,13 @@ static inline int cfs_hash_dec_and_lock(cfs_hash_t *hs,
 }
 
 static inline void cfs_hash_bd_lock(cfs_hash_t *hs,
-   cfs_hash_bd_t *bd, int excl)
+   struct cfs_hash_bd *bd, int excl)
 {
hs->hs_lops->hs_bkt_lock(&bd->bd_bucket->hsb_lock, excl);
 }
 
 static inline void cfs_hash_bd_unlock(cfs_hash_t *hs,
- cfs_hash_bd_t *bd, int excl)
+ struct cfs_hash_bd *bd, int excl)
 {
hs->hs_lops->hs_bkt_unlock(&bd->bd_bucket->hsb_lock, excl);
 }
@@ -554,56 +554,56 @@ static inline void cfs_hash_bd_unlock(cfs_hash_t *hs,
  * operations on cfs_hash bucket (bd: bucket descriptor),
  * they are normally for hash-table without rehash
  */
-void cfs_hash_bd_get(cfs_hash_t *hs, const void *key, cfs_hash_bd_t *bd);
+void cfs_hash_bd_get(cfs_hash_t *hs, const void *key, struct cfs_hash_bd *bd);
 
 static inline void cfs_hash_bd_get_and_lock(cfs_hash_t *hs, const void *key,
-   cfs_hash_bd_t *bd, int excl)
+   struct cfs_hash_bd *bd, int excl)
 {
cfs_hash_bd_get(hs, key, bd);
cfs_hash_bd_lock(hs, bd, excl);
 }
 
-static inline unsigned cfs_hash_bd_index_get(cfs_hash_t *hs, cfs_hash_bd_t *bd)
+static inline unsigned cfs_hash_bd_index_get(cfs_hash_t *hs, struct 
cfs_hash_bd *bd)
 {
return bd->bd_offset | (bd->bd_bucket->hsb_index << hs->hs_bkt_bits);
 }
 
 static inline void cfs_hash_bd_index_set(cfs_hash_t *hs,
-unsigned index, cfs_hash_bd_t *bd)
+unsigned index, struct cfs_hash_bd *bd)
 {
bd->bd_bucket = hs->hs_buckets[index >> hs->hs_bkt_bits];
bd->bd_offset = index & (CFS_HASH_BKT_NHLIST(hs) - 1U);
 }
 
 static inline void *
-cfs_hash_bd_extra_get(cfs_hash_t *hs, cfs_hash_bd_t *bd)
+cfs_hash_bd_extra_get(cfs_hash_t *hs, struct cfs_hash_bd *bd)
 {
return (void *)bd->bd_bucket +
   cfs_hash_bkt_size(hs) - hs->hs_extra_bytes;
 }
 
 static inline __u32
-cfs_hash_bd_version_get(cfs

[PATCH 2/4] staging: lustre: Remove typedef and update cfs_debug_limit_state struct

2013-10-25 Thread Lisa Nguyen
Removed typedef keyword and rename the cfs_debug_limit_state_t
struct to cfs_debug_limit_state in libcfs_debug.h. These changes
resolve the "Do not add new typedefs" warning generated by
checkpatch.pl and meet kernel coding style.

Struct variables in other header and source files
that depend on libcfs_debug.h are updated as well.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h | 8 
 drivers/staging/lustre/lustre/include/lustre_dlm.h | 2 +-
 drivers/staging/lustre/lustre/include/lustre_net.h | 2 +-
 drivers/staging/lustre/lustre/libcfs/tracefile.c   | 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h 
b/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h
index e6439d1..40282b7 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h
@@ -165,11 +165,11 @@ struct ptldebug_header {
 #define CDEBUG_DEFAULT_MAX_DELAY (cfs_time_seconds(600))/* jiffies */
 #define CDEBUG_DEFAULT_MIN_DELAY ((cfs_time_seconds(1) + 1) / 2) /* jiffies */
 #define CDEBUG_DEFAULT_BACKOFF   2
-typedef struct {
+struct cfs_debug_limit_state {
cfs_time_t  cdls_next;
unsigned intcdls_delay;
int  cdls_count;
-} cfs_debug_limit_state_t;
+};
 
 struct libcfs_debug_msg_data {
const char *msg_file;
@@ -177,7 +177,7 @@ struct libcfs_debug_msg_data {
int   msg_subsys;
int   msg_line;
int   msg_mask;
-   cfs_debug_limit_state_t  *msg_cdls;
+   struct cfs_debug_limit_state  *msg_cdls;
 };
 
 #define LIBCFS_DEBUG_MSG_DATA_INIT(data, mask, cdls)   \
@@ -226,7 +226,7 @@ do {
\
 
 #define CDEBUG_LIMIT(mask, format, ...) \
 do {   \
-   static cfs_debug_limit_state_t cdls;\
+   static struct cfs_debug_limit_state cdls;\
\
__CDEBUG(&cdls, mask, format, ## __VA_ARGS__);\
 } while (0)
diff --git a/drivers/staging/lustre/lustre/include/lustre_dlm.h 
b/drivers/staging/lustre/lustre/include/lustre_dlm.h
index 7020d9c..122441f 100644
--- a/drivers/staging/lustre/lustre/include/lustre_dlm.h
+++ b/drivers/staging/lustre/lustre/include/lustre_dlm.h
@@ -1083,7 +1083,7 @@ void _ldlm_lock_debug(struct ldlm_lock *lock,
  * Rate-limited version of lock printing function.
  */
 #define LDLM_DEBUG_LIMIT(mask, lock, fmt, a...) do {\
-   static cfs_debug_limit_state_t _ldlm_cdls; \
+   static struct cfs_debug_limit_state _ldlm_cdls;\
LIBCFS_DEBUG_MSG_DATA_DECL(msgdata, mask, &_ldlm_cdls);   \
ldlm_lock_debug(&msgdata, mask, &_ldlm_cdls, lock, "### " fmt , ##a);\
 } while (0)
diff --git a/drivers/staging/lustre/lustre/include/lustre_net.h 
b/drivers/staging/lustre/lustre/include/lustre_net.h
index e947002..cf2b90d 100644
--- a/drivers/staging/lustre/lustre/include/lustre_net.h
+++ b/drivers/staging/lustre/lustre/include/lustre_net.h
@@ -2206,7 +2206,7 @@ do {  
  \
 #define DEBUG_REQ(level, req, fmt, args...)   \
 do { \
if ((level) & (D_ERROR | D_WARNING)) {  \
-   static cfs_debug_limit_state_t cdls;  \
+   static struct cfs_debug_limit_state cdls;   
  \
LIBCFS_DEBUG_MSG_DATA_DECL(msgdata, level, &cdls);  \
debug_req(&msgdata, level, &cdls, req, "@@@ "fmt" ", ## args);\
} else {  \
diff --git a/drivers/staging/lustre/lustre/libcfs/tracefile.c 
b/drivers/staging/lustre/lustre/libcfs/tracefile.c
index 357f400..f71a3cc 100644
--- a/drivers/staging/lustre/lustre/libcfs/tracefile.c
+++ b/drivers/staging/lustre/lustre/libcfs/tracefile.c
@@ -276,7 +276,7 @@ int libcfs_debug_vmsg2(struct libcfs_debug_msg_data 
*msgdata,
int remain;
int mask = msgdata->msg_mask;
const char  *file = kbasename(msgdata->msg_file);
-   cfs_debug_limit_state_t   *cdls = msgdata->msg_cdls;
+   struct cfs_debug_limit_state   *cdls = msgdata->msg_cdls;
 
tcd = cfs_trace_get_tcd();
 
-- 
1.8.1.2

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


[PATCH 1/4] staging: lustre: Remove typedef and update cfs_hash_bucket struct

2013-10-25 Thread Lisa Nguyen
Remove typedef keyword and rename the cfs_hash_bucket_t struct to
cfs_hash_bucket in libcfs_hash.h. These changes resolve the
"Do not add new typedefs" warning generated by checkpatch.pl and
meet kernel coding style.

The struct variables in hash.c are updated to reflect this change
as well.

Signed-off-by: Lisa Nguyen 
---
 .../lustre/include/linux/libcfs/libcfs_hash.h  | 12 ++--
 drivers/staging/lustre/lustre/libcfs/hash.c| 22 +++---
 2 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h 
b/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h
index b06505d..26c10d9 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h
@@ -97,20 +97,20 @@ union cfs_hash_lock {
  *   which depends on requirement of user
  * - some extra bytes (caller can require it while creating hash)
  */
-typedef struct cfs_hash_bucket {
+struct cfs_hash_bucket {
union cfs_hash_lock hsb_lock;   /**< bucket lock */
__u32   hsb_count;  /**< current entries */
__u32   hsb_version;/**< change version */
unsigned inthsb_index;  /**< index of bucket */
int hsb_depmax; /**< max depth on bucket */
longhsb_head[0];/**< hash-head array */
-} cfs_hash_bucket_t;
+};
 
 /**
  * cfs_hash bucket descriptor, it's normally in stack of caller
  */
 typedef struct cfs_hash_bd {
-   cfs_hash_bucket_t *bd_bucket;  /**< address of bucket */
+   struct cfs_hash_bucket  *bd_bucket;  /**< address of bucket */
unsigned intbd_offset;  /**< offset in bucket */
 } cfs_hash_bd_t;
 
@@ -221,7 +221,7 @@ typedef struct cfs_hash {
/** hash list operations */
struct cfs_hash_hlist_ops  *hs_hops;
/** hash buckets-table */
-   cfs_hash_bucket_t**hs_buckets;
+   struct cfs_hash_bucket   **hs_buckets;
/** total number of items on this hash-table */
atomic_ths_count;
/** hash flags, see cfs_hash_tag for detail */
@@ -255,7 +255,7 @@ typedef struct cfs_hash {
/** refcount on this hash table */
atomic_ths_refcount;
/** rehash buckets-table */
-   cfs_hash_bucket_t**hs_rehash_buckets;
+   struct cfs_hash_bucket   **hs_rehash_buckets;
 #if CFS_HASH_DEBUG_LEVEL >= CFS_HASH_DEBUG_1
/** serialize debug members */
spinlock_t  hs_dep_lock;
@@ -451,7 +451,7 @@ cfs_hash_is_iterating(cfs_hash_t *hs)
 static inline int
 cfs_hash_bkt_size(cfs_hash_t *hs)
 {
-   return offsetof(cfs_hash_bucket_t, hsb_head[0]) +
+   return offsetof(struct cfs_hash_bucket, hsb_head[0]) +
   hs->hs_hops->hop_hhead_size(hs) * CFS_HASH_BKT_NHLIST(hs) +
   hs->hs_extra_bytes;
 }
diff --git a/drivers/staging/lustre/lustre/libcfs/hash.c 
b/drivers/staging/lustre/lustre/libcfs/hash.c
index b0b8e3f..c3cb1c0 100644
--- a/drivers/staging/lustre/lustre/libcfs/hash.c
+++ b/drivers/staging/lustre/lustre/libcfs/hash.c
@@ -469,7 +469,7 @@ cfs_hash_hlist_setup(cfs_hash_t *hs)
 }
 
 static void
-cfs_hash_bd_from_key(cfs_hash_t *hs, cfs_hash_bucket_t **bkts,
+cfs_hash_bd_from_key(cfs_hash_t *hs, struct cfs_hash_bucket **bkts,
 unsigned int bits, const void *key, cfs_hash_bd_t *bd)
 {
unsigned int index = cfs_hash_id(hs, key, (1U << bits) - 1);
@@ -563,8 +563,8 @@ void
 cfs_hash_bd_move_locked(cfs_hash_t *hs, cfs_hash_bd_t *bd_old,
cfs_hash_bd_t *bd_new, struct hlist_node *hnode)
 {
-   cfs_hash_bucket_t *obkt = bd_old->bd_bucket;
-   cfs_hash_bucket_t *nbkt = bd_new->bd_bucket;
+   struct cfs_hash_bucket *obkt = bd_old->bd_bucket;
+   struct cfs_hash_bucket *nbkt = bd_new->bd_bucket;
int rc;
 
if (cfs_hash_bd_compare(bd_old, bd_new) == 0)
@@ -698,7 +698,7 @@ static void
 cfs_hash_multi_bd_lock(cfs_hash_t *hs, cfs_hash_bd_t *bds,
   unsigned n, int excl)
 {
-   cfs_hash_bucket_t *prev = NULL;
+   struct cfs_hash_bucket *prev = NULL;
int i;
 
/**
@@ -721,7 +721,7 @@ static void
 cfs_hash_multi_bd_unlock(cfs_hash_t *hs, cfs_hash_bd_t *bds,
 unsigned n, int excl)
 {
-   cfs_hash_bucket_t *prev = NULL;
+   struct cfs_hash_bucket *prev = NULL;
int i;
 
cfs_hash_for_each_bd(bds, n, i) {
@@ -884,7 +884,7 @@ cfs_hash_dual_bd_finddel_locked(cfs_hash_t *hs, 
cfs_hash_bd_t *bds,
 EXPORT_SYMBOL(cfs_hash_dual_bd_finddel_locked);
 
 static void
-cfs_hash_buckets_free(cfs_hash_bucket_t **buckets,
+cfs_hash_buckets_free(struct cfs_hash_bucket **buckets,
 

[PATCH 2/3] staging: lustre: lnet: Remove unnecessary () from return statements

2013-10-25 Thread Lisa Nguyen
Remove unnecessary parentheses from return statements in lib-lnet.h
to meet kernel coding style.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/lustre/include/linux/lnet/lib-lnet.h | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h 
b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
index 8869f10..0eb2e06 100644
--- a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
+++ b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
@@ -199,11 +199,11 @@ lnet_freelist_alloc(lnet_freelist_t *fl)
lnet_freeobj_t *o;
 
if (list_empty(&fl->fl_list))
-   return (NULL);
+   return NULL;
 
o = list_entry(fl->fl_list.next, lnet_freeobj_t, fo_list);
list_del(&o->fo_list);
-   return ((void *)&o->fo_contents);
+   return (void *)&o->fo_contents;
 }
 
 static inline void
@@ -369,7 +369,7 @@ lnet_eq_alloc(void)
lnet_eq_t *eq;
 
LIBCFS_ALLOC(eq, sizeof(*eq));
-   return (eq);
+   return eq;
 }
 
 static inline void
@@ -405,7 +405,7 @@ lnet_md_alloc(lnet_md_t *umd)
INIT_LIST_HEAD(&md->md_list);
}
 
-   return (md);
+   return md;
 }
 
 static inline void
@@ -429,7 +429,7 @@ lnet_me_alloc(void)
lnet_me_t *me;
 
LIBCFS_ALLOC(me, sizeof(*me));
-   return (me);
+   return me;
 }
 
 static inline void
@@ -448,7 +448,7 @@ lnet_msg_alloc(void)
LIBCFS_ALLOC(msg, sizeof(*msg));
 
/* no need to zero, LIBCFS_ALLOC does for us */
-   return (msg);
+   return msg;
 }
 
 static inline void
-- 
1.8.1.2

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


[PATCH 3/3] staging: lustre: lnet: Reformat pointer variable in lib-lnet.h

2013-10-25 Thread Lisa Nguyen
Reformat a pointer variable in lib-lnet.h to meet kernel
coding style and eliminate pointer format warning
generated by checkpatch.pl

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/lustre/include/linux/lnet/lib-lnet.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h 
b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
index 0eb2e06..bf30104 100644
--- a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
+++ b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
@@ -749,7 +749,7 @@ void lnet_msg_containers_destroy(void);
 int lnet_msg_containers_create(void);
 
 char *lnet_msgtyp2str(int type);
-void lnet_print_hdr(lnet_hdr_t * hdr);
+void lnet_print_hdr(lnet_hdr_t *hdr);
 int lnet_fail_nid(lnet_nid_t nid, unsigned int threshold);
 
 void lnet_counters_get(lnet_counters_t *counters);
-- 
1.8.1.2

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


[PATCH 1/3] staging: lustre: lnet: Remove unnecessary spaces in lib-lnet.h

2013-10-25 Thread Lisa Nguyen
Remove spaces between function names and open parentheses to
meet kernel coding style and eliminate extra space warnings
generated by checkpatch.pl

Signed-off-by: Lisa Nguyen 
---
 .../staging/lustre/include/linux/lnet/lib-lnet.h   | 78 +++---
 1 file changed, 39 insertions(+), 39 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h 
b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
index 59bff0b..8869f10 100644
--- a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
+++ b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
@@ -79,20 +79,20 @@ extern lnet_t  the_lnet;/* THE network 
*/
 /** exclusive lock */
 #define LNET_LOCK_EX   CFS_PERCPT_LOCK_EX
 
-static inline int lnet_is_wire_handle_none (lnet_handle_wire_t *wh)
+static inline int lnet_is_wire_handle_none(lnet_handle_wire_t *wh)
 {
return (wh->wh_interface_cookie == LNET_WIRE_HANDLE_COOKIE_NONE &&
wh->wh_object_cookie == LNET_WIRE_HANDLE_COOKIE_NONE);
 }
 
-static inline int lnet_md_exhausted (lnet_libmd_t *md)
+static inline int lnet_md_exhausted(lnet_libmd_t *md)
 {
return (md->md_threshold == 0 ||
((md->md_options & LNET_MD_MAX_SIZE) != 0 &&
 md->md_offset + md->md_max_size > md->md_length));
 }
 
-static inline int lnet_md_unlinkable (lnet_libmd_t *md)
+static inline int lnet_md_unlinkable(lnet_libmd_t *md)
 {
/* Should unlink md when its refcount is 0 and either:
 *  - md has been flagged for deletion (by auto unlink or 
LNetM[DE]Unlink,
@@ -193,31 +193,31 @@ int lnet_freelist_init(lnet_freelist_t *fl, int n, int 
size);
 void lnet_freelist_fini(lnet_freelist_t *fl);
 
 static inline void *
-lnet_freelist_alloc (lnet_freelist_t *fl)
+lnet_freelist_alloc(lnet_freelist_t *fl)
 {
/* ALWAYS called with liblock held */
lnet_freeobj_t *o;
 
-   if (list_empty (&fl->fl_list))
+   if (list_empty(&fl->fl_list))
return (NULL);
 
-   o = list_entry (fl->fl_list.next, lnet_freeobj_t, fo_list);
-   list_del (&o->fo_list);
+   o = list_entry(fl->fl_list.next, lnet_freeobj_t, fo_list);
+   list_del(&o->fo_list);
return ((void *)&o->fo_contents);
 }
 
 static inline void
-lnet_freelist_free (lnet_freelist_t *fl, void *obj)
+lnet_freelist_free(lnet_freelist_t *fl, void *obj)
 {
/* ALWAYS called with liblock held */
-   lnet_freeobj_t *o = list_entry (obj, lnet_freeobj_t, fo_contents);
+   lnet_freeobj_t *o = list_entry(obj, lnet_freeobj_t, fo_contents);
 
-   list_add (&o->fo_list, &fl->fl_list);
+   list_add(&o->fo_list, &fl->fl_list);
 }
 
 
 static inline lnet_eq_t *
-lnet_eq_alloc (void)
+lnet_eq_alloc(void)
 {
/* NEVER called with resource lock held */
struct lnet_res_container *rec = &the_lnet.ln_eq_container;
@@ -251,7 +251,7 @@ lnet_eq_free(lnet_eq_t *eq)
 }
 
 static inline lnet_libmd_t *
-lnet_md_alloc (lnet_md_t *umd)
+lnet_md_alloc(lnet_md_t *umd)
 {
/* NEVER called with resource lock held */
struct lnet_res_container *rec = the_lnet.ln_md_containers[0];
@@ -322,7 +322,7 @@ lnet_me_free(lnet_me_t *me)
 }
 
 static inline lnet_msg_t *
-lnet_msg_alloc (void)
+lnet_msg_alloc(void)
 {
/* NEVER called with network lock held */
struct lnet_msg_container *msc = the_lnet.ln_msg_containers[0];
@@ -353,7 +353,7 @@ lnet_msg_free_locked(lnet_msg_t *msg)
 }
 
 static inline void
-lnet_msg_free (lnet_msg_t *msg)
+lnet_msg_free(lnet_msg_t *msg)
 {
lnet_net_lock(0);
lnet_msg_free_locked(msg);
@@ -363,7 +363,7 @@ lnet_msg_free (lnet_msg_t *msg)
 #else /* !LNET_USE_LIB_FREELIST */
 
 static inline lnet_eq_t *
-lnet_eq_alloc (void)
+lnet_eq_alloc(void)
 {
/* NEVER called with liblock held */
lnet_eq_t *eq;
@@ -380,7 +380,7 @@ lnet_eq_free(lnet_eq_t *eq)
 }
 
 static inline lnet_libmd_t *
-lnet_md_alloc (lnet_md_t *umd)
+lnet_md_alloc(lnet_md_t *umd)
 {
/* NEVER called with liblock held */
lnet_libmd_t *md;
@@ -423,7 +423,7 @@ lnet_md_free(lnet_libmd_t *md)
 }
 
 static inline lnet_me_t *
-lnet_me_alloc (void)
+lnet_me_alloc(void)
 {
/* NEVER called with liblock held */
lnet_me_t *me;
@@ -479,7 +479,7 @@ lnet_res_lh_invalidate(lnet_libhandle_t *lh)
 }
 
 static inline void
-lnet_eq2handle (lnet_handle_eq_t *handle, lnet_eq_t *eq)
+lnet_eq2handle(lnet_handle_eq_t *handle, lnet_eq_t *eq)
 {
if (eq == NULL) {
LNetInvalidateHandle(handle);
@@ -503,7 +503,7 @@ lnet_handle2eq(lnet_handle_eq_t *handle)
 }
 
 static inline void
-lnet_md2handle (lnet_handle_md_t *handle, lnet_libmd_t *md)
+lnet_md2handle(lnet_handle_md_t *handle, lnet_libmd_t *md)
 {
handle->cookie = md->md_lh.lh_cookie;
 }
@@ -544,7 +544,7 @@ lnet_wire_handle2md(lnet_handle_wire_t *wh)
 }
 
 static in

Re: [PATCH 3/4] staging: lustre: Remove typedef and update cfs_hash_bd struct

2013-10-26 Thread Lisa Nguyen
On Fri, Oct 25, 2013 at 2:59 PM, Dan Carpenter  wrote:
> This is for future reference, the current patch seems fine.
>
> On Fri, Oct 25, 2013 at 01:20:56PM -0700, Lisa Nguyen wrote:
>> --- a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
>> +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
>> @@ -159,7 +159,7 @@ static int lprocfs_ns_resources_seq_show(struct seq_file 
>> *m, void *v)
>>  {
>>   struct ldlm_namespace *ns  = m->private;
>>   __u64 res = 0;
>> - cfs_hash_bd_t bd;
>> + struct cfs_hash_bdbd;
>>   int i;
>
> These are badly aligned.  I assume you are using sed.  Also there is an
> extra space before the '=' on the first line and "i" is out of
> alignment.  So it was pretty ugly to begin with.

True. I used sed and didn't think about fixing the spacing for the
other variables, left them the way they were. Will keep this in mind
for next time.

> Really, don't use tabs, just use a single space.
>
> struct ldlm_namespace *ns = m->private;
> u64 res = 0;
> struct cfs_hash_bd bd;
> int i;
>
> If you do it like that then later when you need to update the types then
> you don't need to re-indent everything to match.
>
> The difference between u64 and __u64 is that you have to use __u64 in
> headers which are exported to userspace.  This isn't a header so that
> doesn't apply.

Ah, another thing I just learned :)

I always appreciate your feedback and information that you want to
share with me. It helps me to continue submitting quality patches.

Thanks,
Lisa

> I haven't totally understood which lustre files are expected to be uapi.
> Those should probably be more minimal and maybe in a separate directory.
>
> regards,
> dan carpenter
>
>
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 1/3] staging: lustre: lnet: Remove unnecessary spaces in lib-lnet.h

2013-10-27 Thread Lisa Nguyen
On Sat, Oct 26, 2013 at 8:37 PM, Greg KH  wrote:
> On Fri, Oct 25, 2013 at 01:22:52PM -0700, Lisa Nguyen wrote:
>> Remove spaces between function names and open parentheses to
>> meet kernel coding style and eliminate extra space warnings
>> generated by checkpatch.pl
>>
>> Signed-off-by: Lisa Nguyen 
>
> This series doesn't apply either, did I already apply it?

Yes, you've already applied it :)


> When resending patch series, please put a [RESEND] or [v2] or something
> so that I know to drop the previous one before I apply it.

I will keep that tip for future patches. Thanks!

> thanks,
>
> greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 1/4] staging: lustre: Remove typedef and update cfs_hash_bucket struct

2013-10-27 Thread Lisa Nguyen
On Sat, Oct 26, 2013 at 8:36 PM, Greg KH  wrote:
> On Fri, Oct 25, 2013 at 01:20:18PM -0700, Lisa Nguyen wrote:
>> Remove typedef keyword and rename the cfs_hash_bucket_t struct to
>> cfs_hash_bucket in libcfs_hash.h. These changes resolve the
>> "Do not add new typedefs" warning generated by checkpatch.pl and
>> meet kernel coding style.
>>
>> The struct variables in hash.c are updated to reflect this change
>> as well.
>>
>> Signed-off-by: Lisa Nguyen 
>
> This patch doesn't apply at all, nor does this series, care to refresh
> it against my latest tree and resend it?
>

Yeah, I would except you already applied this patch series :)

> thanks,
>
> greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: lustre: lnet: Rewrite return statement in socklnd.c

2013-10-27 Thread Lisa Nguyen
Rewrite the return statement in socklnd.c to eliminate the
use of a ternary operator. This will prevent the checkpatch.pl
script from generating a warning saying to remove () from
this particular return statement.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c 
b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c
index 6825b45..2ddc3aa 100644
--- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c
+++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c
@@ -1768,7 +1768,10 @@ ksocknal_close_matching_conns (lnet_process_id_t id, 
__u32 ipaddr)
if (id.nid == LNET_NID_ANY || id.pid == LNET_PID_ANY || ipaddr == 0)
return (0);
 
-   return (count == 0 ? -ENOENT : 0);
+   if (count == 0)
+   return -ENOENT;
+   else
+   return 0;
 }
 
 void
-- 
1.8.1.2

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


[PATCH] staging: sb105x: Remove unneeded semicolon in sb_pci_mp.c

2013-10-27 Thread Lisa Nguyen
Remove unneeded semicolon in sb_pci_mp.c to meet kernel
coding style.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/sb105x/sb_pci_mp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/sb105x/sb_pci_mp.c 
b/drivers/staging/sb105x/sb_pci_mp.c
index bc53b4e..11c047e 100644
--- a/drivers/staging/sb105x/sb_pci_mp.c
+++ b/drivers/staging/sb105x/sb_pci_mp.c
@@ -1216,7 +1216,7 @@ static int mp_ioctl(struct tty_struct *tty, unsigned int 
cmd, unsigned long arg)
return 
(inb(mp_devs[arg].option_reg_addr+MP_OPTR_IIR0+(state->port->line/8)));
}
case TIOCGGETPORTTYPE:
-   ret = get_device_type(arg);;
+   ret = get_device_type(arg);
return ret;
case TIOCSMULTIECHO: /* set to multi-drop mode(RS422) or echo 
mode(RS485)*/
outb( ( inb(info->interface_config_addr) & ~0x03 ) | 
0x01 ,  
-- 
1.8.1.2

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


[RFC 0/2] Replace user-defined types with C defined types

2013-10-28 Thread Lisa Nguyen
Before I continue cleaning up the files for the bcm driver, I 
am asking for feedback to make sure the changes I've proposed 
so far are acceptable.

In the staging/bcm/Typedefs.h file, the original code included 
these user-defined types:

#define FALSE 0
typedef char BOOLEAN;

It wouldn't make sense for one to define FALSE when there is 
a C defined false keyword available. Same goes with BOOLEAN 
when there is a C defined bool type available as well. I 
chose to remove these two lines from Typedefs.h and made the 
replacements in other header and source files.

My main concern is to make sure that I didn't alter the logic 
in each file I modified. The primary goal is to remove any 
redundancy.

Questions and comments are highly encouraged. Thanks in 
advance.

Lisa Nguyen (2):
  staging: bcm: Replace BOOLEAN with bool
  staging: bcm: Replace FALSE with false

 drivers/staging/bcm/Adapter.h | 118 
 drivers/staging/bcm/Bcmchar.c |  44 -
 drivers/staging/bcm/Bcmnet.c  |   2 +-
 drivers/staging/bcm/CmHost.c  |  60 ++--
 drivers/staging/bcm/CmHost.h  |   2 +-
 drivers/staging/bcm/DDRInit.c |   2 +-
 drivers/staging/bcm/HandleControlPacket.c |  12 +--
 drivers/staging/bcm/IPv6Protocol.c|  28 +++---
 drivers/staging/bcm/InterfaceDld.c|   4 +-
 drivers/staging/bcm/InterfaceIdleMode.c   |   4 +-
 drivers/staging/bcm/InterfaceInit.c   |  20 ++--
 drivers/staging/bcm/InterfaceIsr.c|  12 +--
 drivers/staging/bcm/InterfaceMisc.c   |   8 +-
 drivers/staging/bcm/InterfaceRx.c |  22 ++---
 drivers/staging/bcm/InterfaceRx.h |   2 +-
 drivers/staging/bcm/InterfaceTx.c |  26 +++---
 drivers/staging/bcm/LeakyBucket.c |   8 +-
 drivers/staging/bcm/Misc.c|  68 +++---
 drivers/staging/bcm/PHSModule.c   |  34 +++
 drivers/staging/bcm/PHSModule.h   |   4 +-
 drivers/staging/bcm/Prototypes.h  |  12 +--
 drivers/staging/bcm/Qos.c | 102 ++--
 drivers/staging/bcm/Transmit.c|   4 +-
 drivers/staging/bcm/Typedefs.h|   4 +-
 drivers/staging/bcm/led_control.c |  38 
 drivers/staging/bcm/nvm.c | 148 +++---
 drivers/staging/bcm/vendorspecificextn.c  |   2 +-
 drivers/staging/bcm/vendorspecificextn.h  |   2 +-
 28 files changed, 396 insertions(+), 396 deletions(-)

-- 
1.8.1.2

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


[RFC 1/2] staging: bcm: Replace BOOLEAN with bool

2013-10-28 Thread Lisa Nguyen
Remove user-defined BOOLEAN data type with C bool data
type.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/bcm/Adapter.h | 118 +++---
 drivers/staging/bcm/CmHost.c  |   6 +-
 drivers/staging/bcm/CmHost.h  |   2 +-
 drivers/staging/bcm/DDRInit.c |   2 +-
 drivers/staging/bcm/HandleControlPacket.c |   4 +-
 drivers/staging/bcm/IPv6Protocol.c|  14 ++--
 drivers/staging/bcm/InterfaceInit.c   |   2 +-
 drivers/staging/bcm/InterfaceRx.c |   4 +-
 drivers/staging/bcm/InterfaceRx.h |   2 +-
 drivers/staging/bcm/InterfaceTx.c |   2 +-
 drivers/staging/bcm/LeakyBucket.c |   2 +-
 drivers/staging/bcm/PHSModule.c   |  18 ++---
 drivers/staging/bcm/PHSModule.h   |   4 +-
 drivers/staging/bcm/Prototypes.h  |  12 +--
 drivers/staging/bcm/Qos.c |  26 +++
 drivers/staging/bcm/Transmit.c|   2 +-
 drivers/staging/bcm/Typedefs.h|   2 +-
 drivers/staging/bcm/led_control.c |  10 +--
 drivers/staging/bcm/nvm.c |  24 +++---
 drivers/staging/bcm/vendorspecificextn.c  |   2 +-
 drivers/staging/bcm/vendorspecificextn.h  |   2 +-
 21 files changed, 130 insertions(+), 130 deletions(-)

diff --git a/drivers/staging/bcm/Adapter.h b/drivers/staging/bcm/Adapter.h
index 1d8bf08..d6c9630 100644
--- a/drivers/staging/bcm/Adapter.h
+++ b/drivers/staging/bcm/Adapter.h
@@ -63,7 +63,7 @@ struct bcm_classifier_rule {
ULONG   ulSFID;
UCHAR   ucReserved[2];
B_UINT16uiClassifierRuleIndex;
-   BOOLEAN bUsed;
+   boolbUsed;
USHORT  usVCID_Value;
B_UINT8 u8ClassifierRulePriority; /* This field detemines the 
Classifier Priority */
U_IP_ADDRESSstSrcIpAddress;
@@ -86,14 +86,14 @@ struct bcm_classifier_rule {
USHORT  usDestPortRangeHi[MAX_PORT_RANGE];
UCHAR   ucDestPortRangeLength;
 
-   BOOLEAN bProtocolValid;
-   BOOLEAN bTOSValid;
-   BOOLEAN bDestIpValid;
-   BOOLEAN bSrcIpValid;
+   boolbProtocolValid;
+   boolbTOSValid;
+   boolbDestIpValid;
+   boolbSrcIpValid;
 
/* For IPv6 Addressing */
UCHAR   ucDirection;
-   BOOLEAN bIpv6Protocol;
+   boolbIpv6Protocol;
UINT32  u32PHSRuleID;
struct bcm_phs_rule sPhsRule;
UCHAR   u8AssociatedPHSI;
@@ -113,11 +113,11 @@ struct bcm_classifier_rule {
 };
 
 struct bcm_fragmented_packet_info {
-   BOOLEAN bUsed;
+   boolbUsed;
ULONG   ulSrcIpAddress;
USHORT  usIpIdentification;
struct bcm_classifier_rule *pstMatchedClassifierEntry;
-   BOOLEAN bOutOfOrderFragment;
+   boolbOutOfOrderFragment;
 };
 
 struct bcm_packet_info {
@@ -128,9 +128,9 @@ struct bcm_packet_info {
/* This field determines the priority of the SF Queues */
B_UINT8 u8TrafficPriority;
 
-   BOOLEAN bValid;
-   BOOLEAN bActive;
-   BOOLEAN bActivateRequestSent;
+   boolbValid;
+   boolbActive;
+   boolbActivateRequestSent;
 
B_UINT8 u8QueueType; /* BE or rtPS */
 
@@ -170,17 +170,17 @@ struct bcm_packet_info {
};
};
 
-   BOOLEAN bProtocolValid;
-   BOOLEAN bTOSValid;
-   BOOLEAN bDestIpValid;
-   BOOLEAN bSrcIpValid;
+   boolbProtocolValid;
+   boolbTOSValid;
+   boolbDestIpValid;
+   boolbSrcIpValid;
 
-   BOOLEAN bActiveSet;
-   BOOLEAN bAdmittedSet;
-   BOOLEAN bAuthorizedSet;
-   BOOLEAN bClassifierPriority;
+   boolbActiveSet;
+   boolbAdmittedSet;
+   boolbAuthorizedSet;
+   boolbClassifierPriority;
UCHAR   ucServiceClassName[MAX_CLASS_NAME_LENGTH];
-   BOOLEAN bHeaderSuppressionEnabled;
+   boolbHeaderSuppressionEnabled;
spinlock_t  SFQueueLock;
void*pstSFIndication;
struct timeval  stLastUpdateTokenAt;
@@ -196,8 +196,8 @@ struct bcm_tarang_data {
struct sk_buff  *RxAppControlHead;
struct sk_buff  *RxAppControlTail;
int AppCtrlQueueLen;
-   BOOLEAN MacTracingEnabled;
-   BOOLEAN bApplicationToExit;
+   boolMacTracingEnabled;
+   boolbApplicationToExit;
struct bcm_mibs_dropped_cntrl_msg stDroppedAppCntrlMsgs;
ULONG

[PATCH 2/2] staging: media: davinci_vpfe: Remove spaces before semicolons

2013-10-28 Thread Lisa Nguyen
Remove unnecessary spaces before semicolons to meet kernel
coding style.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/media/davinci_vpfe/dm365_ipipe.c| 2 +-
 drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c | 4 ++--
 drivers/staging/media/davinci_vpfe/dm365_isif.c | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipe.c 
b/drivers/staging/media/davinci_vpfe/dm365_ipipe.c
index 766a071..b7044a3 100644
--- a/drivers/staging/media/davinci_vpfe/dm365_ipipe.c
+++ b/drivers/staging/media/davinci_vpfe/dm365_ipipe.c
@@ -1009,7 +1009,7 @@ static int ipipe_validate_yee_params(struct 
vpfe_ipipe_yee *yee)
yee->es_ofst_grad > YEE_THR_MASK)
return -EINVAL;
 
-   for (i = 0; i < VPFE_IPIPE_MAX_SIZE_YEE_LUT ; i++)
+   for (i = 0; i < VPFE_IPIPE_MAX_SIZE_YEE_LUT; i++)
if (yee->table[i] > YEE_ENTRY_MASK)
return -EINVAL;
 
diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c 
b/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c
index e027b92..2d36b60 100644
--- a/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c
+++ b/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c
@@ -791,7 +791,7 @@ ipipe_set_3d_lut_regs(void *__iomem base_addr, void 
*__iomem isp5_base_addr,
 
/* valied table */
tbl = lut_3d->table;
-   for (i = 0 ; i < VPFE_IPIPE_MAX_SIZE_3D_LUT; i++) {
+   for (i = 0; i < VPFE_IPIPE_MAX_SIZE_3D_LUT; i++) {
/* Each entry has 0-9 (B), 10-19 (G) and
20-29 R values */
val = tbl[i].b & D3_LUT_ENTRY_MASK;
@@ -899,7 +899,7 @@ ipipe_set_gbce_regs(void *__iomem base_addr, void *__iomem 
isp5_base_addr,
if (!gbce->table)
return;
 
-   for (count = 0; count < VPFE_IPIPE_MAX_SIZE_GBCE_LUT ; count += 2)
+   for (count = 0; count < VPFE_IPIPE_MAX_SIZE_GBCE_LUT; count += 2)
w_ip_table(isp5_base_addr, ((gbce->table[count + 1] & mask) <<
GBCE_ENTRY_SHIFT) | (gbce->table[count] & mask),
((count/2) << 2) + GBCE_TB_START_ADDR);
diff --git a/drivers/staging/media/davinci_vpfe/dm365_isif.c 
b/drivers/staging/media/davinci_vpfe/dm365_isif.c
index ff48fce..4171cfd 100644
--- a/drivers/staging/media/davinci_vpfe/dm365_isif.c
+++ b/drivers/staging/media/davinci_vpfe/dm365_isif.c
@@ -918,7 +918,7 @@ isif_config_dfc(struct vpfe_isif_device *isif, struct 
vpfe_isif_dfc *vdfc)
   (0 << ISIF_VDFC_EN_SHIFT), DFCCTL);
 
isif_write(isif->isif_cfg.base_addr, 0x6, DFCMEMCTL);
-   for (i = 0 ; i < vdfc->num_vdefects; i++) {
+   for (i = 0; i < vdfc->num_vdefects; i++) {
count = DFC_WRITE_WAIT_COUNT;
while (count &&
(isif_read(isif->isif_cfg.base_addr, DFCMEMCTL) & 0x2))
-- 
1.8.1.2

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


[PATCH 1/2] staging: media: davinci_vpfe: Rewrite return statement in vpfe_video.c

2013-10-28 Thread Lisa Nguyen
Rewrite the return statement in vpfe_video.c to eliminate the
use of a ternary operator. This will prevent the checkpatch.pl
script from generating a warning saying to remove () from
this particular return statement.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/media/davinci_vpfe/vpfe_video.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/media/davinci_vpfe/vpfe_video.c 
b/drivers/staging/media/davinci_vpfe/vpfe_video.c
index 24d98a6..49aafe4 100644
--- a/drivers/staging/media/davinci_vpfe/vpfe_video.c
+++ b/drivers/staging/media/davinci_vpfe/vpfe_video.c
@@ -346,7 +346,10 @@ static int vpfe_pipeline_disable(struct vpfe_pipeline 
*pipe)
}
mutex_unlock(&mdev->graph_mutex);
 
-   return (ret == 0) ? ret : -ETIMEDOUT ;
+   if (ret == 0)
+   return ret;
+   else
+   return -ETIMEDOUT;
 }
 
 /*
-- 
1.8.1.2

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


Re: [PATCH 1/2] staging: media: davinci_vpfe: Rewrite return statement in vpfe_video.c

2013-10-28 Thread Lisa Nguyen
On Mon, Oct 28, 2013 at 2:08 PM, Greg KH  wrote:
> On Mon, Oct 28, 2013 at 01:19:29PM -0700, Lisa Nguyen wrote:
>> Rewrite the return statement in vpfe_video.c to eliminate the
>> use of a ternary operator. This will prevent the checkpatch.pl
>> script from generating a warning saying to remove () from
>> this particular return statement.
>>
>> Signed-off-by: Lisa Nguyen 
>> ---
>>  drivers/staging/media/davinci_vpfe/vpfe_video.c | 5 -
>
> drivers/staging/ is not under my "control", that is Mauro.  Please use
> scripts/get_maintainer.pl to determine who to copy on your patches, I
> can't take these two, sorry, you need to resend them to the proper
> people.
>
> thanks,
>
> greg k-h

Not a problem, Greg. Thanks for the reminder :)

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


Re: [PATCH 1/2] staging: media: davinci_vpfe: Rewrite return statement in vpfe_video.c

2013-10-28 Thread Lisa Nguyen
On Mon, Oct 28, 2013 at 3:11 PM, Greg KH  wrote:
> On Mon, Oct 28, 2013 at 10:51:38PM +0100, Andi Shyti wrote:
>> > -   return (ret == 0) ? ret : -ETIMEDOUT ;
>> > +   if (ret == 0)
>> > +   return ret;
>> > +   else
>> > +   return -ETIMEDOUT;
>>
>> I actually like more the original version.
>>
>> If you write it like this:
>>
>>   return !ret ? ret : -ETIMEDOUT;
>>
>> checkpatch shouldn't complain.
>
> No, but I will.
>
> That's horrid code, please be specific and readable, no one should ever
> use ?: syntax except within function parameters.
>
> greg k-h

I've resubmitted these two patches to Mauro and cc'ed the linux-media
mailing list. I'll see what Mauro thinks.

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


[PATCH] staging: bcm: Remove unnecessary pointer casting

2013-10-29 Thread Lisa Nguyen
Some void pointers can be assigned to other
pointer variables in functions without casting.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/bcm/CmHost.c   | 10 +-
 drivers/staging/bcm/IPv6Protocol.c |  2 +-
 drivers/staging/bcm/InterfaceDld.c |  4 ++--
 drivers/staging/bcm/InterfaceTx.c  |  2 +-
 4 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c
index 8ec1dd1..cc91b5e 100644
--- a/drivers/staging/bcm/CmHost.c
+++ b/drivers/staging/bcm/CmHost.c
@@ -837,7 +837,7 @@ static VOID DumpCmControlPacket(PVOID pvBuffer)
UINT nCurClassifierCnt;
struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
 
-   pstAddIndication = (struct bcm_add_indication_alt *)pvBuffer;
+   pstAddIndication = pvBuffer;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, 
"==>");
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, 
"u8Type: 0x%X", pstAddIndication->u8Type);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, 
"u8Direction: 0x%X", pstAddIndication->u8Direction);
@@ -1339,14 +1339,14 @@ ULONG StoreCmControlResponseMessage(struct 
bcm_mini_adapter *Adapter, PVOID pvBu
UINT uiSearchRuleIndex;
ULONG ulSFID;
 
-   pstAddIndicationAlt = (struct bcm_add_indication_alt *)(pvBuffer);
+   pstAddIndicationAlt = pvBuffer;
 
/*
 * In case of DSD Req By MS, we should immediately delete this SF so 
that
 * we can stop the further classifying the pkt for this SF.
 */
if (pstAddIndicationAlt->u8Type == DSD_REQ) {
-   pstDeletionRequest = (struct bcm_del_request *)pvBuffer;
+   pstDeletionRequest = pvBuffer;
 
ulSFID = ntohl(pstDeletionRequest->u32SFID);
uiSearchRuleIndex = SearchSfid(Adapter, ulSFID);
@@ -1452,12 +1452,12 @@ static inline struct bcm_add_indication_alt
struct bcm_add_indication *pstAddIndication = NULL;
struct bcm_add_indication_alt *pstAddIndicationDest = NULL;
 
-   pstAddIndication = (struct bcm_add_indication *)(pvBuffer);
+   pstAddIndication = pvBuffer;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, 
"=>");
if ((pstAddIndication->u8Type == DSD_REQ) ||
(pstAddIndication->u8Type == DSD_RSP) ||
(pstAddIndication->u8Type == DSD_ACK))
-   return (struct bcm_add_indication_alt *)pvBuffer;
+   return pvBuffer;
 
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, 
"Inside RestoreCmControlResponseMessage ");
/*
diff --git a/drivers/staging/bcm/IPv6Protocol.c 
b/drivers/staging/bcm/IPv6Protocol.c
index f48c9c4..cd16067 100644
--- a/drivers/staging/bcm/IPv6Protocol.c
+++ b/drivers/staging/bcm/IPv6Protocol.c
@@ -192,7 +192,7 @@ USHORT  IpVersion6(struct bcm_mini_adapter *Adapter, 
PVOID pcIpHeader,
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG,
DBG_LVL_ALL, "IpVersion6 ==>\n");
 
-   pstIpv6Header = (struct bcm_ipv6_hdr *)pcIpHeader;
+   pstIpv6Header = pcIpHeader;
 
DumpIpv6Header(pstIpv6Header);
 
diff --git a/drivers/staging/bcm/InterfaceDld.c 
b/drivers/staging/bcm/InterfaceDld.c
index d02b7d6..463bdee 100644
--- a/drivers/staging/bcm/InterfaceDld.c
+++ b/drivers/staging/bcm/InterfaceDld.c
@@ -6,7 +6,7 @@ int InterfaceFileDownload(PVOID arg, struct file *flp, unsigned 
int on_chip_loc)
mm_segment_t oldfs = {0};
int errno = 0, len = 0; /* ,is_config_file = 0 */
loff_t pos = 0;
-   struct bcm_interface_adapter *psIntfAdapter = (struct 
bcm_interface_adapter *)arg;
+   struct bcm_interface_adapter *psIntfAdapter = arg;
/* struct bcm_mini_adapter *Adapter = psIntfAdapter->psAdapter; */
char *buff = kmalloc(MAX_TRANSFER_CTRL_BYTE_USB, GFP_KERNEL);
 
@@ -61,7 +61,7 @@ int InterfaceFileReadbackFromChip(PVOID arg, struct file 
*flp, unsigned int on_c
loff_t pos = 0;
static int fw_down;
INT Status = STATUS_SUCCESS;
-   struct bcm_interface_adapter *psIntfAdapter = (struct 
bcm_interface_adapter *)arg;
+   struct bcm_interface_adapter *psIntfAdapter = arg;
int bytes;
 
buff = kmalloc(MAX_TRANSFER_CTRL_BYTE_USB, GFP_DMA);
diff --git a/drivers/staging/bcm/InterfaceTx.c 
b/drivers/staging/bcm/InterfaceTx.c
index 3457954..b9c2784 100644
--- a/drivers/staging/bcm/InterfaceTx.c
+++ b/drivers/staging/bcm/InterfaceTx.c
@@ -184,7 +184,7 @@ int InterfaceTransmitPacket(PVOID arg, PVOID data, UINT len)
 {
struct bcm_usb_tcb *pTcb= NULL;
 
-   struct bcm_interface_adapter *psIntfAdapter = (struct 
bcm_interface_adapter *)arg;
+   struct bcm_interface_adapter *psIntfAdapter = ar

[PATCH 4/8] staging: bcm: Replace INT with int

2013-10-29 Thread Lisa Nguyen
Replace user-defined data type INT with C defined int data type.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/bcm/Bcmchar.c | 14 +++
 drivers/staging/bcm/Bcmnet.c  |  4 +-
 drivers/staging/bcm/HandleControlPacket.c |  2 +-
 drivers/staging/bcm/IPv6Protocol.c|  2 +-
 drivers/staging/bcm/InterfaceDld.c| 12 +++---
 drivers/staging/bcm/InterfaceIdleMode.c   |  2 +-
 drivers/staging/bcm/InterfaceIdleMode.h   |  6 +--
 drivers/staging/bcm/InterfaceIsr.c|  4 +-
 drivers/staging/bcm/InterfaceIsr.h|  2 +-
 drivers/staging/bcm/InterfaceMisc.h   | 16 
 drivers/staging/bcm/InterfaceTx.h |  2 +-
 drivers/staging/bcm/LeakyBucket.c |  8 ++--
 drivers/staging/bcm/Prototypes.h  | 62 +++
 drivers/staging/bcm/Qos.c | 12 +++---
 drivers/staging/bcm/Typedefs.h|  1 -
 drivers/staging/bcm/hostmibs.c|  2 +-
 drivers/staging/bcm/led_control.c | 24 ++--
 drivers/staging/bcm/vendorspecificextn.c  | 14 +++
 drivers/staging/bcm/vendorspecificextn.h  | 14 +++
 19 files changed, 100 insertions(+), 103 deletions(-)

diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c
index f29c545..4d7b5da 100644
--- a/drivers/staging/bcm/Bcmchar.c
+++ b/drivers/staging/bcm/Bcmchar.c
@@ -155,7 +155,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, 
ULONG arg)
struct bcm_tarang_data *pTarang = filp->private_data;
void __user *argp = (void __user *)arg;
struct bcm_mini_adapter *Adapter = pTarang->Adapter;
-   INT Status = STATUS_FAILURE;
+   int Status = STATUS_FAILURE;
int timeout = 0;
struct bcm_ioctl_buffer IoBuffer;
int bytes;
@@ -935,7 +935,7 @@ cntrlEnd:
break;
 
case IOCTL_CHIP_RESET: {
-   INT NVMAccess = down_trylock(&Adapter->NVMRdmWrmLock);
+   int NVMAccess = down_trylock(&Adapter->NVMRdmWrmLock);
if (NVMAccess) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, " 
IOCTL_BCM_CHIP_RESET not allowed as EEPROM Read/Write is in progress\n");
return -EACCES;
@@ -1656,7 +1656,7 @@ cntrlEnd:
return -EFAULT;
}
 
-   Status = copy_from_user(&eFlash2xSectionVal, 
IoBuffer.InputBuffer, sizeof(INT));
+   Status = copy_from_user(&eFlash2xSectionVal, 
IoBuffer.InputBuffer, sizeof(int));
if (Status) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Copy 
of flash section val failed");
return -EFAULT;
@@ -1811,7 +1811,7 @@ cntrlEnd:
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Copy 
of IOCTL BUFFER failed");
return -EFAULT;
}
-   Status = copy_from_user(&eFlash2xSectionVal, 
IoBuffer.InputBuffer, sizeof(INT));
+   Status = copy_from_user(&eFlash2xSectionVal, 
IoBuffer.InputBuffer, sizeof(int));
if (Status) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Copy 
of flash section val failed");
return -EFAULT;
@@ -1841,9 +1841,9 @@ cntrlEnd:
 
case IOCTL_BCM_NVM_RAW_READ: {
struct bcm_nvm_readwrite stNVMRead;
-   INT NOB ;
-   INT BuffSize ;
-   INT ReadOffset = 0;
+   int NOB ;
+   int BuffSize ;
+   int ReadOffset = 0;
UINT ReadBytes = 0 ;
PUCHAR pReadBuff;
void __user *OutPutBuff;
diff --git a/drivers/staging/bcm/Bcmnet.c b/drivers/staging/bcm/Bcmnet.c
index 53fee2f..bc7417e 100644
--- a/drivers/staging/bcm/Bcmnet.c
+++ b/drivers/staging/bcm/Bcmnet.c
@@ -2,7 +2,7 @@
 
 struct net_device *gblpnetdev;
 
-static INT bcm_open(struct net_device *dev)
+static int bcm_open(struct net_device *dev)
 {
struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(dev);
 
@@ -26,7 +26,7 @@ static INT bcm_open(struct net_device *dev)
return 0;
 }
 
-static INT bcm_close(struct net_device *dev)
+static int bcm_close(struct net_device *dev)
 {
struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(dev);
 
diff --git a/drivers/staging/bcm/HandleControlPacket.c 
b/drivers/staging/bcm/HandleControlPacket.c
index 1973d27..9b74768 100644
--- a/drivers/staging/bcm/HandleControlPacket.c
+++ b/drivers/staging/bcm/HandleControlPacket.c
@@ -211,7 +211,7 @@ int control_packet_handler(struct bcm_mini_adapter *Adapter 
/* pointer to adapte
return STATUS_SUCCESS;
 }
 
-INT flushAllAppQ(void)
+int flushAllAppQ(void)
 {
struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
struct bcm_tarang_data *pTarang = NULL;
diff --git a/drivers/staging/bcm/IPv6Protocol

[PATCH 8/8] staging: bcm: Remove user defined data type DWORD

2013-10-29 Thread Lisa Nguyen
Remove user-defined data type DWORD in Typedef.h since it
is not used anywhere in the bcm driver.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/bcm/Typedefs.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/bcm/Typedefs.h b/drivers/staging/bcm/Typedefs.h
index c2085cf..6a7fea0 100644
--- a/drivers/staging/bcm/Typedefs.h
+++ b/drivers/staging/bcm/Typedefs.h
@@ -13,7 +13,6 @@ typedef unsigned short B_UINT16;
 typedef unsigned int UINT;
 typedef unsigned int B_UINT32;
 typedef unsigned long ULONG;
-typedef unsigned long DWORD;
 
 typedef char* PCHAR;
 typedef int* PINT;
-- 
1.8.1.2

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


[PATCH 2/8] staging: bcm: Replace CHAR with char

2013-10-29 Thread Lisa Nguyen
Replace user-defined data type CHAR with C defined char data
type.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/bcm/Adapter.h | 2 +-
 drivers/staging/bcm/HandleControlPacket.c | 2 +-
 drivers/staging/bcm/Typedefs.h| 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/bcm/Adapter.h b/drivers/staging/bcm/Adapter.h
index 56fed62..a4b1fb1 100644
--- a/drivers/staging/bcm/Adapter.h
+++ b/drivers/staging/bcm/Adapter.h
@@ -219,7 +219,7 @@ struct bcm_mini_adapter {
struct bcm_mini_adapter *next;
struct net_device   *dev;
u32 msg_enable;
-   CHAR*caDsxReqResp;
+   char*caDsxReqResp;
atomic_tApplicationRunning;
boolAppCtrlQueueOverFlow;
atomic_tCurrentApplicationCount;
diff --git a/drivers/staging/bcm/HandleControlPacket.c 
b/drivers/staging/bcm/HandleControlPacket.c
index c086169..1973d27 100644
--- a/drivers/staging/bcm/HandleControlPacket.c
+++ b/drivers/staging/bcm/HandleControlPacket.c
@@ -16,7 +16,7 @@ static VOID handle_rx_control_packet(struct bcm_mini_adapter 
*Adapter, struct sk
struct bcm_tarang_data *pTarang = NULL;
bool HighPriorityMessage = false;
struct sk_buff *newPacket = NULL;
-   CHAR cntrl_msg_mask_bit = 0;
+   char cntrl_msg_mask_bit = 0;
bool drop_pkt_flag = TRUE;
USHORT usStatus = *(PUSHORT)(skb->data);
 
diff --git a/drivers/staging/bcm/Typedefs.h b/drivers/staging/bcm/Typedefs.h
index 9d8fd1b..cc22d48 100644
--- a/drivers/staging/bcm/Typedefs.h
+++ b/drivers/staging/bcm/Typedefs.h
@@ -10,7 +10,6 @@
 #define TRUE   1
 
 
-typedef char CHAR;
 typedef int INT;
 typedef short SHORT;
 typedef long LONG;
-- 
1.8.1.2

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


[PATCH 1/8] staging: bcm: Replace PVOID with void *

2013-10-29 Thread Lisa Nguyen
Remove user-defined data type PVOID and replace it with
void *.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/bcm/Adapter.h | 22 +++---
 drivers/staging/bcm/Bcmchar.c |  6 +++---
 drivers/staging/bcm/CmHost.c  | 16 
 drivers/staging/bcm/HandleControlPacket.c |  2 +-
 drivers/staging/bcm/IPv6Protocol.c|  4 ++--
 drivers/staging/bcm/InterfaceDld.c|  4 ++--
 drivers/staging/bcm/InterfaceMisc.h   | 16 
 drivers/staging/bcm/InterfaceTx.c |  4 ++--
 drivers/staging/bcm/InterfaceTx.h |  2 +-
 drivers/staging/bcm/Prototypes.h  |  4 ++--
 drivers/staging/bcm/Qos.c |  6 +++---
 drivers/staging/bcm/Typedefs.h|  1 -
 drivers/staging/bcm/hostmibs.c|  8 
 drivers/staging/bcm/nvm.c |  8 
 drivers/staging/bcm/vendorspecificextn.c  |  8 
 drivers/staging/bcm/vendorspecificextn.h  |  8 
 16 files changed, 59 insertions(+), 60 deletions(-)

diff --git a/drivers/staging/bcm/Adapter.h b/drivers/staging/bcm/Adapter.h
index 9cd5987..56fed62 100644
--- a/drivers/staging/bcm/Adapter.h
+++ b/drivers/staging/bcm/Adapter.h
@@ -20,7 +20,7 @@ struct bcm_packettosend {
 } __packed;
 
 struct bcm_control_packet {
-   PVOID   ControlBuff;
+   void *ControlBuff;
UINTControlBuffLen;
struct bcm_control_packet *next;
 } __packed;
@@ -208,9 +208,9 @@ struct bcm_targetdsx_buffer {
boolvalid;
 };
 
-typedef int (*FP_FLASH_WRITE)(struct bcm_mini_adapter *, UINT, PVOID);
+typedef int (*FP_FLASH_WRITE)(struct bcm_mini_adapter *, UINT, void *);
 
-typedef int (*FP_FLASH_WRITE_STATUS)(struct bcm_mini_adapter *, UINT, PVOID);
+typedef int (*FP_FLASH_WRITE_STATUS)(struct bcm_mini_adapter *, UINT, void *);
 
 /*
  * Driver adapter data structure
@@ -308,22 +308,22 @@ struct bcm_mini_adapter {
/* Driver State for LED Blinking */
enum bcm_led_events DriverState;
/* Interface Specific */
-   PVOID   pvInterfaceAdapter;
-   int (*bcm_file_download)(PVOID,
+   void*pvInterfaceAdapter;
+   int (*bcm_file_download)(void *,
struct file *,
unsigned int);
-   int (*bcm_file_readback_from_chip)(PVOID,
+   int (*bcm_file_readback_from_chip)(void *,
struct file *,
unsigned int);
-   int (*interface_rdm)(PVOID,
+   int (*interface_rdm)(void *,
UINT,
-   PVOID,
+   void *,
int);
-   int (*interface_wrm)(PVOID,
+   int (*interface_wrm)(void *,
UINT,
-   PVOID,
+   void *,
int);
-   int (*interface_transmit)(PVOID, PVOID , UINT);
+   int (*interface_transmit)(void *, void * , UINT);
boolIdleMode;
boolbDregRequestSentInIdleMode;
boolbTriedToWakeUpFromlowPowerMode;
diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c
index 8c81143..f29c545 100644
--- a/drivers/staging/bcm/Bcmchar.c
+++ b/drivers/staging/bcm/Bcmchar.c
@@ -714,7 +714,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, 
ULONG arg)
case IOCTL_SS_INFO_REQ:
case IOCTL_SEND_CONTROL_MESSAGE:
case IOCTL_IDLE_REQ: {
-   PVOID pvBuffer = NULL;
+   void *pvBuffer = NULL;
 
/* Copy Ioctl Buffer structure */
if (copy_from_user(&IoBuffer, argp, sizeof(struct 
bcm_ioctl_buffer)))
@@ -744,7 +744,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, 
ULONG arg)
Status = STATUS_FAILURE;
goto cntrlEnd;
}
-   Status = CopyBufferToControlPacket(Adapter, (PVOID)pvBuffer);
+   Status = CopyBufferToControlPacket(Adapter, (void *)pvBuffer);
 
 cntrlEnd:
up(&Adapter->LowPowerModeSync);
@@ -1075,7 +1075,7 @@ cntrlEnd:
break;
 
case IOCTL_BCM_GET_HOST_MIBS: {
-   PVOID temp_buff;
+   void *temp_buff;
 
if (copy_from_user(&IoBuffer, argp, sizeof(struct 
bcm_ioctl_buffer)))
return -EFAULT;
diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c
index cc91b5e..810a170f 100644
--- a/drivers/staging/bcm/CmHost.c
+++ b/drivers/staging/bcm/CmHost.c
@@ -107,7 +107,7 @@ static VOID deleteSFBySfid(struct bcm_mini_adapter 
*Adapter, UINT uiSearchRuleIn
DeleteAllClassifiersForSF(Adapter, uiSearchRuleIndex);
 
/* Resetting only MIBS related entries in the SF */
-   memset((PVOID)&Adapter->PackInfo[uiSearchRuleIn

[PATCH 7/8] staging: bcm: Replace LONG with long

2013-10-29 Thread Lisa Nguyen
Replace user-defined data type LONG with C defined data type
long.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/bcm/CmHost.c  | 22 ++---
 drivers/staging/bcm/HandleControlPacket.c |  2 +-
 drivers/staging/bcm/IPv6Protocol.c|  6 +++---
 drivers/staging/bcm/InterfaceIdleMode.h   |  4 ++--
 drivers/staging/bcm/InterfaceIsr.h|  4 ++--
 drivers/staging/bcm/InterfaceMisc.h   |  2 +-
 drivers/staging/bcm/LeakyBucket.c |  6 +++---
 drivers/staging/bcm/PHSModule.c   |  2 +-
 drivers/staging/bcm/Prototypes.h  | 32 +++
 drivers/staging/bcm/Qos.c |  8 
 drivers/staging/bcm/Typedefs.h|  3 ---
 drivers/staging/bcm/hostmibs.c|  4 ++--
 drivers/staging/bcm/led_control.c |  6 +++---
 drivers/staging/bcm/nvm.c | 16 
 drivers/staging/bcm/sort.c|  4 ++--
 15 files changed, 59 insertions(+), 62 deletions(-)

diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c
index d2bb898..97b0f52 100644
--- a/drivers/staging/bcm/CmHost.c
+++ b/drivers/staging/bcm/CmHost.c
@@ -98,7 +98,7 @@ static int SearchFreeClsid(struct bcm_mini_adapter *Adapter 
/**Adapter Context*/
return MAX_CLASSIFIERS+1;
 }
 
-static VOID deleteSFBySfid(struct bcm_mini_adapter *Adapter, UINT 
uiSearchRuleIndex)
+static void deleteSFBySfid(struct bcm_mini_adapter *Adapter, UINT 
uiSearchRuleIndex)
 {
/* deleting all the packet held in the SF */
flush_queue(Adapter, uiSearchRuleIndex);
@@ -110,7 +110,7 @@ static VOID deleteSFBySfid(struct bcm_mini_adapter 
*Adapter, UINT uiSearchRuleIn
memset((void *)&Adapter->PackInfo[uiSearchRuleIndex], 0, sizeof(struct 
bcm_mibs_table));
 }
 
-static inline VOID
+static inline void
 CopyIpAddrToClassifier(struct bcm_classifier_rule *pstClassifierEntry,
B_UINT8 u8IpAddressLen, B_UINT8 *pu8IpAddressMaskSrc,
bool bIpVersion6, enum bcm_ipaddr_context eIpAddrContext)
@@ -235,10 +235,10 @@ void ClearTargetDSXBuffer(struct bcm_mini_adapter 
*Adapter, B_UINT16 TID, bool b
  * @ingroup ctrl_pkt_functions
  * copy classifier rule into the specified SF index
  */
-static inline VOID CopyClassifierRuleToSF(struct bcm_mini_adapter *Adapter, 
struct bcm_convergence_types *psfCSType, UINT uiSearchRuleIndex, UINT 
nClassifierIndex)
+static inline void CopyClassifierRuleToSF(struct bcm_mini_adapter *Adapter, 
struct bcm_convergence_types *psfCSType, UINT uiSearchRuleIndex, UINT 
nClassifierIndex)
 {
struct bcm_classifier_rule *pstClassifierEntry = NULL;
-   /* VOID *pvPhsContext = NULL; */
+   /* void *pvPhsContext = NULL; */
int i;
/* UCHAR ucProtocolLength=0; */
/* ULONG ulPhsStatus; */
@@ -364,12 +364,12 @@ static inline VOID CopyClassifierRuleToSF(struct 
bcm_mini_adapter *Adapter, stru
 /*
  * @ingroup ctrl_pkt_functions
  */
-static inline VOID DeleteClassifierRuleFromSF(struct bcm_mini_adapter 
*Adapter, UINT uiSearchRuleIndex, UINT nClassifierIndex)
+static inline void DeleteClassifierRuleFromSF(struct bcm_mini_adapter 
*Adapter, UINT uiSearchRuleIndex, UINT nClassifierIndex)
 {
struct bcm_classifier_rule *pstClassifierEntry = NULL;
B_UINT16 u16PacketClassificationRuleIndex;
USHORT usVCID;
-   /* VOID *pvPhsContext = NULL; */
+   /* void *pvPhsContext = NULL; */
/*ULONG ulPhsStatus; */
 
usVCID = Adapter->PackInfo[uiSearchRuleIndex].usVCID_Value;
@@ -395,13 +395,13 @@ static inline VOID DeleteClassifierRuleFromSF(struct 
bcm_mini_adapter *Adapter,
 /*
  * @ingroup ctrl_pkt_functions
  */
-VOID DeleteAllClassifiersForSF(struct bcm_mini_adapter *Adapter, UINT 
uiSearchRuleIndex)
+void DeleteAllClassifiersForSF(struct bcm_mini_adapter *Adapter, UINT 
uiSearchRuleIndex)
 {
struct bcm_classifier_rule *pstClassifierEntry = NULL;
int i;
/* B_UINT16  u16PacketClassificationRuleIndex; */
USHORT ulVCID;
-   /* VOID *pvPhsContext = NULL; */
+   /* void *pvPhsContext = NULL; */
/* ULONG ulPhsStatus; */
 
ulVCID = Adapter->PackInfo[uiSearchRuleIndex].usVCID_Value;
@@ -427,7 +427,7 @@ VOID DeleteAllClassifiersForSF(struct bcm_mini_adapter 
*Adapter, UINT uiSearchRu
  * related data into the Adapter structure.
  * @ingroup ctrl_pkt_functions
  */
-static VOID CopyToAdapter(register struct bcm_mini_adapter *Adapter, /* 
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 5/8] staging: bcm: Remove user defined data type PSHORT

2013-10-29 Thread Lisa Nguyen
Remove user-defined data type PSHORT since it is not
used anywhere in the bcm driver.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/bcm/Typedefs.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/bcm/Typedefs.h b/drivers/staging/bcm/Typedefs.h
index 290b05f..afbb7aa 100644
--- a/drivers/staging/bcm/Typedefs.h
+++ b/drivers/staging/bcm/Typedefs.h
@@ -23,7 +23,6 @@ typedef unsigned long ULONG;
 typedef unsigned long DWORD;
 
 typedef char* PCHAR;
-typedef short* PSHORT;
 typedef int* PINT;
 typedef long* PLONG;
 
-- 
1.8.1.2

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


Re: [PATCH 0/8] staging: bcm: Clean up user defined data types

2013-10-29 Thread Lisa Nguyen
Greg,

Sorry for top posting, but I just inserted the wrong commit message
and subject for one of my patches in this series.

Please drop this set. Will revise and submit v2 of this series.

Thanks,
Lisa

On Tue, Oct 29, 2013 at 9:40 PM, Lisa Nguyen  wrote:
> This patch series reflects the first round of data type
> cleanups. There was no need to redefine existing data types,
> and some user defined data types were removed if they were not
> used anywhere in the bcm driver.
>
> Lisa Nguyen (8):
>   staging: bcm: Replace PVOID with void *
>   staging: bcm: Replace CHAR with char
>   staging: bcm: Remove user defined type SHORT
>   staging: bcm: Replace INT with int
>   staging: bcm: Remove user defined data type PSHORT
>   staging: bcm: Replace TRUE with true
>   staging: bcm: Replace LONG with long
>   staging: bcm: Remove user defined data type DWORD
>
>  drivers/staging/bcm/Adapter.h |  24 ++---
>  drivers/staging/bcm/Bcmchar.c | 148 
> +++---
>  drivers/staging/bcm/Bcmnet.c  |   4 +-
>  drivers/staging/bcm/CmHost.c  |  98 ++--
>  drivers/staging/bcm/DDRInit.c |  10 +-
>  drivers/staging/bcm/HandleControlPacket.c |  34 +++
>  drivers/staging/bcm/IPv6Protocol.c|  38 
>  drivers/staging/bcm/InterfaceDld.c|  18 ++--
>  drivers/staging/bcm/InterfaceIdleMode.c   |   8 +-
>  drivers/staging/bcm/InterfaceIdleMode.h   |  10 +-
>  drivers/staging/bcm/InterfaceInit.c   |  56 +--
>  drivers/staging/bcm/InterfaceIsr.c|  16 ++--
>  drivers/staging/bcm/InterfaceIsr.h|   6 +-
>  drivers/staging/bcm/InterfaceMisc.c   |  20 ++--
>  drivers/staging/bcm/InterfaceMisc.h   |  34 ---
>  drivers/staging/bcm/InterfaceRx.c |  14 +--
>  drivers/staging/bcm/InterfaceTx.c |  24 ++---
>  drivers/staging/bcm/InterfaceTx.h |   2 +-
>  drivers/staging/bcm/LeakyBucket.c |  30 +++---
>  drivers/staging/bcm/Misc.c|  68 +++---
>  drivers/staging/bcm/PHSModule.c   |  20 ++--
>  drivers/staging/bcm/Prototypes.h  |  94 +--
>  drivers/staging/bcm/Qos.c |  88 +-
>  drivers/staging/bcm/Transmit.c|   4 +-
>  drivers/staging/bcm/Typedefs.h|  13 ---
>  drivers/staging/bcm/hostmibs.c|  16 ++--
>  drivers/staging/bcm/led_control.c |  44 -
>  drivers/staging/bcm/nvm.c | 138 ++--
>  drivers/staging/bcm/sort.c|   4 +-
>  drivers/staging/bcm/vendorspecificextn.c  |  14 +--
>  drivers/staging/bcm/vendorspecificextn.h  |  14 +--
>  31 files changed, 548 insertions(+), 563 deletions(-)
>
> --
> 1.8.1.2
>
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 0/8] staging: bcm: Clean up user defined data types

2013-10-29 Thread Lisa Nguyen
This patch series reflects the first round of data type cleanups.
There was no need to redefine existing data types, and some 
user defined data types were removed if they were not used anywhere 
in the bcm driver.

Changes since v2:
- Fix subject line and commit message

Lisa Nguyen (8):
  staging: bcm: Replace PVOID with void *
  staging: bcm: Replace CHAR with char
  staging: bcm: Remove user defined type SHORT
  staging: bcm: Replace INT with int
  staging: bcm: Remove user defined data type PSHORT
  staging: bcm: Replace TRUE with true
  staging: bcm: Replace VOID with void
  staging: bcm: Remove user defined data type DWORD

 drivers/staging/bcm/Adapter.h |  24 ++---
 drivers/staging/bcm/Bcmchar.c | 148 +++---
 drivers/staging/bcm/Bcmnet.c  |   4 +-
 drivers/staging/bcm/CmHost.c  |  98 ++--
 drivers/staging/bcm/DDRInit.c |  10 +-
 drivers/staging/bcm/HandleControlPacket.c |  34 +++
 drivers/staging/bcm/IPv6Protocol.c|  38 
 drivers/staging/bcm/InterfaceDld.c|  18 ++--
 drivers/staging/bcm/InterfaceIdleMode.c   |   8 +-
 drivers/staging/bcm/InterfaceIdleMode.h   |  10 +-
 drivers/staging/bcm/InterfaceInit.c   |  56 +--
 drivers/staging/bcm/InterfaceIsr.c|  16 ++--
 drivers/staging/bcm/InterfaceIsr.h|   6 +-
 drivers/staging/bcm/InterfaceMisc.c   |  20 ++--
 drivers/staging/bcm/InterfaceMisc.h   |  34 ---
 drivers/staging/bcm/InterfaceRx.c |  14 +--
 drivers/staging/bcm/InterfaceTx.c |  24 ++---
 drivers/staging/bcm/InterfaceTx.h |   2 +-
 drivers/staging/bcm/LeakyBucket.c |  30 +++---
 drivers/staging/bcm/Misc.c|  68 +++---
 drivers/staging/bcm/PHSModule.c   |  20 ++--
 drivers/staging/bcm/Prototypes.h  |  94 +--
 drivers/staging/bcm/Qos.c |  88 +-
 drivers/staging/bcm/Transmit.c|   4 +-
 drivers/staging/bcm/Typedefs.h|  13 ---
 drivers/staging/bcm/hostmibs.c|  16 ++--
 drivers/staging/bcm/led_control.c |  44 -
 drivers/staging/bcm/nvm.c | 138 ++--
 drivers/staging/bcm/sort.c|   4 +-
 drivers/staging/bcm/vendorspecificextn.c  |  14 +--
 drivers/staging/bcm/vendorspecificextn.h  |  14 +--
 31 files changed, 548 insertions(+), 563 deletions(-)

-- 
1.8.1.2

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


[PATCH v2 1/8] staging: bcm: Replace PVOID with void *

2013-10-29 Thread Lisa Nguyen
Remove user-defined data type PVOID and replace it with
void *.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/bcm/Adapter.h | 22 +++---
 drivers/staging/bcm/Bcmchar.c |  6 +++---
 drivers/staging/bcm/CmHost.c  | 16 
 drivers/staging/bcm/HandleControlPacket.c |  2 +-
 drivers/staging/bcm/IPv6Protocol.c|  4 ++--
 drivers/staging/bcm/InterfaceDld.c|  4 ++--
 drivers/staging/bcm/InterfaceMisc.h   | 16 
 drivers/staging/bcm/InterfaceTx.c |  4 ++--
 drivers/staging/bcm/InterfaceTx.h |  2 +-
 drivers/staging/bcm/Prototypes.h  |  4 ++--
 drivers/staging/bcm/Qos.c |  6 +++---
 drivers/staging/bcm/Typedefs.h|  1 -
 drivers/staging/bcm/hostmibs.c|  8 
 drivers/staging/bcm/nvm.c |  8 
 drivers/staging/bcm/vendorspecificextn.c  |  8 
 drivers/staging/bcm/vendorspecificextn.h  |  8 
 16 files changed, 59 insertions(+), 60 deletions(-)

diff --git a/drivers/staging/bcm/Adapter.h b/drivers/staging/bcm/Adapter.h
index 9cd5987..56fed62 100644
--- a/drivers/staging/bcm/Adapter.h
+++ b/drivers/staging/bcm/Adapter.h
@@ -20,7 +20,7 @@ struct bcm_packettosend {
 } __packed;
 
 struct bcm_control_packet {
-   PVOID   ControlBuff;
+   void *ControlBuff;
UINTControlBuffLen;
struct bcm_control_packet *next;
 } __packed;
@@ -208,9 +208,9 @@ struct bcm_targetdsx_buffer {
boolvalid;
 };
 
-typedef int (*FP_FLASH_WRITE)(struct bcm_mini_adapter *, UINT, PVOID);
+typedef int (*FP_FLASH_WRITE)(struct bcm_mini_adapter *, UINT, void *);
 
-typedef int (*FP_FLASH_WRITE_STATUS)(struct bcm_mini_adapter *, UINT, PVOID);
+typedef int (*FP_FLASH_WRITE_STATUS)(struct bcm_mini_adapter *, UINT, void *);
 
 /*
  * Driver adapter data structure
@@ -308,22 +308,22 @@ struct bcm_mini_adapter {
/* Driver State for LED Blinking */
enum bcm_led_events DriverState;
/* Interface Specific */
-   PVOID   pvInterfaceAdapter;
-   int (*bcm_file_download)(PVOID,
+   void*pvInterfaceAdapter;
+   int (*bcm_file_download)(void *,
struct file *,
unsigned int);
-   int (*bcm_file_readback_from_chip)(PVOID,
+   int (*bcm_file_readback_from_chip)(void *,
struct file *,
unsigned int);
-   int (*interface_rdm)(PVOID,
+   int (*interface_rdm)(void *,
UINT,
-   PVOID,
+   void *,
int);
-   int (*interface_wrm)(PVOID,
+   int (*interface_wrm)(void *,
UINT,
-   PVOID,
+   void *,
int);
-   int (*interface_transmit)(PVOID, PVOID , UINT);
+   int (*interface_transmit)(void *, void * , UINT);
boolIdleMode;
boolbDregRequestSentInIdleMode;
boolbTriedToWakeUpFromlowPowerMode;
diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c
index 8c81143..f29c545 100644
--- a/drivers/staging/bcm/Bcmchar.c
+++ b/drivers/staging/bcm/Bcmchar.c
@@ -714,7 +714,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, 
ULONG arg)
case IOCTL_SS_INFO_REQ:
case IOCTL_SEND_CONTROL_MESSAGE:
case IOCTL_IDLE_REQ: {
-   PVOID pvBuffer = NULL;
+   void *pvBuffer = NULL;
 
/* Copy Ioctl Buffer structure */
if (copy_from_user(&IoBuffer, argp, sizeof(struct 
bcm_ioctl_buffer)))
@@ -744,7 +744,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, 
ULONG arg)
Status = STATUS_FAILURE;
goto cntrlEnd;
}
-   Status = CopyBufferToControlPacket(Adapter, (PVOID)pvBuffer);
+   Status = CopyBufferToControlPacket(Adapter, (void *)pvBuffer);
 
 cntrlEnd:
up(&Adapter->LowPowerModeSync);
@@ -1075,7 +1075,7 @@ cntrlEnd:
break;
 
case IOCTL_BCM_GET_HOST_MIBS: {
-   PVOID temp_buff;
+   void *temp_buff;
 
if (copy_from_user(&IoBuffer, argp, sizeof(struct 
bcm_ioctl_buffer)))
return -EFAULT;
diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c
index cc91b5e..810a170f 100644
--- a/drivers/staging/bcm/CmHost.c
+++ b/drivers/staging/bcm/CmHost.c
@@ -107,7 +107,7 @@ static VOID deleteSFBySfid(struct bcm_mini_adapter 
*Adapter, UINT uiSearchRuleIn
DeleteAllClassifiersForSF(Adapter, uiSearchRuleIndex);
 
/* Resetting only MIBS related entries in the SF */
-   memset((PVOID)&Adapter->PackInfo[uiSearchRuleIn

[PATCH v2 5/8] staging: bcm: Remove user defined data type PSHORT

2013-10-29 Thread Lisa Nguyen
Remove user-defined data type PSHORT since it is not
used anywhere in the bcm driver.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/bcm/Typedefs.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/bcm/Typedefs.h b/drivers/staging/bcm/Typedefs.h
index 290b05f..afbb7aa 100644
--- a/drivers/staging/bcm/Typedefs.h
+++ b/drivers/staging/bcm/Typedefs.h
@@ -23,7 +23,6 @@ typedef unsigned long ULONG;
 typedef unsigned long DWORD;
 
 typedef char* PCHAR;
-typedef short* PSHORT;
 typedef int* PINT;
 typedef long* PLONG;
 
-- 
1.8.1.2

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


[PATCH v2 4/8] staging: bcm: Replace INT with int

2013-10-29 Thread Lisa Nguyen
Replace user-defined data type INT with C defined int data type.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/bcm/Bcmchar.c | 14 +++
 drivers/staging/bcm/Bcmnet.c  |  4 +-
 drivers/staging/bcm/HandleControlPacket.c |  2 +-
 drivers/staging/bcm/IPv6Protocol.c|  2 +-
 drivers/staging/bcm/InterfaceDld.c| 12 +++---
 drivers/staging/bcm/InterfaceIdleMode.c   |  2 +-
 drivers/staging/bcm/InterfaceIdleMode.h   |  6 +--
 drivers/staging/bcm/InterfaceIsr.c|  4 +-
 drivers/staging/bcm/InterfaceIsr.h|  2 +-
 drivers/staging/bcm/InterfaceMisc.h   | 16 
 drivers/staging/bcm/InterfaceTx.h |  2 +-
 drivers/staging/bcm/LeakyBucket.c |  8 ++--
 drivers/staging/bcm/Prototypes.h  | 62 +++
 drivers/staging/bcm/Qos.c | 12 +++---
 drivers/staging/bcm/Typedefs.h|  1 -
 drivers/staging/bcm/hostmibs.c|  2 +-
 drivers/staging/bcm/led_control.c | 24 ++--
 drivers/staging/bcm/vendorspecificextn.c  | 14 +++
 drivers/staging/bcm/vendorspecificextn.h  | 14 +++
 19 files changed, 100 insertions(+), 103 deletions(-)

diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c
index f29c545..4d7b5da 100644
--- a/drivers/staging/bcm/Bcmchar.c
+++ b/drivers/staging/bcm/Bcmchar.c
@@ -155,7 +155,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, 
ULONG arg)
struct bcm_tarang_data *pTarang = filp->private_data;
void __user *argp = (void __user *)arg;
struct bcm_mini_adapter *Adapter = pTarang->Adapter;
-   INT Status = STATUS_FAILURE;
+   int Status = STATUS_FAILURE;
int timeout = 0;
struct bcm_ioctl_buffer IoBuffer;
int bytes;
@@ -935,7 +935,7 @@ cntrlEnd:
break;
 
case IOCTL_CHIP_RESET: {
-   INT NVMAccess = down_trylock(&Adapter->NVMRdmWrmLock);
+   int NVMAccess = down_trylock(&Adapter->NVMRdmWrmLock);
if (NVMAccess) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, " 
IOCTL_BCM_CHIP_RESET not allowed as EEPROM Read/Write is in progress\n");
return -EACCES;
@@ -1656,7 +1656,7 @@ cntrlEnd:
return -EFAULT;
}
 
-   Status = copy_from_user(&eFlash2xSectionVal, 
IoBuffer.InputBuffer, sizeof(INT));
+   Status = copy_from_user(&eFlash2xSectionVal, 
IoBuffer.InputBuffer, sizeof(int));
if (Status) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Copy 
of flash section val failed");
return -EFAULT;
@@ -1811,7 +1811,7 @@ cntrlEnd:
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Copy 
of IOCTL BUFFER failed");
return -EFAULT;
}
-   Status = copy_from_user(&eFlash2xSectionVal, 
IoBuffer.InputBuffer, sizeof(INT));
+   Status = copy_from_user(&eFlash2xSectionVal, 
IoBuffer.InputBuffer, sizeof(int));
if (Status) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Copy 
of flash section val failed");
return -EFAULT;
@@ -1841,9 +1841,9 @@ cntrlEnd:
 
case IOCTL_BCM_NVM_RAW_READ: {
struct bcm_nvm_readwrite stNVMRead;
-   INT NOB ;
-   INT BuffSize ;
-   INT ReadOffset = 0;
+   int NOB ;
+   int BuffSize ;
+   int ReadOffset = 0;
UINT ReadBytes = 0 ;
PUCHAR pReadBuff;
void __user *OutPutBuff;
diff --git a/drivers/staging/bcm/Bcmnet.c b/drivers/staging/bcm/Bcmnet.c
index 53fee2f..bc7417e 100644
--- a/drivers/staging/bcm/Bcmnet.c
+++ b/drivers/staging/bcm/Bcmnet.c
@@ -2,7 +2,7 @@
 
 struct net_device *gblpnetdev;
 
-static INT bcm_open(struct net_device *dev)
+static int bcm_open(struct net_device *dev)
 {
struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(dev);
 
@@ -26,7 +26,7 @@ static INT bcm_open(struct net_device *dev)
return 0;
 }
 
-static INT bcm_close(struct net_device *dev)
+static int bcm_close(struct net_device *dev)
 {
struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(dev);
 
diff --git a/drivers/staging/bcm/HandleControlPacket.c 
b/drivers/staging/bcm/HandleControlPacket.c
index 1973d27..9b74768 100644
--- a/drivers/staging/bcm/HandleControlPacket.c
+++ b/drivers/staging/bcm/HandleControlPacket.c
@@ -211,7 +211,7 @@ int control_packet_handler(struct bcm_mini_adapter *Adapter 
/* pointer to adapte
return STATUS_SUCCESS;
 }
 
-INT flushAllAppQ(void)
+int flushAllAppQ(void)
 {
struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
struct bcm_tarang_data *pTarang = NULL;
diff --git a/drivers/staging/bcm/IPv6Protocol

[PATCH v2 7/8] staging: bcm: Replace VOID with void

2013-10-29 Thread Lisa Nguyen
Replace user-defined data type VOID with C defined data type
void.

Signed-off-by: Lisa Nguyen 
---
Changes since v2:
- Corrected subject line and commit message

 drivers/staging/bcm/CmHost.c  | 22 ++---
 drivers/staging/bcm/HandleControlPacket.c |  2 +-
 drivers/staging/bcm/IPv6Protocol.c|  6 +++---
 drivers/staging/bcm/InterfaceIdleMode.h   |  4 ++--
 drivers/staging/bcm/InterfaceIsr.h|  4 ++--
 drivers/staging/bcm/InterfaceMisc.h   |  2 +-
 drivers/staging/bcm/LeakyBucket.c |  6 +++---
 drivers/staging/bcm/PHSModule.c   |  2 +-
 drivers/staging/bcm/Prototypes.h  | 32 +++
 drivers/staging/bcm/Qos.c |  8 
 drivers/staging/bcm/Typedefs.h|  3 ---
 drivers/staging/bcm/hostmibs.c|  4 ++--
 drivers/staging/bcm/led_control.c |  6 +++---
 drivers/staging/bcm/nvm.c | 16 
 drivers/staging/bcm/sort.c|  4 ++--
 15 files changed, 59 insertions(+), 62 deletions(-)

diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c
index d2bb898..97b0f52 100644
--- a/drivers/staging/bcm/CmHost.c
+++ b/drivers/staging/bcm/CmHost.c
@@ -98,7 +98,7 @@ static int SearchFreeClsid(struct bcm_mini_adapter *Adapter 
/**Adapter Context*/
return MAX_CLASSIFIERS+1;
 }
 
-static VOID deleteSFBySfid(struct bcm_mini_adapter *Adapter, UINT 
uiSearchRuleIndex)
+static void deleteSFBySfid(struct bcm_mini_adapter *Adapter, UINT 
uiSearchRuleIndex)
 {
/* deleting all the packet held in the SF */
flush_queue(Adapter, uiSearchRuleIndex);
@@ -110,7 +110,7 @@ static VOID deleteSFBySfid(struct bcm_mini_adapter 
*Adapter, UINT uiSearchRuleIn
memset((void *)&Adapter->PackInfo[uiSearchRuleIndex], 0, sizeof(struct 
bcm_mibs_table));
 }
 
-static inline VOID
+static inline void
 CopyIpAddrToClassifier(struct bcm_classifier_rule *pstClassifierEntry,
B_UINT8 u8IpAddressLen, B_UINT8 *pu8IpAddressMaskSrc,
bool bIpVersion6, enum bcm_ipaddr_context eIpAddrContext)
@@ -235,10 +235,10 @@ void ClearTargetDSXBuffer(struct bcm_mini_adapter 
*Adapter, B_UINT16 TID, bool b
  * @ingroup ctrl_pkt_functions
  * copy classifier rule into the specified SF index
  */
-static inline VOID CopyClassifierRuleToSF(struct bcm_mini_adapter *Adapter, 
struct bcm_convergence_types *psfCSType, UINT uiSearchRuleIndex, UINT 
nClassifierIndex)
+static inline void CopyClassifierRuleToSF(struct bcm_mini_adapter *Adapter, 
struct bcm_convergence_types *psfCSType, UINT uiSearchRuleIndex, UINT 
nClassifierIndex)
 {
struct bcm_classifier_rule *pstClassifierEntry = NULL;
-   /* VOID *pvPhsContext = NULL; */
+   /* void *pvPhsContext = NULL; */
int i;
/* UCHAR ucProtocolLength=0; */
/* ULONG ulPhsStatus; */
@@ -364,12 +364,12 @@ static inline VOID CopyClassifierRuleToSF(struct 
bcm_mini_adapter *Adapter, stru
 /*
  * @ingroup ctrl_pkt_functions
  */
-static inline VOID DeleteClassifierRuleFromSF(struct bcm_mini_adapter 
*Adapter, UINT uiSearchRuleIndex, UINT nClassifierIndex)
+static inline void DeleteClassifierRuleFromSF(struct bcm_mini_adapter 
*Adapter, UINT uiSearchRuleIndex, UINT nClassifierIndex)
 {
struct bcm_classifier_rule *pstClassifierEntry = NULL;
B_UINT16 u16PacketClassificationRuleIndex;
USHORT usVCID;
-   /* VOID *pvPhsContext = NULL; */
+   /* void *pvPhsContext = NULL; */
/*ULONG ulPhsStatus; */
 
usVCID = Adapter->PackInfo[uiSearchRuleIndex].usVCID_Value;
@@ -395,13 +395,13 @@ static inline VOID DeleteClassifierRuleFromSF(struct 
bcm_mini_adapter *Adapter,
 /*
  * @ingroup ctrl_pkt_functions
  */
-VOID DeleteAllClassifiersForSF(struct bcm_mini_adapter *Adapter, UINT 
uiSearchRuleIndex)
+void DeleteAllClassifiersForSF(struct bcm_mini_adapter *Adapter, UINT 
uiSearchRuleIndex)
 {
struct bcm_classifier_rule *pstClassifierEntry = NULL;
int i;
/* B_UINT16  u16PacketClassificationRuleIndex; */
USHORT ulVCID;
-   /* VOID *pvPhsContext = NULL; */
+   /* void *pvPhsContext = NULL; */
/* ULONG ulPhsStatus; */
 
ulVCID = Adapter->PackInfo[uiSearchRuleIndex].usVCID_Value;
@@ -427,7 +427,7 @@ VOID DeleteAllClassifiersForSF(struct bcm_mini_adapter 
*Adapter, UINT uiSearchRu
  * related data into the Adapter structure.
  * @ingroup ctrl_pkt_functions
  */
-static VOID CopyToAdapter(register struct bcm_mini_adapter *Adapter, /* 
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0/8] staging: bcm: Clean up user defined data types

2013-10-29 Thread Lisa Nguyen
This patch series reflects the first round of data type 
cleanups. There was no need to redefine existing data types, 
and some user defined data types were removed if they were not 
used anywhere in the bcm driver.

Lisa Nguyen (8):
  staging: bcm: Replace PVOID with void *
  staging: bcm: Replace CHAR with char
  staging: bcm: Remove user defined type SHORT
  staging: bcm: Replace INT with int
  staging: bcm: Remove user defined data type PSHORT
  staging: bcm: Replace TRUE with true
  staging: bcm: Replace LONG with long
  staging: bcm: Remove user defined data type DWORD

 drivers/staging/bcm/Adapter.h |  24 ++---
 drivers/staging/bcm/Bcmchar.c | 148 +++---
 drivers/staging/bcm/Bcmnet.c  |   4 +-
 drivers/staging/bcm/CmHost.c  |  98 ++--
 drivers/staging/bcm/DDRInit.c |  10 +-
 drivers/staging/bcm/HandleControlPacket.c |  34 +++
 drivers/staging/bcm/IPv6Protocol.c|  38 
 drivers/staging/bcm/InterfaceDld.c|  18 ++--
 drivers/staging/bcm/InterfaceIdleMode.c   |   8 +-
 drivers/staging/bcm/InterfaceIdleMode.h   |  10 +-
 drivers/staging/bcm/InterfaceInit.c   |  56 +--
 drivers/staging/bcm/InterfaceIsr.c|  16 ++--
 drivers/staging/bcm/InterfaceIsr.h|   6 +-
 drivers/staging/bcm/InterfaceMisc.c   |  20 ++--
 drivers/staging/bcm/InterfaceMisc.h   |  34 ---
 drivers/staging/bcm/InterfaceRx.c |  14 +--
 drivers/staging/bcm/InterfaceTx.c |  24 ++---
 drivers/staging/bcm/InterfaceTx.h |   2 +-
 drivers/staging/bcm/LeakyBucket.c |  30 +++---
 drivers/staging/bcm/Misc.c|  68 +++---
 drivers/staging/bcm/PHSModule.c   |  20 ++--
 drivers/staging/bcm/Prototypes.h  |  94 +--
 drivers/staging/bcm/Qos.c |  88 +-
 drivers/staging/bcm/Transmit.c|   4 +-
 drivers/staging/bcm/Typedefs.h|  13 ---
 drivers/staging/bcm/hostmibs.c|  16 ++--
 drivers/staging/bcm/led_control.c |  44 -
 drivers/staging/bcm/nvm.c | 138 ++--
 drivers/staging/bcm/sort.c|   4 +-
 drivers/staging/bcm/vendorspecificextn.c  |  14 +--
 drivers/staging/bcm/vendorspecificextn.h  |  14 +--
 31 files changed, 548 insertions(+), 563 deletions(-)

-- 
1.8.1.2

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


[PATCH v2 8/8] staging: bcm: Remove user defined data type DWORD

2013-10-29 Thread Lisa Nguyen
Remove user-defined data type DWORD in Typedef.h since it
is not used anywhere in the bcm driver.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/bcm/Typedefs.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/bcm/Typedefs.h b/drivers/staging/bcm/Typedefs.h
index c2085cf..6a7fea0 100644
--- a/drivers/staging/bcm/Typedefs.h
+++ b/drivers/staging/bcm/Typedefs.h
@@ -13,7 +13,6 @@ typedef unsigned short B_UINT16;
 typedef unsigned int UINT;
 typedef unsigned int B_UINT32;
 typedef unsigned long ULONG;
-typedef unsigned long DWORD;
 
 typedef char* PCHAR;
 typedef int* PINT;
-- 
1.8.1.2

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


[PATCH 3/8] staging: bcm: Remove user defined type SHORT

2013-10-29 Thread Lisa Nguyen
Remove user-defined data type SHORT since it is not
used anywhere in the bcm driver.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/bcm/Typedefs.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/bcm/Typedefs.h b/drivers/staging/bcm/Typedefs.h
index cc22d48..389850d 100644
--- a/drivers/staging/bcm/Typedefs.h
+++ b/drivers/staging/bcm/Typedefs.h
@@ -11,7 +11,6 @@
 
 
 typedef int INT;
-typedef short SHORT;
 typedef long LONG;
 typedef void VOID;
 
-- 
1.8.1.2

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


[PATCH v2 3/8] staging: bcm: Remove user defined type SHORT

2013-10-29 Thread Lisa Nguyen
Remove user-defined data type SHORT since it is not
used anywhere in the bcm driver.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/bcm/Typedefs.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/bcm/Typedefs.h b/drivers/staging/bcm/Typedefs.h
index cc22d48..389850d 100644
--- a/drivers/staging/bcm/Typedefs.h
+++ b/drivers/staging/bcm/Typedefs.h
@@ -11,7 +11,6 @@
 
 
 typedef int INT;
-typedef short SHORT;
 typedef long LONG;
 typedef void VOID;
 
-- 
1.8.1.2

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


[PATCH v2 2/8] staging: bcm: Replace CHAR with char

2013-10-29 Thread Lisa Nguyen
Replace user-defined data type CHAR with C defined char data
type.

Signed-off-by: Lisa Nguyen 
---
 drivers/staging/bcm/Adapter.h | 2 +-
 drivers/staging/bcm/HandleControlPacket.c | 2 +-
 drivers/staging/bcm/Typedefs.h| 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/bcm/Adapter.h b/drivers/staging/bcm/Adapter.h
index 56fed62..a4b1fb1 100644
--- a/drivers/staging/bcm/Adapter.h
+++ b/drivers/staging/bcm/Adapter.h
@@ -219,7 +219,7 @@ struct bcm_mini_adapter {
struct bcm_mini_adapter *next;
struct net_device   *dev;
u32 msg_enable;
-   CHAR*caDsxReqResp;
+   char*caDsxReqResp;
atomic_tApplicationRunning;
boolAppCtrlQueueOverFlow;
atomic_tCurrentApplicationCount;
diff --git a/drivers/staging/bcm/HandleControlPacket.c 
b/drivers/staging/bcm/HandleControlPacket.c
index c086169..1973d27 100644
--- a/drivers/staging/bcm/HandleControlPacket.c
+++ b/drivers/staging/bcm/HandleControlPacket.c
@@ -16,7 +16,7 @@ static VOID handle_rx_control_packet(struct bcm_mini_adapter 
*Adapter, struct sk
struct bcm_tarang_data *pTarang = NULL;
bool HighPriorityMessage = false;
struct sk_buff *newPacket = NULL;
-   CHAR cntrl_msg_mask_bit = 0;
+   char cntrl_msg_mask_bit = 0;
bool drop_pkt_flag = TRUE;
USHORT usStatus = *(PUSHORT)(skb->data);
 
diff --git a/drivers/staging/bcm/Typedefs.h b/drivers/staging/bcm/Typedefs.h
index 9d8fd1b..cc22d48 100644
--- a/drivers/staging/bcm/Typedefs.h
+++ b/drivers/staging/bcm/Typedefs.h
@@ -10,7 +10,6 @@
 #define TRUE   1
 
 
-typedef char CHAR;
 typedef int INT;
 typedef short SHORT;
 typedef long LONG;
-- 
1.8.1.2

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


Re: [PATCH v2 0/8] staging: bcm: Clean up user defined data types

2013-10-30 Thread Lisa Nguyen
On Wed, Oct 30, 2013 at 1:55 AM, Dan Carpenter  wrote:
> You and Kevin are treading on each other's patches.  CC each other for
> bcm work.
>
> regards,
> dan carpenter
>

Ah, I wasn't aware of this. Huge part of the problem would probably be
is that I'm not currently subscribed to the devel@driverdev mailing
list, so I'm not as mindful about other people's patch submissions.
Whoops. I will take care of this when I get back later this week.

Oh and hi Kevin!
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2 6/8] staging: bcm: Replace TRUE with true

2013-10-30 Thread Lisa Nguyen
On Wed, Oct 30, 2013 at 2:01 AM, Dan Carpenter  wrote:
> On Tue, Oct 29, 2013 at 10:06:34PM -0700, Lisa Nguyen wrote:
>> --- a/drivers/staging/bcm/Bcmchar.c
>> +++ b/drivers/staging/bcm/Bcmchar.c
>> @@ -287,9 +287,9 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, 
>> ULONG arg)
>>   struct bcm_rdm_buffer sRdmBuffer = {0};
>>   PCHAR temp_buff = NULL;
>>   UINT uiTempVar = 0;
>> - if ((Adapter->IdleMode == TRUE) ||
>> - (Adapter->bShutStatus == TRUE) ||
>> - (Adapter->bPreparingForLowPowerMode == TRUE)) {
>> + if ((Adapter->IdleMode == true) ||
>> + (Adapter->bShutStatus == true) ||
>> + (Adapter->bPreparingForLowPowerMode == true)) {
>
> Your patch is fine but these variable names suck.  How is "Mode" or
> "Status" true or false?  It should be something like:
>
> if (adapter->idle || adapter->shutdown ||
> addapter->preparing_for_low_power) {
>
> (I assume that's what the code is trying to say).

A big chunk of the bcm driver code is ugly to begin with.

I was focused on cleaning up pointless typedefs before attempting to
rewrite the conditionals as they are an eyesore. I haven't read too
much into the code yet.

I'd agree with your assumption.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2 6/8] staging: bcm: Replace TRUE with true

2013-10-30 Thread Lisa Nguyen
On Wed, Oct 30, 2013 at 2:56 AM, Dan Carpenter  wrote:
> On Wed, Oct 30, 2013 at 02:51:45AM -0700, Lisa Nguyen wrote:
>> On Wed, Oct 30, 2013 at 2:01 AM, Dan Carpenter  
>> wrote:
>> > On Tue, Oct 29, 2013 at 10:06:34PM -0700, Lisa Nguyen wrote:
>> >> --- a/drivers/staging/bcm/Bcmchar.c
>> >> +++ b/drivers/staging/bcm/Bcmchar.c
>> >> @@ -287,9 +287,9 @@ static long bcm_char_ioctl(struct file *filp, UINT 
>> >> cmd, ULONG arg)
>> >>   struct bcm_rdm_buffer sRdmBuffer = {0};
>> >>   PCHAR temp_buff = NULL;
>> >>   UINT uiTempVar = 0;
>> >> - if ((Adapter->IdleMode == TRUE) ||
>> >> - (Adapter->bShutStatus == TRUE) ||
>> >> - (Adapter->bPreparingForLowPowerMode == TRUE)) {
>> >> + if ((Adapter->IdleMode == true) ||
>> >> + (Adapter->bShutStatus == true) ||
>> >> + (Adapter->bPreparingForLowPowerMode == true)) {
>> >
>> > Your patch is fine but these variable names suck.  How is "Mode" or
>> > "Status" true or false?  It should be something like:
>> >
>> > if (adapter->idle || adapter->shutdown ||
>> > addapter->preparing_for_low_power) {
>> >
>> > (I assume that's what the code is trying to say).
>>
>> A big chunk of the bcm driver code is ugly to begin with.
>>
>> I was focused on cleaning up pointless typedefs before attempting to
>> rewrite the conditionals as they are an eyesore. I haven't read too
>> much into the code yet.
>>
>
> Yes.  Yes.  I understand.  These are just bonus comments I throw out for
> free.  They don't require a response.

I know I didn't have to respond back to this, but I wanted to let you
know that I like those free bonus comments :)
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


YOUR CO-OPERATION FOR THIS BUSINESS FROM Ms Lisa Hugh.

2022-01-24 Thread MS LISA HUGH
Dear Friend,

I am Ms Lisa Hugh accountant and files keeping by profession with the bank.

I need your co-operation for the  transferring of
($4,500,000,00,U.S.DOLLARS)to your bank account for both of us
benefit.

Please send the follow below,

1)AGE
2)TELEPHONE NUMBER,...
3)COUNTRY.
4)OCCUPATION..

Thanks.

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


Chargen-Nr .: ES67189098011 / 245679

2018-04-12 Thread Ana Lisa SANCHEZ
Plaza Romano N°19 Planta 5
28011 Madrid, Spain.

 DATUM: 12.04.2018
INTERNATIONALES SUPER DRAW-PROGRAMM.
Promotions / Preisverleihung dept
Chargen-Nr .: ES67189098011 / 245679
Ref: MT / 11278998789/908796 // 14

BEKANNTMACHUNG 
LETZTE NOTIZ

Wir freuen uns, Ihnen das E-Mail-Aktionsprogramm der E-Lotterie am 22
Marz. 2018, aber aufgrund der Verwechslung der Zahlen und
Adressen das Ergebnis wurden spдter am 4 April verцffentlicht. 2018. Alle 10 
Gewinner E-Mail-Adressen wurden zufдllig aus einer Charge
Von 50.000.000 internationalen E-Mails. Ihre E-Mail-Adresse ist aufgetaucht
Zusammen mit 8 anderen als Gewinner der Kategorie 3 in der diesjдhrigen E
Gewinnspiel. Sie haben sich daher fьr eine
Gesamtpauschale von 620.000,00 Ђ (SECHS HUNDERT UND ZWEI TAUSEND EURO) 

Dem Lotto-Zahlungsauftrag sind folgende Angaben beigefьgt:
Gewinnende Zahlen: 04-13-21-27-36-38 -BB 45 (ii) E-Ticket-Nummer;
FL754 / 22/76 (iii) Lotto Code Nummer: FL09622ES Zu Beginn Ihrer Lotterie
Wenden Sie sich bitte an Ihren Bevollmдchtigten, MR EMILIO SALINAS the Foreign
Dienstleister von CAIXA SEGUROS COMPANY S.A.E-MAIL: groupfacil...@aol.com Fьr 
die Verarbeitung und
Ьberweisung Ihres Preisgeldes an eine ausgewдhlte Wahl von Ihnen.
Denken Sie daran, alle Preisgeld muss spдtestens am 1. Mai beansprucht werden.

Alle Ansprьche, die nicht vor diesem Datum getдtigt wurden, werden an die
MINISTERIO DE ECONOMIA Y HACIENDA als nicht beanspruchten Fonds. Und auch 
informiert werden, dass 10% Ihres Gewinns gehцrt zu CAIXA SEGUROS COMPANY
S.A., obwohl, die zehn Prozent werden zurьckgewiesen, nachdem Sie empfangen 
haben
Ihr preisgekrцntes Preisgeld) In Ihrem benannten Konto. 

Ihr Agent wird Sie weiter auf die administrative Anforderung, um die Bank zu 
ermцglichen
Um Ihren Fonds auf die von Ihnen ausgewдhlte Option freizugeben.
Wir bitten Sie, das untenstehende Zahlungsformular auszufьllen und zu senden
Sofort an Ihre Treuhдnder Agent per E-Mail,(groupfacil...@aol.com) for 
Remittance of your Winning money to your designated Address.
GrьЯe, Ana lisa Sanchez (Frau) Promotion Manager, die E-Lottery Company.

NAME: 
 
NACHNAME: - DATUM DER GEBURT: --- 

TELEFON: --- MOBIL: --- 
--

FAX:  Betrag: -- -
 
STRASSE: 
 
NUMMER:

BUNDESLAND:
 
Postleitzahl: 
 
LAND:-
 
BERUF: -- Nationalitдt:  
 
REFERENZ NR: ---
 
BATCHNR:--
 
EMAIL:-- --
 
SPRACHE BEKANNT: ---

UNTERSCHRIFT DES BEGЬNSTIGTEN: -

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

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


US National Central Bureau of Interpol,

2015-11-15 Thread Doctor Lisa Wade
US National Central Bureau of Interpol,
CYBER CRIMES UNIT Liasian Office,
Police Chief, vol. LXXVIII, no. 6, June 2011.
Copyright held by the International Association of Chiefs of Police,
950 Pennsylvania Avenue, NW Washington, DC 20530-
0001, e-Mail: sydneybaroso...@gmail.com

Hello friend,

God be with you, I am Doctor Lisa Wade. I already benefited from this GBP 5.5 
Million Compensated Scammed Victim Compensated ATM CARD reward as well. I am 
writing you to give you a very Concrete and sound confidential information that
will help you claim your G.B.P 5, 500, 000 .00 (FIVE MILLION FIVE HUNDRED 
THOUSAND GREAT BRITISH POUND) Compensated funds from the Cyber Crimes 
Department of The INTERPOL OF LONDON'S Liaison office in NW, Washington DC, USA.

I was also able to confirm that the U.K Government G.B.P 5.5 Million 
Compensated to you and other scammed Victims due to all effort, sincerity, 
courage and trust worthiness showed at the course of various pending financial 
transactions Is real and % 100 risk free.

I crossed check the emails and names of other beneficiaries who are yet to 
claim their compensated funds worth 5.5 Million GBP on the Beneficiaries List, 
and saw your email address on the list and copied it out to inform you and (1) 
other beneficiary of your GBP5.5 Million still unclaimed with the Interpol 
Since the Government has ordered the funds to be released to you.

Sincerely, I want you to know God is my witness on my testimony to you and once 
you are able to contact the Officer in charge of Cyber Crimes Department; 
Special Agent, Sydney Baroso of INTERPOL assigned by the Government to handle 
your ATM CARD Delivery on the information below and adhere strictly to is 
instruction and advise, all things must work out properly for your own good as 
well without delays, fears or stress.

I promise you do not have to worry even if you are ask to pay for the Delivery 
fee since you must receive your 5.5 Million G.B.P worth ATM CARD in return not 
more than 24Hours. This is 100 percent certain and legit. I can bet my life on 
this word I am giving you.

Ignore those Fraudsters that have been contacting you, for your own good and 
Security. You are very lucky and I advise you to quickly Contact the INTERPOL'S 
Officer in charge, Special Agent. SYDNEY BAROSE to claim your 5,500,000.00 GBP: 
(FIVE MILLION FIVE HUNDRED THOUSAND GREAT BRITISH POUND) worth ATM CARD from 
him without further delays to enable you commences your $5,000 daily withdrawal 
as I am experiencing daily.

Contact Special Agent, Sydney Baroso with the required details listed
below.

NAME:
FULL ADDRESS:
COUNTRY NAME:
TEL PHONE/CELL NUMBER:
Contact Sydney Baroso with your details as listed above on the email address 
below.
Contact INTERPOL'S, Special Agent SYDNEY BAROSO on;
e-Mail: sydneybaroso...@gmail.com

My advice to you is for you to put God first in all you are doing and try to 
stop contact with any other online transaction you might have elsewhere if you 
have been paying much or little money presently or previously and have not 
received anything in return but disappointments.

I still want to use this opportunity to inform you of showing love to the less 
privileged ones around you once you claim your funds. I will be traveling due 
to the church programs I and my Husband is having at hand and hope to hear you 
have received your funds from Interpol’s Special Agent, Sydney Boroso when I 
return.

I give you my words on this for am very sure your worries are over in Jesus 
Name, AMEN. Good Luck and God bless you.

Best Regards,
Doctor Lisa Wade.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: Can I Trust You?

2016-02-15 Thread Ms Lisa Miller.
Hello,

I hope this letter meets you in good time. It will be surprising to you to 
receive this proposal from me since you do not know me personally. However, I 
am sincerely seeking your confidence in this volunteer offer, which I propose 
with my free mind and as a person of integrity from God. My name is Mrs. Lisa 
Miller from Iowa, United State. I am married to Mr. Jeff Miller who worked with 
the South African Gov't in South Africa for nine years before he died.

We were married for eleven years without a child. He died after a brief illness 
that lasted for four days. Before his death we were both born again Christians. 
Since his death i decided not to remarry or get a child outside my matrimonial 
home which the Bible spoke against. When my husband was alive he deposited the 
sum of $10,000,000.00 million US dollars with a bank. Presently, this money is 
still with the bank somewhere in Europe. My doctor told me that i will take the 
grace of GOD for me to live one year more due to cancer problems. Though what 
disturbs me mostly is my stroke. Having known my condition I decided to donate 
this fund to church or still a christian individual that will use this to fund 
churches, orphanages and widows and also propagating the word of God and to 
ensure that the house of God is maintained.

The Bible made us to understand that blessed are the hands that giveth. I took 
this decision because I don`t have any child that will inherit this money and 
my husband's relatives are not Christians and I don`t want my husband hard 
earned money to be misused by unbelievers. I don`t want a situation where these 
money will be used in an ungodly manner, hence the reason for taking this bold 
decision. I am not afraid of death hence i know where am going.

I know that am going to be in the blossom of the Lord. Exodus 14vs14 says that 
the Lord will fight my case and I shall hold my peace. I can only communication 
with you via email because of my health I cant always call you because of my 
health and my in-laws around me but I will always try if chance permits me. I 
don`t want them to know about these development. Although I can do all things 
through Christ that empowers me. As soon as I receive a reply from you. I'll 
explain better to you. I want you and the church to always pray for me. My 
happiness is that i lived a life of a worthy christian, whoever that wants to 
serve the Lord must serve Him in spirit and truth. Please always be prayerful 
all through your life. 

NB: I will appreciate your utmost confidentiality in this matter until the task 
is accomplished as I don't want anything that will jeopardize my last wish. 
Email me at ( lmiller20...@yahoo.com )

God Bless You.

Best regards,
Mrs Lisa Miller.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel