Re: [block:for-next 5/6] drivers/block/skd_main.c:441:3: error: implicit declaration of function 'readq'

2013-09-27 Thread Jens Axboe
On Fri, Sep 27 2013, Jens Axboe wrote:
> On 09/27/2013 05:26 AM, Akhil Bhansali wrote:
> > Hello Jens,
> > 
> > There are few improvements suggested by community for driver:
> > 1. Replacement of custom macros for debug printing. (DPRINTK / VPRINTK).
> > 2. Reformatting of "skd_request_fn" which is too long.
> > 
> > Kindly let us know if you see any other changes required before it can be 
> > moved  to mainline kernel.
> 
> Did you forget to attach the patch?

Sorry, I misread that initially. The major eye sore right now is the
PRINTK stuff. The refactor of the request_fn would be a plus. Start with
those two, and I'll take a look and see if we need to do more right now.

-- 
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [block:for-next 5/6] drivers/block/skd_main.c:441:3: error: implicit declaration of function 'readq'

2013-09-27 Thread Jens Axboe
On 09/27/2013 05:26 AM, Akhil Bhansali wrote:
> Hello Jens,
> 
> There are few improvements suggested by community for driver:
> 1. Replacement of custom macros for debug printing. (DPRINTK / VPRINTK).
> 2. Reformatting of "skd_request_fn" which is too long.
> 
> Kindly let us know if you see any other changes required before it can be 
> moved  to mainline kernel.

Did you forget to attach the patch?

-- 
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [block:for-next 5/6] drivers/block/skd_main.c:441:3: error: implicit declaration of function 'readq'

2013-09-27 Thread Akhil Bhansali
Hello Jens,

There are few improvements suggested by community for driver:
1. Replacement of custom macros for debug printing. (DPRINTK / VPRINTK).
2. Reformatting of "skd_request_fn" which is too long.

Kindly let us know if you see any other changes required before it can be moved 
 to mainline kernel.

Thank you.

Regards,
Akhil

From: Jens Axboe [ax...@kernel.dk]
Sent: Monday, September 23, 2013 7:50 PM
To: Akhil Bhansali
Cc: kbuild test robot; OS Engineering; Ramprasad Chinthekindi; 
jmo...@redhat.com; linux-kernel@vger.kernel.org; Amit Phansalkar; Andrew Morton
Subject: Re: [block:for-next 5/6] drivers/block/skd_main.c:441:3: error: 
implicit declaration of function 'readq'

On 09/23/2013 05:59 AM, Akhil Bhansali wrote:
> Hello Jens,
>
> I am sending a patch created on top of "Andrew's latest changes" to disable 
> the 32 bit compilation of kronos driver.
>
> The patch takes care of following.
> 1. checkpatch.pl was showing 3 errors for assignment in if condition, I have 
> got rid of that.
> 2. removal of readq / readl functions which are not used in the code.
> 3. warnings related to VPRINTKs for 64 bit compilation after latest fix from 
> Andrew.

Thanks, things are improving. I will apply it.

--
Jens Axboe

PROPRIETARY-CONFIDENTIAL INFORMATION INCLUDED

This electronic transmission, and any documents attached hereto, may contain 
confidential, proprietary and/or legally privileged information. The 
information is intended only for use by the recipient named above. If you 
received this electronic message in error, please notify the sender and delete 
the electronic message. Any disclosure, copying, distribution, or use of the 
contents of information received in error is strictly prohibited, and violators 
will be pursued legally.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [block:for-next 5/6] drivers/block/skd_main.c:441:3: error: implicit declaration of function 'readq'

2013-09-27 Thread Akhil Bhansali
Hello Jens,

There are few improvements suggested by community for driver:
1. Replacement of custom macros for debug printing. (DPRINTK / VPRINTK).
2. Reformatting of skd_request_fn which is too long.

Kindly let us know if you see any other changes required before it can be moved 
 to mainline kernel.

Thank you.

Regards,
Akhil

From: Jens Axboe [ax...@kernel.dk]
Sent: Monday, September 23, 2013 7:50 PM
To: Akhil Bhansali
Cc: kbuild test robot; OS Engineering; Ramprasad Chinthekindi; 
jmo...@redhat.com; linux-kernel@vger.kernel.org; Amit Phansalkar; Andrew Morton
Subject: Re: [block:for-next 5/6] drivers/block/skd_main.c:441:3: error: 
implicit declaration of function 'readq'

On 09/23/2013 05:59 AM, Akhil Bhansali wrote:
 Hello Jens,

 I am sending a patch created on top of Andrew's latest changes to disable 
 the 32 bit compilation of kronos driver.

 The patch takes care of following.
 1. checkpatch.pl was showing 3 errors for assignment in if condition, I have 
 got rid of that.
 2. removal of readq / readl functions which are not used in the code.
 3. warnings related to VPRINTKs for 64 bit compilation after latest fix from 
 Andrew.

Thanks, things are improving. I will apply it.

--
Jens Axboe

PROPRIETARY-CONFIDENTIAL INFORMATION INCLUDED

This electronic transmission, and any documents attached hereto, may contain 
confidential, proprietary and/or legally privileged information. The 
information is intended only for use by the recipient named above. If you 
received this electronic message in error, please notify the sender and delete 
the electronic message. Any disclosure, copying, distribution, or use of the 
contents of information received in error is strictly prohibited, and violators 
will be pursued legally.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [block:for-next 5/6] drivers/block/skd_main.c:441:3: error: implicit declaration of function 'readq'

2013-09-27 Thread Jens Axboe
On 09/27/2013 05:26 AM, Akhil Bhansali wrote:
 Hello Jens,
 
 There are few improvements suggested by community for driver:
 1. Replacement of custom macros for debug printing. (DPRINTK / VPRINTK).
 2. Reformatting of skd_request_fn which is too long.
 
 Kindly let us know if you see any other changes required before it can be 
 moved  to mainline kernel.

Did you forget to attach the patch?

-- 
Jens Axboe

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [block:for-next 5/6] drivers/block/skd_main.c:441:3: error: implicit declaration of function 'readq'

2013-09-27 Thread Jens Axboe
On Fri, Sep 27 2013, Jens Axboe wrote:
 On 09/27/2013 05:26 AM, Akhil Bhansali wrote:
  Hello Jens,
  
  There are few improvements suggested by community for driver:
  1. Replacement of custom macros for debug printing. (DPRINTK / VPRINTK).
  2. Reformatting of skd_request_fn which is too long.
  
  Kindly let us know if you see any other changes required before it can be 
  moved  to mainline kernel.
 
 Did you forget to attach the patch?

Sorry, I misread that initially. The major eye sore right now is the
PRINTK stuff. The refactor of the request_fn would be a plus. Start with
those two, and I'll take a look and see if we need to do more right now.

-- 
Jens Axboe

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [block:for-next 5/6] drivers/block/skd_main.c:441:3: error: implicit declaration of function 'readq'

2013-09-23 Thread Jens Axboe
On 09/23/2013 05:59 AM, Akhil Bhansali wrote:
> Hello Jens,
> 
> I am sending a patch created on top of "Andrew's latest changes" to disable 
> the 32 bit compilation of kronos driver.
> 
> The patch takes care of following.
> 1. checkpatch.pl was showing 3 errors for assignment in if condition, I have 
> got rid of that.
> 2. removal of readq / readl functions which are not used in the code.
> 3. warnings related to VPRINTKs for 64 bit compilation after latest fix from 
> Andrew.

Thanks, things are improving. I will apply it.

-- 
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [block:for-next 5/6] drivers/block/skd_main.c:441:3: error: implicit declaration of function 'readq'

2013-09-23 Thread Akhil Bhansali
-4611,7 +4620,7 @@ static int skd_cons_skreq(struct skd_device *skdev)
int rc = 0;
u32 i;
 
-   VPRINTK(skdev, "skreq_table kzalloc, struct %u, count %u total %u\n",
+   VPRINTK(skdev, "skreq_table kzalloc, struct %lu, count %u total %lu\n",
sizeof(struct skd_request_context),
skdev->num_req_context,
sizeof(struct skd_request_context) * skdev->num_req_context);
@@ -4623,7 +4632,7 @@ static int skd_cons_skreq(struct skd_device *skdev)
goto err_out;
}
 
-   VPRINTK(skdev, "alloc sg_table sg_per_req %u scatlist %u total %u\n",
+   VPRINTK(skdev, "alloc sg_table sg_per_req %u scatlist %lu total %lu\n",
skdev->sgs_per_request, sizeof(struct scatterlist),
skdev->sgs_per_request * sizeof(struct scatterlist));
 
@@ -4668,7 +4677,7 @@ static int skd_cons_skspcl(struct skd_device *skdev)
int rc = 0;
u32 i, nbytes;
 
-   VPRINTK(skdev, "skspcl_table kzalloc, struct %u, count %u total %u\n",
+   VPRINTK(skdev, "skspcl_table kzalloc, struct %lu, count %u total %lu\n",
sizeof(struct skd_special_context),
skdev->n_special,
sizeof(struct skd_special_context) * skdev->n_special);
-- 
1.7.9.5

From: Akhil Bhansali
Sent: Thursday, September 19, 2013 5:39 PM
To: Jens Axboe
Cc: kbuild test robot; OS Engineering; Ramprasad Chinthekindi; 
jmo...@redhat.com; linux-kernel@vger.kernel.org; Amit Phansalkar
Subject: RE: [block:for-next 5/6] drivers/block/skd_main.c:441:3: error: 
implicit declaration of function 'readq'

Hi Jens,

Here is patch which takes care of removal of unused readq / readl function. I 
shall get rid of many VPRINTKs in the code in the subsequent patches.

I have prepared this patch on top of earlier patch I had sent out.  Please let 
me know if you have any comments.

Thank you.
--
>From 0c175433db8079e93890ebfcd736fa8756aa88af Mon Sep 17 00:00:00 2001
From: Akhil Bhansali 
Date: Thu, 19 Sep 2013 17:28:18 +0530
Subject: [PATCH] block: skd: Changes to remove unused readq / readl function
 calls.

These changes are to remove readq functions which is not used.
Signed-off-by: Akhil Bhansali 
---
 drivers/block/skd_main.c |8 
 1 file changed, 8 deletions(-)

diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c
index 0f25830..4c03b08 100644
--- a/drivers/block/skd_main.c
+++ b/drivers/block/skd_main.c
@@ -421,14 +421,10 @@ static inline void skd_reg_write32(struct skd_device 
*skdev, u32 val,
if (likely(skdev->dbg_level < 2)) {
writel(val, skdev->mem_map[1] + offset);
barrier();
-   readl(skdev->mem_map[1] + offset);
-   barrier();
} else {
barrier();
writel(val, skdev->mem_map[1] + offset);
barrier();
-   readl(skdev->mem_map[1] + offset);
-   barrier();
VPRINTK(skdev, "offset %x = %x\n", offset, val);
}
 }
@@ -439,14 +435,10 @@ static inline void skd_reg_write64(struct skd_device 
*skdev, u64 val,
if (likely(skdev->dbg_level < 2)) {
writeq(val, skdev->mem_map[1] + offset);
barrier();
-   readq(skdev->mem_map[1] + offset);
-   barrier();
} else {
barrier();
writeq(val, skdev->mem_map[1] + offset);
barrier();
-   readq(skdev->mem_map[1] + offset);
-   barrier();
VPRINTK(skdev, "offset %x = %016llx\n", offset, val);
}
 }
--
____
From: Jens Axboe [ax...@kernel.dk]
Sent: Wednesday, September 18, 2013 8:06 PM
To: Akhil Bhansali
Cc: kbuild test robot; OS Engineering; Ramprasad Chinthekindi; 
jmo...@redhat.com; linux-kernel@vger.kernel.org; Amit Phansalkar
Subject: Re: [block:for-next 5/6] drivers/block/skd_main.c:441:3: error: 
implicit declaration of function 'readq'

On Wed, Sep 18 2013, Akhil Bhansali wrote:
> Hi Jens,
>
> Please accept this patch that takes care of warnings related to i386 
> compilation.
> 1. Implicit function declaration of readq and writeq.
> 2. Format related warnings for VPRINTK.

You should get rid of the VPRINTK() as well, we do have debug facilities
in place you can use for printing.

And as mentioned a week or so ago, readq() isn't even used.

--
Jens Axboe


PROPRIETARY-CONFIDENTIAL INFORMATION INCLUDED

This electronic transmission, and any documents attached hereto, may contain 
confidential, proprietary and/or legally privileged information. The 
information is intended only for use by the recipient named above. If you 
received this electronic message in error, please notify the sender and delete

RE: [block:for-next 5/6] drivers/block/skd_main.c:441:3: error: implicit declaration of function 'readq'

2013-09-23 Thread Akhil Bhansali
-num_fitmsg_context, GFP_KERNEL);
@@ -4611,7 +4620,7 @@ static int skd_cons_skreq(struct skd_device *skdev)
int rc = 0;
u32 i;
 
-   VPRINTK(skdev, skreq_table kzalloc, struct %u, count %u total %u\n,
+   VPRINTK(skdev, skreq_table kzalloc, struct %lu, count %u total %lu\n,
sizeof(struct skd_request_context),
skdev-num_req_context,
sizeof(struct skd_request_context) * skdev-num_req_context);
@@ -4623,7 +4632,7 @@ static int skd_cons_skreq(struct skd_device *skdev)
goto err_out;
}
 
-   VPRINTK(skdev, alloc sg_table sg_per_req %u scatlist %u total %u\n,
+   VPRINTK(skdev, alloc sg_table sg_per_req %u scatlist %lu total %lu\n,
skdev-sgs_per_request, sizeof(struct scatterlist),
skdev-sgs_per_request * sizeof(struct scatterlist));
 
@@ -4668,7 +4677,7 @@ static int skd_cons_skspcl(struct skd_device *skdev)
int rc = 0;
u32 i, nbytes;
 
-   VPRINTK(skdev, skspcl_table kzalloc, struct %u, count %u total %u\n,
+   VPRINTK(skdev, skspcl_table kzalloc, struct %lu, count %u total %lu\n,
sizeof(struct skd_special_context),
skdev-n_special,
sizeof(struct skd_special_context) * skdev-n_special);
-- 
1.7.9.5

From: Akhil Bhansali
Sent: Thursday, September 19, 2013 5:39 PM
To: Jens Axboe
Cc: kbuild test robot; OS Engineering; Ramprasad Chinthekindi; 
jmo...@redhat.com; linux-kernel@vger.kernel.org; Amit Phansalkar
Subject: RE: [block:for-next 5/6] drivers/block/skd_main.c:441:3: error: 
implicit declaration of function 'readq'

Hi Jens,

Here is patch which takes care of removal of unused readq / readl function. I 
shall get rid of many VPRINTKs in the code in the subsequent patches.

I have prepared this patch on top of earlier patch I had sent out.  Please let 
me know if you have any comments.

Thank you.
--
From 0c175433db8079e93890ebfcd736fa8756aa88af Mon Sep 17 00:00:00 2001
From: Akhil Bhansali bhansaliak...@gmail.com
Date: Thu, 19 Sep 2013 17:28:18 +0530
Subject: [PATCH] block: skd: Changes to remove unused readq / readl function
 calls.

These changes are to remove readq functions which is not used.
Signed-off-by: Akhil Bhansali abhans...@stec-inc.com
---
 drivers/block/skd_main.c |8 
 1 file changed, 8 deletions(-)

diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c
index 0f25830..4c03b08 100644
--- a/drivers/block/skd_main.c
+++ b/drivers/block/skd_main.c
@@ -421,14 +421,10 @@ static inline void skd_reg_write32(struct skd_device 
*skdev, u32 val,
if (likely(skdev-dbg_level  2)) {
writel(val, skdev-mem_map[1] + offset);
barrier();
-   readl(skdev-mem_map[1] + offset);
-   barrier();
} else {
barrier();
writel(val, skdev-mem_map[1] + offset);
barrier();
-   readl(skdev-mem_map[1] + offset);
-   barrier();
VPRINTK(skdev, offset %x = %x\n, offset, val);
}
 }
@@ -439,14 +435,10 @@ static inline void skd_reg_write64(struct skd_device 
*skdev, u64 val,
if (likely(skdev-dbg_level  2)) {
writeq(val, skdev-mem_map[1] + offset);
barrier();
-   readq(skdev-mem_map[1] + offset);
-   barrier();
} else {
barrier();
writeq(val, skdev-mem_map[1] + offset);
barrier();
-   readq(skdev-mem_map[1] + offset);
-   barrier();
VPRINTK(skdev, offset %x = %016llx\n, offset, val);
}
 }
--

From: Jens Axboe [ax...@kernel.dk]
Sent: Wednesday, September 18, 2013 8:06 PM
To: Akhil Bhansali
Cc: kbuild test robot; OS Engineering; Ramprasad Chinthekindi; 
jmo...@redhat.com; linux-kernel@vger.kernel.org; Amit Phansalkar
Subject: Re: [block:for-next 5/6] drivers/block/skd_main.c:441:3: error: 
implicit declaration of function 'readq'

On Wed, Sep 18 2013, Akhil Bhansali wrote:
 Hi Jens,

 Please accept this patch that takes care of warnings related to i386 
 compilation.
 1. Implicit function declaration of readq and writeq.
 2. Format related warnings for VPRINTK.

You should get rid of the VPRINTK() as well, we do have debug facilities
in place you can use for printing.

And as mentioned a week or so ago, readq() isn't even used.

--
Jens Axboe


PROPRIETARY-CONFIDENTIAL INFORMATION INCLUDED

This electronic transmission, and any documents attached hereto, may contain 
confidential, proprietary and/or legally privileged information. The 
information is intended only for use by the recipient named above. If you 
received this electronic message in error, please notify the sender and delete 
the electronic message. Any disclosure, copying, distribution, or use of the 
contents of information received in error

Re: [block:for-next 5/6] drivers/block/skd_main.c:441:3: error: implicit declaration of function 'readq'

2013-09-23 Thread Jens Axboe
On 09/23/2013 05:59 AM, Akhil Bhansali wrote:
 Hello Jens,
 
 I am sending a patch created on top of Andrew's latest changes to disable 
 the 32 bit compilation of kronos driver.
 
 The patch takes care of following.
 1. checkpatch.pl was showing 3 errors for assignment in if condition, I have 
 got rid of that.
 2. removal of readq / readl functions which are not used in the code.
 3. warnings related to VPRINTKs for 64 bit compilation after latest fix from 
 Andrew.

Thanks, things are improving. I will apply it.

-- 
Jens Axboe

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [block:for-next 5/6] drivers/block/skd_main.c:441:3: error: implicit declaration of function 'readq'

2013-09-19 Thread Akhil Bhansali
Hi Jens,

Here is patch which takes care of removal of unused readq / readl function. I 
shall get rid of many VPRINTKs in the code in the subsequent patches.

I have prepared this patch on top of earlier patch I had sent out.  Please let 
me know if you have any comments.

Thank you.
--
>From 0c175433db8079e93890ebfcd736fa8756aa88af Mon Sep 17 00:00:00 2001
From: Akhil Bhansali 
Date: Thu, 19 Sep 2013 17:28:18 +0530
Subject: [PATCH] block: skd: Changes to remove unused readq / readl function
 calls.

These changes are to remove readq functions which is not used.
Signed-off-by: Akhil Bhansali 
---
 drivers/block/skd_main.c |8 
 1 file changed, 8 deletions(-)

diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c
index 0f25830..4c03b08 100644
--- a/drivers/block/skd_main.c
+++ b/drivers/block/skd_main.c
@@ -421,14 +421,10 @@ static inline void skd_reg_write32(struct skd_device 
*skdev, u32 val,
if (likely(skdev->dbg_level < 2)) {
writel(val, skdev->mem_map[1] + offset);
barrier();
-   readl(skdev->mem_map[1] + offset);
-   barrier();
} else {
barrier();
writel(val, skdev->mem_map[1] + offset);
barrier();
-   readl(skdev->mem_map[1] + offset);
-   barrier();
VPRINTK(skdev, "offset %x = %x\n", offset, val);
}
 }
@@ -439,14 +435,10 @@ static inline void skd_reg_write64(struct skd_device 
*skdev, u64 val,
if (likely(skdev->dbg_level < 2)) {
writeq(val, skdev->mem_map[1] + offset);
barrier();
-   readq(skdev->mem_map[1] + offset);
-   barrier();
} else {
barrier();
writeq(val, skdev->mem_map[1] + offset);
barrier();
-   readq(skdev->mem_map[1] + offset);
-   barrier();
VPRINTK(skdev, "offset %x = %016llx\n", offset, val);
}
 }
-- 

From: Jens Axboe [ax...@kernel.dk]
Sent: Wednesday, September 18, 2013 8:06 PM
To: Akhil Bhansali
Cc: kbuild test robot; OS Engineering; Ramprasad Chinthekindi; 
jmo...@redhat.com; linux-kernel@vger.kernel.org; Amit Phansalkar
Subject: Re: [block:for-next 5/6] drivers/block/skd_main.c:441:3: error: 
implicit declaration of function 'readq'

On Wed, Sep 18 2013, Akhil Bhansali wrote:
> Hi Jens,
>
> Please accept this patch that takes care of warnings related to i386 
> compilation.
> 1. Implicit function declaration of readq and writeq.
> 2. Format related warnings for VPRINTK.

You should get rid of the VPRINTK() as well, we do have debug facilities
in place you can use for printing.

And as mentioned a week or so ago, readq() isn't even used.

--
Jens Axboe


PROPRIETARY-CONFIDENTIAL INFORMATION INCLUDED

This electronic transmission, and any documents attached hereto, may contain 
confidential, proprietary and/or legally privileged information. The 
information is intended only for use by the recipient named above. If you 
received this electronic message in error, please notify the sender and delete 
the electronic message. Any disclosure, copying, distribution, or use of the 
contents of information received in error is strictly prohibited, and violators 
will be pursued legally.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [block:for-next 5/6] drivers/block/skd_main.c:441:3: error: implicit declaration of function 'readq'

2013-09-19 Thread Akhil Bhansali
Hi Jens,

Here is patch which takes care of removal of unused readq / readl function. I 
shall get rid of many VPRINTKs in the code in the subsequent patches.

I have prepared this patch on top of earlier patch I had sent out.  Please let 
me know if you have any comments.

Thank you.
--
From 0c175433db8079e93890ebfcd736fa8756aa88af Mon Sep 17 00:00:00 2001
From: Akhil Bhansali bhansaliak...@gmail.com
Date: Thu, 19 Sep 2013 17:28:18 +0530
Subject: [PATCH] block: skd: Changes to remove unused readq / readl function
 calls.

These changes are to remove readq functions which is not used.
Signed-off-by: Akhil Bhansali abhans...@stec-inc.com
---
 drivers/block/skd_main.c |8 
 1 file changed, 8 deletions(-)

diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c
index 0f25830..4c03b08 100644
--- a/drivers/block/skd_main.c
+++ b/drivers/block/skd_main.c
@@ -421,14 +421,10 @@ static inline void skd_reg_write32(struct skd_device 
*skdev, u32 val,
if (likely(skdev-dbg_level  2)) {
writel(val, skdev-mem_map[1] + offset);
barrier();
-   readl(skdev-mem_map[1] + offset);
-   barrier();
} else {
barrier();
writel(val, skdev-mem_map[1] + offset);
barrier();
-   readl(skdev-mem_map[1] + offset);
-   barrier();
VPRINTK(skdev, offset %x = %x\n, offset, val);
}
 }
@@ -439,14 +435,10 @@ static inline void skd_reg_write64(struct skd_device 
*skdev, u64 val,
if (likely(skdev-dbg_level  2)) {
writeq(val, skdev-mem_map[1] + offset);
barrier();
-   readq(skdev-mem_map[1] + offset);
-   barrier();
} else {
barrier();
writeq(val, skdev-mem_map[1] + offset);
barrier();
-   readq(skdev-mem_map[1] + offset);
-   barrier();
VPRINTK(skdev, offset %x = %016llx\n, offset, val);
}
 }
-- 

From: Jens Axboe [ax...@kernel.dk]
Sent: Wednesday, September 18, 2013 8:06 PM
To: Akhil Bhansali
Cc: kbuild test robot; OS Engineering; Ramprasad Chinthekindi; 
jmo...@redhat.com; linux-kernel@vger.kernel.org; Amit Phansalkar
Subject: Re: [block:for-next 5/6] drivers/block/skd_main.c:441:3: error: 
implicit declaration of function 'readq'

On Wed, Sep 18 2013, Akhil Bhansali wrote:
 Hi Jens,

 Please accept this patch that takes care of warnings related to i386 
 compilation.
 1. Implicit function declaration of readq and writeq.
 2. Format related warnings for VPRINTK.

You should get rid of the VPRINTK() as well, we do have debug facilities
in place you can use for printing.

And as mentioned a week or so ago, readq() isn't even used.

--
Jens Axboe


PROPRIETARY-CONFIDENTIAL INFORMATION INCLUDED

This electronic transmission, and any documents attached hereto, may contain 
confidential, proprietary and/or legally privileged information. The 
information is intended only for use by the recipient named above. If you 
received this electronic message in error, please notify the sender and delete 
the electronic message. Any disclosure, copying, distribution, or use of the 
contents of information received in error is strictly prohibited, and violators 
will be pursued legally.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [block:for-next 5/6] drivers/block/skd_main.c:441:3: error: implicit declaration of function 'readq'

2013-09-18 Thread Olof Johansson
On Wed, Sep 18, 2013 at 3:05 AM, Akhil Bhansali
 wrote:
> Hi Jens,
>
> Please accept this patch that takes care of warnings related to i386 
> compilation.
> 1. Implicit function declaration of readq and writeq.
> 2. Format related warnings for VPRINTK.
> 
> From f9964257c83f224c120ecb1e5a7b25e1807efea8 Mon Sep 17 00:00:00 2001
> From: Akhil Bhansali 
> Date: Wed, 18 Sep 2013 15:28:39 +0530
> Subject: [PATCH] block: skd: Changes to fix warnings during i386 compilation.
>
> 1. This commit addresses warnings related to
> readq, writeq implicit function declaration.
> 2. Warnings related to mismatched format.
> Signed-off-by: Akhil Bhansali 
> ---
>  drivers/block/skd_main.c |   19 ---
>  1 file changed, 12 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c
> index 773e793..0f25830 100644
> --- a/drivers/block/skd_main.c
> +++ b/drivers/block/skd_main.c
> @@ -49,6 +49,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>
>  #include "skd_s1120.h"
>
> @@ -4557,7 +4558,7 @@ static int skd_cons_skmsg(struct skd_device *skdev)
> u32 i;
>
> VPRINTK(skdev, "skmsg_table kzalloc, struct %lu, count %u total 
> %lu\n",
> -   sizeof(struct skd_fitmsg_context),
> +   (unsigned long) sizeof(struct skd_fitmsg_context),

Just change the format string instead, then you don't have to cast
like this everywhere.


-Olof
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [block:for-next 5/6] drivers/block/skd_main.c:441:3: error: implicit declaration of function 'readq'

2013-09-18 Thread Jens Axboe
On Wed, Sep 18 2013, Akhil Bhansali wrote:
> Hi Jens,
> 
> Please accept this patch that takes care of warnings related to i386 
> compilation.
> 1. Implicit function declaration of readq and writeq.
> 2. Format related warnings for VPRINTK.

You should get rid of the VPRINTK() as well, we do have debug facilities
in place you can use for printing.

And as mentioned a week or so ago, readq() isn't even used.

-- 
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [block:for-next 5/6] drivers/block/skd_main.c:441:3: error: implicit declaration of function 'readq'

2013-09-18 Thread Akhil Bhansali
Hi Jens,

Please accept this patch that takes care of warnings related to i386 
compilation.
1. Implicit function declaration of readq and writeq.
2. Format related warnings for VPRINTK.

>From f9964257c83f224c120ecb1e5a7b25e1807efea8 Mon Sep 17 00:00:00 2001
From: Akhil Bhansali 
Date: Wed, 18 Sep 2013 15:28:39 +0530
Subject: [PATCH] block: skd: Changes to fix warnings during i386 compilation.

1. This commit addresses warnings related to
readq, writeq implicit function declaration.
2. Warnings related to mismatched format.
Signed-off-by: Akhil Bhansali 
---
 drivers/block/skd_main.c |   19 ---
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c
index 773e793..0f25830 100644
--- a/drivers/block/skd_main.c
+++ b/drivers/block/skd_main.c
@@ -49,6 +49,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "skd_s1120.h"
 
@@ -4557,7 +4558,7 @@ static int skd_cons_skmsg(struct skd_device *skdev)
u32 i;
 
VPRINTK(skdev, "skmsg_table kzalloc, struct %lu, count %u total %lu\n",
-   sizeof(struct skd_fitmsg_context),
+   (unsigned long) sizeof(struct skd_fitmsg_context),
skdev->num_fitmsg_context,
(unsigned long) sizeof(struct skd_fitmsg_context) *
skdev->num_fitmsg_context);
@@ -4612,9 +4613,10 @@ static int skd_cons_skreq(struct skd_device *skdev)
u32 i;
 
VPRINTK(skdev, "skreq_table kzalloc, struct %lu, count %u total %lu\n",
-   sizeof(struct skd_request_context),
+   (unsigned long) sizeof(struct skd_request_context),
skdev->num_req_context,
-   sizeof(struct skd_request_context) * skdev->num_req_context);
+   (unsigned long) sizeof(struct skd_request_context) *
+   skdev->num_req_context);
 
skdev->skreq_table = kzalloc(sizeof(struct skd_request_context)
 * skdev->num_req_context, GFP_KERNEL);
@@ -4624,8 +4626,10 @@ static int skd_cons_skreq(struct skd_device *skdev)
}
 
VPRINTK(skdev, "alloc sg_table sg_per_req %u scatlist %lu total %lu\n",
-   skdev->sgs_per_request, sizeof(struct scatterlist),
-   skdev->sgs_per_request * sizeof(struct scatterlist));
+   skdev->sgs_per_request,
+   (unsigned long) sizeof(struct scatterlist),
+   (unsigned long)(skdev->sgs_per_request *
+   sizeof(struct scatterlist)));
 
for (i = 0; i < skdev->num_req_context; i++) {
struct skd_request_context *skreq;
@@ -4669,9 +4673,10 @@ static int skd_cons_skspcl(struct skd_device *skdev)
u32 i, nbytes;
 
VPRINTK(skdev, "skspcl_table kzalloc, struct %lu, count %u total %lu\n",
-   sizeof(struct skd_special_context),
+   (unsigned long) sizeof(struct skd_special_context),
skdev->n_special,
-   sizeof(struct skd_special_context) * skdev->n_special);
+   (unsigned long) sizeof(struct skd_special_context) *
+   skdev->n_special);
 
skdev->skspcl_table = kzalloc(sizeof(struct skd_special_context)
  * skdev->n_special, GFP_KERNEL);
-- 
1.7.9.5

___ _
From: Jens Axboe [ax...@kernel.dk]
Sent: Friday, September 13, 2013 8:55 PM
To: Akhil Bhansali
Cc: kbuild test robot; OS Engineering; Ramprasad Chinthekindi; 
jmo...@redhat.com; linux-kernel@vger.kernel.org
Subject: Re: [block:for-next 5/6] drivers/block/skd_main.c:441:3: error: 
implicit declaration of function 'readq'

On 09/13/2013 06:59 AM, Akhil Bhansali wrote:
> This patch takes care of warnings related to
> 1. Implicit function declaration for readq / writeq.
> 2. Warnings related to -Wformat.

Please do it on top of what was already fixed up. The readq, for
instance, is not even used in the driver.

--
Jens Axboe

PROPRIETARY-CONFIDENTIAL INFORMATION INCLUDED

This electronic transmission, and any documents attached hereto, may contain 
confidential, proprietary and/or legally privileged information. The 
information is intended only for use by the recipient named above. If you 
received this electronic message in error, please notify the sender and delete 
the electronic message. Any disclosure, copying, distribution, or use of the 
contents of information received in error is strictly prohibited, and violators 
will be pursued legally.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [block:for-next 5/6] drivers/block/skd_main.c:441:3: error: implicit declaration of function 'readq'

2013-09-18 Thread Akhil Bhansali
Hi Jens,

Please accept this patch that takes care of warnings related to i386 
compilation.
1. Implicit function declaration of readq and writeq.
2. Format related warnings for VPRINTK.

From f9964257c83f224c120ecb1e5a7b25e1807efea8 Mon Sep 17 00:00:00 2001
From: Akhil Bhansali bhansaliak...@gmail.com
Date: Wed, 18 Sep 2013 15:28:39 +0530
Subject: [PATCH] block: skd: Changes to fix warnings during i386 compilation.

1. This commit addresses warnings related to
readq, writeq implicit function declaration.
2. Warnings related to mismatched format.
Signed-off-by: Akhil Bhansali abhans...@stec-inc.com
---
 drivers/block/skd_main.c |   19 ---
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c
index 773e793..0f25830 100644
--- a/drivers/block/skd_main.c
+++ b/drivers/block/skd_main.c
@@ -49,6 +49,7 @@
 #include linux/io.h
 #include linux/uaccess.h
 #include asm-generic/unaligned.h
+#include asm-generic/io-64-nonatomic-lo-hi.h
 
 #include skd_s1120.h
 
@@ -4557,7 +4558,7 @@ static int skd_cons_skmsg(struct skd_device *skdev)
u32 i;
 
VPRINTK(skdev, skmsg_table kzalloc, struct %lu, count %u total %lu\n,
-   sizeof(struct skd_fitmsg_context),
+   (unsigned long) sizeof(struct skd_fitmsg_context),
skdev-num_fitmsg_context,
(unsigned long) sizeof(struct skd_fitmsg_context) *
skdev-num_fitmsg_context);
@@ -4612,9 +4613,10 @@ static int skd_cons_skreq(struct skd_device *skdev)
u32 i;
 
VPRINTK(skdev, skreq_table kzalloc, struct %lu, count %u total %lu\n,
-   sizeof(struct skd_request_context),
+   (unsigned long) sizeof(struct skd_request_context),
skdev-num_req_context,
-   sizeof(struct skd_request_context) * skdev-num_req_context);
+   (unsigned long) sizeof(struct skd_request_context) *
+   skdev-num_req_context);
 
skdev-skreq_table = kzalloc(sizeof(struct skd_request_context)
 * skdev-num_req_context, GFP_KERNEL);
@@ -4624,8 +4626,10 @@ static int skd_cons_skreq(struct skd_device *skdev)
}
 
VPRINTK(skdev, alloc sg_table sg_per_req %u scatlist %lu total %lu\n,
-   skdev-sgs_per_request, sizeof(struct scatterlist),
-   skdev-sgs_per_request * sizeof(struct scatterlist));
+   skdev-sgs_per_request,
+   (unsigned long) sizeof(struct scatterlist),
+   (unsigned long)(skdev-sgs_per_request *
+   sizeof(struct scatterlist)));
 
for (i = 0; i  skdev-num_req_context; i++) {
struct skd_request_context *skreq;
@@ -4669,9 +4673,10 @@ static int skd_cons_skspcl(struct skd_device *skdev)
u32 i, nbytes;
 
VPRINTK(skdev, skspcl_table kzalloc, struct %lu, count %u total %lu\n,
-   sizeof(struct skd_special_context),
+   (unsigned long) sizeof(struct skd_special_context),
skdev-n_special,
-   sizeof(struct skd_special_context) * skdev-n_special);
+   (unsigned long) sizeof(struct skd_special_context) *
+   skdev-n_special);
 
skdev-skspcl_table = kzalloc(sizeof(struct skd_special_context)
  * skdev-n_special, GFP_KERNEL);
-- 
1.7.9.5

___ _
From: Jens Axboe [ax...@kernel.dk]
Sent: Friday, September 13, 2013 8:55 PM
To: Akhil Bhansali
Cc: kbuild test robot; OS Engineering; Ramprasad Chinthekindi; 
jmo...@redhat.com; linux-kernel@vger.kernel.org
Subject: Re: [block:for-next 5/6] drivers/block/skd_main.c:441:3: error: 
implicit declaration of function 'readq'

On 09/13/2013 06:59 AM, Akhil Bhansali wrote:
 This patch takes care of warnings related to
 1. Implicit function declaration for readq / writeq.
 2. Warnings related to -Wformat.

Please do it on top of what was already fixed up. The readq, for
instance, is not even used in the driver.

--
Jens Axboe

PROPRIETARY-CONFIDENTIAL INFORMATION INCLUDED

This electronic transmission, and any documents attached hereto, may contain 
confidential, proprietary and/or legally privileged information. The 
information is intended only for use by the recipient named above. If you 
received this electronic message in error, please notify the sender and delete 
the electronic message. Any disclosure, copying, distribution, or use of the 
contents of information received in error is strictly prohibited, and violators 
will be pursued legally.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [block:for-next 5/6] drivers/block/skd_main.c:441:3: error: implicit declaration of function 'readq'

2013-09-18 Thread Jens Axboe
On Wed, Sep 18 2013, Akhil Bhansali wrote:
 Hi Jens,
 
 Please accept this patch that takes care of warnings related to i386 
 compilation.
 1. Implicit function declaration of readq and writeq.
 2. Format related warnings for VPRINTK.

You should get rid of the VPRINTK() as well, we do have debug facilities
in place you can use for printing.

And as mentioned a week or so ago, readq() isn't even used.

-- 
Jens Axboe

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [block:for-next 5/6] drivers/block/skd_main.c:441:3: error: implicit declaration of function 'readq'

2013-09-18 Thread Olof Johansson
On Wed, Sep 18, 2013 at 3:05 AM, Akhil Bhansali
akhilashok.bhans...@hgst.com wrote:
 Hi Jens,

 Please accept this patch that takes care of warnings related to i386 
 compilation.
 1. Implicit function declaration of readq and writeq.
 2. Format related warnings for VPRINTK.
 
 From f9964257c83f224c120ecb1e5a7b25e1807efea8 Mon Sep 17 00:00:00 2001
 From: Akhil Bhansali bhansaliak...@gmail.com
 Date: Wed, 18 Sep 2013 15:28:39 +0530
 Subject: [PATCH] block: skd: Changes to fix warnings during i386 compilation.

 1. This commit addresses warnings related to
 readq, writeq implicit function declaration.
 2. Warnings related to mismatched format.
 Signed-off-by: Akhil Bhansali abhans...@stec-inc.com
 ---
  drivers/block/skd_main.c |   19 ---
  1 file changed, 12 insertions(+), 7 deletions(-)

 diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c
 index 773e793..0f25830 100644
 --- a/drivers/block/skd_main.c
 +++ b/drivers/block/skd_main.c
 @@ -49,6 +49,7 @@
  #include linux/io.h
  #include linux/uaccess.h
  #include asm-generic/unaligned.h
 +#include asm-generic/io-64-nonatomic-lo-hi.h

  #include skd_s1120.h

 @@ -4557,7 +4558,7 @@ static int skd_cons_skmsg(struct skd_device *skdev)
 u32 i;

 VPRINTK(skdev, skmsg_table kzalloc, struct %lu, count %u total 
 %lu\n,
 -   sizeof(struct skd_fitmsg_context),
 +   (unsigned long) sizeof(struct skd_fitmsg_context),

Just change the format string instead, then you don't have to cast
like this everywhere.


-Olof
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [block:for-next 5/6] drivers/block/skd_main.c:441:3: error: implicit declaration of function 'readq'

2013-09-13 Thread Jens Axboe
On 09/13/2013 06:59 AM, Akhil Bhansali wrote:
> This patch takes care of warnings related to
> 1. Implicit function declaration for readq / writeq.
> 2. Warnings related to -Wformat.

Please do it on top of what was already fixed up. The readq, for
instance, is not even used in the driver.

-- 
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [block:for-next 5/6] drivers/block/skd_main.c:441:3: error: implicit declaration of function 'readq'

2013-09-13 Thread Akhil Bhansali
This patch takes care of warnings related to
1. Implicit function declaration for readq / writeq.
2. Warnings related to -Wformat.

Signed-off-by: Akhil Bhansali 
--
diff -uprN -X linux-3.10.9/Documentation/dontdiff 
linux-3.10.9/drivers/block/skd_main.c 
linux-3.10.9.changes/drivers/block/skd_main.c
--- linux-3.10.9/drivers/block/skd_main.c   2013-09-13 18:14:19.505597630 
+0530
+++ linux-3.10.9.changes/drivers/block/skd_main.c   2013-09-13 
18:01:52.761561490 +0530
@@ -41,6 +49,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "skd_s1120.h"
 
@@ -4570,11 +4579,6 @@ static int skd_cons_skmsg(struct skd_dev
int rc = 0;
u32 i;
 
-   VPRINTK(skdev, "skmsg_table kzalloc, struct %lu, count %u total %lu\n",
-   sizeof(struct skd_fitmsg_context),
-   skdev->num_fitmsg_context,
-   sizeof(struct skd_fitmsg_context) * skdev->num_fitmsg_context);
-
skdev->skmsg_table = kzalloc(sizeof(struct skd_fitmsg_context)
 *skdev->num_fitmsg_context, GFP_KERNEL);
if (skdev->skmsg_table == NULL) {
@@ -4601,6 +4605,7 @@ static int skd_cons_skmsg(struct skd_dev
 
skmsg->offset = (u32)((u64)skmsg->msg_buf &
  (~FIT_QCMD_BASE_ADDRESS_MASK));
+
skmsg->msg_buf += ~FIT_QCMD_BASE_ADDRESS_MASK;
skmsg->msg_buf = (u8 *)((u64)skmsg->msg_buf &
   FIT_QCMD_BASE_ADDRESS_MASK);
@@ -4624,11 +4629,6 @@ static int skd_cons_skreq(struct skd_dev
int rc = 0;
u32 i;
 
-   VPRINTK(skdev, "skreq_table kzalloc, struct %lu, count %u total %lu\n",
-   sizeof(struct skd_request_context),
-   skdev->num_req_context,
-   sizeof(struct skd_request_context) * skdev->num_req_context);
-
skdev->skreq_table = kzalloc(sizeof(struct skd_request_context)
 * skdev->num_req_context, GFP_KERNEL);
if (skdev->skreq_table == NULL) {
@@ -4636,10 +4636,6 @@ static int skd_cons_skreq(struct skd_dev
goto err_out;
}
 
-   VPRINTK(skdev, "alloc sg_table sg_per_req %u scatlist %lu total %lu\n",
-   skdev->sgs_per_request, sizeof(struct scatterlist),
-   skdev->sgs_per_request * sizeof(struct scatterlist));
-
for (i = 0; i < skdev->num_req_context; i++) {
struct skd_request_context *skreq;
 
@@ -4681,11 +4677,6 @@ static int skd_cons_skspcl(struct skd_de
int rc = 0;
u32 i, nbytes;
 
-   VPRINTK(skdev, "skspcl_table kzalloc, struct %lu, count %u total %lu\n",
-   sizeof(struct skd_special_context),
-   skdev->n_special,
-   sizeof(struct skd_special_context) * skdev->n_special);
-
skdev->skspcl_table = kzalloc(sizeof(struct skd_special_context)
  * skdev->n_special, GFP_KERNEL);
if (skdev->skspcl_table == NULL) {
Signed-off-by: Akhil Bhansali 

From: kbuild test robot [fengguang...@intel.com]
Sent: Thursday, September 12, 2013 1:45 AM
To: Akhil Bhansali
Cc: Ramprasad Chinthekindi; Jens Axboe; kbuild-...@01.org
Subject: [block:for-next 5/6] drivers/block/skd_main.c:441:3: error: implicit 
declaration of function 'readq'

tree:   git://git.kernel.dk/linux-block.git for-next
head:   b497e021a24be0eeb3c1a4ad9b2a04275ab5edc0
commit: 09d54e6cf164a524a7d03703acff80974cb4f632 [5/6] Patch for pcie device 
driver from sTec Inc.
config: make ARCH=i386 allyesconfig

All error/warnings:

   drivers/block/skd_main.c: In function 'skd_reg_read64':
>> drivers/block/skd_main.c:441:3: error: implicit declaration of function 
>> 'readq' [-Werror=implicit-function-declaration]
  return readq(skdev->mem_map[1] + offset);
  ^
   drivers/block/skd_main.c: In function 'skd_reg_write64':
>> drivers/block/skd_main.c:455:3: error: implicit declaration of function 
>> 'writeq' [-Werror=implicit-function-declaration]
  writeq(val, skdev->mem_map[1] + offset);
  ^
   In file included from include/linux/kernel.h:13:0,
from drivers/block/skd_main.c:19:
   drivers/block/skd_main.c: In function 'skd_cons_skmsg':
>> drivers/block/skd_main.c:4584:17: warning: format '%lu' expects argument of 
>> type 'long unsigned int', but argument 5 has type 'unsigned int' [-Wformat=]
  sizeof(struct skd_fitmsg_context) * skdev->num_fitmsg_context);
^
   include/linux/printk.h:216:33: note: in definition of macro 'pr_err'
 printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
^
   drivers/block/skd_main.c:4581:2: note: in expansion of macro 'VPRINTK'
 VPRINTK(skdev, "skmsg_table kzalloc, struct %lu, count %u total %lu\n",
 ^
>> drivers/block/skd_main.c:4584:17: warning: format '%lu' expects argument of 
>> type 'long unsigned int', but argument 7 has type 'unsigned 

RE: [block:for-next 5/6] drivers/block/skd_main.c:441:3: error: implicit declaration of function 'readq'

2013-09-13 Thread Akhil Bhansali
This patch takes care of warnings related to
1. Implicit function declaration for readq / writeq.
2. Warnings related to -Wformat.

Signed-off-by: Akhil Bhansali abhans...@stec-inc.com
--
diff -uprN -X linux-3.10.9/Documentation/dontdiff 
linux-3.10.9/drivers/block/skd_main.c 
linux-3.10.9.changes/drivers/block/skd_main.c
--- linux-3.10.9/drivers/block/skd_main.c   2013-09-13 18:14:19.505597630 
+0530
+++ linux-3.10.9.changes/drivers/block/skd_main.c   2013-09-13 
18:01:52.761561490 +0530
@@ -41,6 +49,7 @@
 #include linux/io.h
 #include linux/uaccess.h
 #include asm-generic/unaligned.h
+#include asm-generic/io-64-nonatomic-lo-hi.h
 
 #include skd_s1120.h
 
@@ -4570,11 +4579,6 @@ static int skd_cons_skmsg(struct skd_dev
int rc = 0;
u32 i;
 
-   VPRINTK(skdev, skmsg_table kzalloc, struct %lu, count %u total %lu\n,
-   sizeof(struct skd_fitmsg_context),
-   skdev-num_fitmsg_context,
-   sizeof(struct skd_fitmsg_context) * skdev-num_fitmsg_context);
-
skdev-skmsg_table = kzalloc(sizeof(struct skd_fitmsg_context)
 *skdev-num_fitmsg_context, GFP_KERNEL);
if (skdev-skmsg_table == NULL) {
@@ -4601,6 +4605,7 @@ static int skd_cons_skmsg(struct skd_dev
 
skmsg-offset = (u32)((u64)skmsg-msg_buf 
  (~FIT_QCMD_BASE_ADDRESS_MASK));
+
skmsg-msg_buf += ~FIT_QCMD_BASE_ADDRESS_MASK;
skmsg-msg_buf = (u8 *)((u64)skmsg-msg_buf 
   FIT_QCMD_BASE_ADDRESS_MASK);
@@ -4624,11 +4629,6 @@ static int skd_cons_skreq(struct skd_dev
int rc = 0;
u32 i;
 
-   VPRINTK(skdev, skreq_table kzalloc, struct %lu, count %u total %lu\n,
-   sizeof(struct skd_request_context),
-   skdev-num_req_context,
-   sizeof(struct skd_request_context) * skdev-num_req_context);
-
skdev-skreq_table = kzalloc(sizeof(struct skd_request_context)
 * skdev-num_req_context, GFP_KERNEL);
if (skdev-skreq_table == NULL) {
@@ -4636,10 +4636,6 @@ static int skd_cons_skreq(struct skd_dev
goto err_out;
}
 
-   VPRINTK(skdev, alloc sg_table sg_per_req %u scatlist %lu total %lu\n,
-   skdev-sgs_per_request, sizeof(struct scatterlist),
-   skdev-sgs_per_request * sizeof(struct scatterlist));
-
for (i = 0; i  skdev-num_req_context; i++) {
struct skd_request_context *skreq;
 
@@ -4681,11 +4677,6 @@ static int skd_cons_skspcl(struct skd_de
int rc = 0;
u32 i, nbytes;
 
-   VPRINTK(skdev, skspcl_table kzalloc, struct %lu, count %u total %lu\n,
-   sizeof(struct skd_special_context),
-   skdev-n_special,
-   sizeof(struct skd_special_context) * skdev-n_special);
-
skdev-skspcl_table = kzalloc(sizeof(struct skd_special_context)
  * skdev-n_special, GFP_KERNEL);
if (skdev-skspcl_table == NULL) {
Signed-off-by: Akhil Bhansali abhans...@stec-inc.com

From: kbuild test robot [fengguang...@intel.com]
Sent: Thursday, September 12, 2013 1:45 AM
To: Akhil Bhansali
Cc: Ramprasad Chinthekindi; Jens Axboe; kbuild-...@01.org
Subject: [block:for-next 5/6] drivers/block/skd_main.c:441:3: error: implicit 
declaration of function 'readq'

tree:   git://git.kernel.dk/linux-block.git for-next
head:   b497e021a24be0eeb3c1a4ad9b2a04275ab5edc0
commit: 09d54e6cf164a524a7d03703acff80974cb4f632 [5/6] Patch for pcie device 
driver from sTec Inc.
config: make ARCH=i386 allyesconfig

All error/warnings:

   drivers/block/skd_main.c: In function 'skd_reg_read64':
 drivers/block/skd_main.c:441:3: error: implicit declaration of function 
 'readq' [-Werror=implicit-function-declaration]
  return readq(skdev-mem_map[1] + offset);
  ^
   drivers/block/skd_main.c: In function 'skd_reg_write64':
 drivers/block/skd_main.c:455:3: error: implicit declaration of function 
 'writeq' [-Werror=implicit-function-declaration]
  writeq(val, skdev-mem_map[1] + offset);
  ^
   In file included from include/linux/kernel.h:13:0,
from drivers/block/skd_main.c:19:
   drivers/block/skd_main.c: In function 'skd_cons_skmsg':
 drivers/block/skd_main.c:4584:17: warning: format '%lu' expects argument of 
 type 'long unsigned int', but argument 5 has type 'unsigned int' [-Wformat=]
  sizeof(struct skd_fitmsg_context) * skdev-num_fitmsg_context);
^
   include/linux/printk.h:216:33: note: in definition of macro 'pr_err'
 printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
^
   drivers/block/skd_main.c:4581:2: note: in expansion of macro 'VPRINTK'
 VPRINTK(skdev, skmsg_table kzalloc, struct %lu, count %u total %lu\n,
 ^
 drivers/block/skd_main.c:4584:17: warning: format '%lu' expects 

Re: [block:for-next 5/6] drivers/block/skd_main.c:441:3: error: implicit declaration of function 'readq'

2013-09-13 Thread Jens Axboe
On 09/13/2013 06:59 AM, Akhil Bhansali wrote:
 This patch takes care of warnings related to
 1. Implicit function declaration for readq / writeq.
 2. Warnings related to -Wformat.

Please do it on top of what was already fixed up. The readq, for
instance, is not even used in the driver.

-- 
Jens Axboe

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/