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: <46AFDDD8.8050903@s5r6.in-berlin.de>
Date:	Wed, 01 Aug 2007 03:11:52 +0200
From:	Stefan Richter <stefanr@...6.in-berlin.de>
To:	Daniel Drake <dsd@...too.org>
CC:	jack@...keye.stone.uk.eu.org, linux-kernel@...r.kernel.org,
	trivial@...nel.org
Subject: Re: [Patch 14/16] Remove needless kmalloc casts in the zd1211rw drivers.

Daniel Drake wrote:
> jack@...keye.stone.uk.eu.org wrote:
>> Signed-off-by: Jack Stone <jack@...keye.stone.uk.eu.org>
>>
>> CC: Daniel Drake <dsd@...too.org>
> 
> NAK: this patch adds a sparse warning
> zd_chip.c:116:15: warning: implicit cast to nocast type

What does this warning mean?  a16 is defined as zd_addr_t *.

>> --- a/drivers/net/wireless/zd1211rw/zd_chip.c
>> +++ b/drivers/net/wireless/zd1211rw/zd_chip.c
>> @@ -115,7 +115,7 @@ int zd_ioread32v_locked(struct zd_chip *
>>  
>>      /* Allocate a single memory block for values and addresses. */
>>      count16 = 2*count;
>> -    a16 = (zd_addr_t *) kmalloc(count16 * (sizeof(zd_addr_t) +
>> sizeof(u16)),
>> +    a16 = kmalloc(count16 * (sizeof(zd_addr_t) + sizeof(u16)),
>>                             GFP_KERNEL);
>>      if (!a16) {
>>          dev_dbg_f(zd_chip_dev(chip),
>>

Also, why is there this cast right before that?

	zd_addr_t *a16 = (zd_addr_t *)NULL;

-- 
Stefan Richter
-=====-=-=== =--- ----=
http://arcgraph.de/sr/
-
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