[PATCH] block: skd: Changes to fix warnings during i386 compilation.

From: Akhil Bhansali
Date: Wed Sep 18 2013 - 05:58:39 EST


1. This commit addresses warnings related to
readq, writeq implicit function declaration.
2. Warnings related to mismatched format.
Signed-off-by: Akhil Bhansali <abhansali@xxxxxxxxxxxx>
---
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 [axboe@xxxxxxxxx]
Sent: Friday, September 13, 2013 8:55 PM
To: Akhil Bhansali
Cc: kbuild test robot; OS Engineering; Ramprasad Chinthekindi; jmoyer@xxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/