lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 20 Sep 2013 15:31:28 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Jens Axboe <axboe@...nel.dk>
Cc:	Olof Johansson <olof@...om.net>, Jeff Moyer <jmoyer@...hat.com>,
	OS Engineering <osengineering@...c-inc.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Akhil Bhansali <abhansali@...c-inc.com>,
	Ramprasad Chinthekindi <rchinthekindi@...c-inc.com>,
	Amit Phansalkar <aphansalkar@...c-inc.com>
Subject: Re: [PATCH] block: Device driver for sTec's PCIe Kronos Card.

On Tue, 17 Sep 2013 14:20:55 -0600 Jens Axboe <axboe@...nel.dk> wrote:

> > So, it looks like this driver needs a bunch of work before it's ready
> > to go in. Or, maybe it's better to submit it with a TODO list for the
> > staging tree instead?
> 
> Not disagreeing with you, it definitely needs a bit of cleaning. And so
> far stec has not been very responsive in fixing those issues.

Geeze.  Here's what I came up with, mainly to make i386 compile:


From: Andrew Morton <akpm@...ux-foundation.org>
Subject: drivers/block/skd_main.c: fix a few things, disable on 32-bit

Fix these (i386 allmodconfig):

drivers/block/skd_main.c:4559: warning: format '%lu' expects type 'long unsigned int', but argument 5 has type 'unsigned int'
drivers/block/skd_main.c:4614: warning: format '%lu' expects type 'long unsigned int', but argument 5 has type 'unsigned int'
drivers/block/skd_main.c:4614: warning: format '%lu' expects type 'long unsigned int', but argument 7 has type 'unsigned int'
drivers/block/skd_main.c:4626: warning: format '%lu' expects type 'long unsigned int', but argument 6 has type 'unsigned int'
drivers/block/skd_main.c:4626: warning: format '%lu' expects type 'long unsigned int', but argument 7 has type 'unsigned int'
drivers/block/skd_main.c:4671: warning: format '%lu' expects type 'long unsigned int', but argument 5 has type 'unsigned int'
drivers/block/skd_main.c:4671: warning: format '%lu' expects type 'long unsigned int', but argument 7 has type 'unsigned int'

And what remains is these:

drivers/block/skd_main.c: In function 'skd_reg_write64':
drivers/block/skd_main.c:439: error: implicit declaration of function 'writeq'
drivers/block/skd_main.c:441: error: implicit declaration of function 'readq'
drivers/block/skd_main.c: In function 'skd_cons_skmsg':
drivers/block/skd_main.c:4589: warning: cast from pointer to integer of different size
drivers/block/skd_main.c:4592: warning: cast from pointer to integer of different size
drivers/block/skd_main.c:4593: warning: cast to pointer from integer of different size

Which is more than I'm prepared to address, so just disable the driver on
32-bit builds.

Cc: Akhil Bhansali <abhansali@...c-inc.com>
Cc: Jeff Moyer <jmoyer@...hat.com>
Cc: Jens Axboe <axboe@...nel.dk>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
---

 drivers/block/Kconfig    |    1 +
 drivers/block/skd_main.c |    8 ++++----
 2 files changed, 5 insertions(+), 4 deletions(-)

diff -puN drivers/block/skd_main.c~drivers-block-skd_mainc-fix-a-few-things-disable-on-32-bit drivers/block/skd_main.c
--- a/drivers/block/skd_main.c~drivers-block-skd_mainc-fix-a-few-things-disable-on-32-bit
+++ a/drivers/block/skd_main.c
@@ -4556,7 +4556,7 @@ 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",
+	VPRINTK(skdev, "skmsg_table kzalloc, struct %u, count %u total %lu\n",
 		sizeof(struct skd_fitmsg_context),
 		skdev->num_fitmsg_context,
 		(unsigned long) sizeof(struct skd_fitmsg_context) *
@@ -4611,7 +4611,7 @@ 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",
+	VPRINTK(skdev, "skreq_table kzalloc, struct %u, count %u total %u\n",
 		sizeof(struct skd_request_context),
 		skdev->num_req_context,
 		sizeof(struct skd_request_context) * skdev->num_req_context);
@@ -4623,7 +4623,7 @@ 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",
+	VPRINTK(skdev, "alloc sg_table sg_per_req %u scatlist %u total %u\n",
 		skdev->sgs_per_request, sizeof(struct scatterlist),
 		skdev->sgs_per_request * sizeof(struct scatterlist));
 
@@ -4668,7 +4668,7 @@ 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",
+	VPRINTK(skdev, "skspcl_table kzalloc, struct %u, count %u total %u\n",
 		sizeof(struct skd_special_context),
 		skdev->n_special,
 		sizeof(struct skd_special_context) * skdev->n_special);
diff -puN drivers/block/Kconfig~drivers-block-skd_mainc-fix-a-few-things-disable-on-32-bit drivers/block/Kconfig
--- a/drivers/block/Kconfig~drivers-block-skd_mainc-fix-a-few-things-disable-on-32-bit
+++ a/drivers/block/Kconfig
@@ -319,6 +319,7 @@ config BLK_DEV_NVME
 config BLK_DEV_SKD
 	tristate "STEC S1120 Block Driver"
 	depends on PCI
+	depends on 64BIT
 	---help---
 	Saying Y or M here will enable support for the
 	STEC, Inc. S1120 PCIe SSD.
_

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ