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]
Message-ID: <Pine.LNX.4.61.0705172308410.3231@yvahk01.tjqt.qr>
Date:	Thu, 17 May 2007 23:11:17 +0200 (MEST)
From:	Jan Engelhardt <jengelh@...ux01.gwdg.de>
To:	Andrew Morton <akpm@...ux-foundation.org>
cc:	Peer Chen <pchen@...dia.com>, linux-kernel@...r.kernel.org,
	Jeff Garzik <jeff@...zik.org>,
	Robert Hancock <hancockr@...w.ca>, Kuan Luo <kluo@...dia.com>
Subject: Re: [PATCH] drivers/ata: Add the SW NCQ support to sata_nv for
 MCP51/MCP55/MCP61


On May 17 2007 13:17, Andrew Morton wrote:
>> @@ -2115,7 +2115,7 @@ static void nv_fill_sg(struct ata_queued
>>  	WARN_ON(qc->__sg == NULL);
>>  	WARN_ON(qc->n_elem == 0 && qc->pad_len == 0);
>>  
>> -	prd = (struct ata_prd*)((u64)pp->prd + ATA_PRD_TBL_SZ*qc->tag);
>> +	prd = pp->prd + ATA_PRD_TBL_SZ*qc->tag;
>>  
>>  	idx = 0;
>>  	ata_for_each_sg(sg, qc) {
>
>hm, no.
>
>ugh, I dunno what's going on here and I think I'd prefer not to.  Can't
>we come up with some typesafe way of doing this without casting?
>
>Meanwhile, I'll switch the cast from u64 to long.

Maybe this?

	prd = (void *)pp->prd + ATA_PRD_TBL_SZ * qc->tag

Or...

	prd = pp->prd + (ATA_PRD_TBL_SZ * qc->tag) / sizeof(typeof(pp->prd));


	Jan
-- 
-
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