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: <36ca99e90904080534g54a1d4f3ue782b8598d238090@mail.gmail.com>
Date:	Wed, 8 Apr 2009 14:34:12 +0200
From:	Bert Wesarg <bert.wesarg@...glemail.com>
To:	Jack Stone <jwjstone@...tmail.fm>
Cc:	linux-kernel@...r.kernel.org, jeff@...zik.org,
	kernel-janitors@...r.kernel.org
Subject: Re: [PATCH 08/56] cris: Remove void casts

On Wed, Apr 8, 2009 at 13:21, Jack Stone <jwjstone@...tmail.fm> wrote:
> Remove uneeded void casts
>
> Signed-Off-By: Jack Stone <jwjstone@...tmail.fm>
> ---
>  arch/cris/arch-v32/drivers/cryptocop.c |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/cris/arch-v32/drivers/cryptocop.c b/arch/cris/arch-v32/drivers/cryptocop.c
> index 67c61ea..5d20327 100644
> --- a/arch/cris/arch-v32/drivers/cryptocop.c
> +++ b/arch/cris/arch-v32/drivers/cryptocop.c
> @@ -2455,7 +2455,7 @@ static int map_pages_to_iovec(struct iovec *iov, int iovlen, int *iovix, struct
>                        DEBUG_API(printk("map_page_to_iovec: *pageix=%d >= nopages=%d\n", *pageix, nopages));
>                        return 0;
>                }
> -               iov[*iovix].iov_base = (unsigned char*)page_address(pages[*pageix]) + *pageoffset;
> +               iov[*iovix].iov_base = page_address(pages[*pageix]) + *pageoffset;
Pointer arithmetic or intended cast (to avoid warnings for void
pointer arithmetic).

>                tmplen = PAGE_SIZE - *pageoffset;
>                if (tmplen < map_length){
>                        (*pageoffset) = 0;
> @@ -2780,16 +2780,16 @@ static int cryptocop_ioctl_process(struct inode *inode, struct file *filp, unsig
>                size_t tmplen = cop->tfrm_op.inlen;
>
>                cop->tfrm_op.indata[0].iov_len = PAGE_SIZE - ((unsigned long int)(oper.indata + prev_ix) & ~PAGE_MASK);
> -               cop->tfrm_op.indata[0].iov_base = (unsigned char*)page_address(inpages[0]) + ((unsigned long int)(oper.indata + prev_ix) & ~PAGE_MASK);
> +               cop->tfrm_op.indata[0].iov_base = page_address(inpages[0]) + ((unsigned long int)(oper.indata + prev_ix) & ~PAGE_MASK);
Dito.

>                tmplen -= cop->tfrm_op.indata[0].iov_len;
>                for (i = 1; i<noinpages; i++){
>                        cop->tfrm_op.indata[i].iov_len = tmplen < PAGE_SIZE ? tmplen : PAGE_SIZE;
> -                       cop->tfrm_op.indata[i].iov_base = (unsigned char*)page_address(inpages[i]);
> +                       cop->tfrm_op.indata[i].iov_base = page_address(inpages[i]);
>                        tmplen -= PAGE_SIZE;
>                }
>        } else {
>                cop->tfrm_op.indata[0].iov_len = oper.inlen - prev_ix;
> -               cop->tfrm_op.indata[0].iov_base = (unsigned char*)page_address(inpages[0]) + ((unsigned long int)(oper.indata + prev_ix) & ~PAGE_MASK);
> +               cop->tfrm_op.indata[0].iov_base = page_address(inpages[0]) + ((unsigned long int)(oper.indata + prev_ix) & ~PAGE_MASK);
Dito.

>        }
>
>        iovlen = nooutpages + 6;
> --
Bert
--
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