Re: [PATCH 05/56] block: Remove void casts

From: Bert Wesarg
Date: Wed Apr 08 2009 - 07:56:17 EST


On Wed, Apr 8, 2009 at 13:21, Jack Stone <jwjstone@xxxxxxxxxxx> wrote:
> Remove uneeded void casts
>
> Signed-Off-By: Jack Stone <jwjstone@xxxxxxxxxxx>
> ---
> Âdrivers/block/amiflop.c  Â|  Â2 +-
> Âdrivers/block/cciss.c   Â|  11 ++++-------
> Âdrivers/block/cciss_scsi.c | Â Â3 +--
> Âdrivers/block/cpqarray.c  |  Â2 +-
> Âdrivers/block/sx8.c    Â|  Â2 +-
> Âdrivers/block/viodasd.c  Â|  Â3 +--
> Â6 files changed, 9 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/block/amiflop.c b/drivers/block/amiflop.c
> index 8df436f..702667b 100644
> --- a/drivers/block/amiflop.c
> +++ b/drivers/block/amiflop.c
> @@ -1727,7 +1727,7 @@ static int __init amiga_floppy_init(void)
> Â Â Â Â}
>
> Â Â Â Âret = -ENOMEM;
> - Â Â Â if ((raw_buf = (char *)amiga_chip_alloc (RAW_BUF_SIZE, "Floppy")) ==
> + Â Â Â if ((raw_buf = amiga_chip_alloc (RAW_BUF_SIZE, "Floppy")) ==
^
Could you feed the patches through checkpatch.pl to find and fix these
style issues.

> Â Â Â Â Â ÂNULL) {
This line could be fit now at the previous line.


> Â Â Â Â Â Â Â Âprintk("fd: cannot get chip mem buffer\n");
> Â Â Â Â Â Â Â Âgoto out_memregion;
> diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
> index 0ef6f08..0c4747a 100644
> --- a/drivers/block/cciss.c
> +++ b/drivers/block/cciss.c
> @@ -452,7 +452,7 @@ static CommandList_struct *cmd_alloc(ctlr_info_t *h, int get_from_pool)
> Â Â Â Âdma_addr_t cmd_dma_handle, err_dma_handle;
>
> Â Â Â Âif (!get_from_pool) {
> - Â Â Â Â Â Â Â c = (CommandList_struct *) pci_alloc_consistent(h->pdev,
> + Â Â Â Â Â Â Â c = pci_alloc_consistent(h->pdev,
> Â Â Â Â Â Â Â Â Â Â Â Âsizeof(CommandList_struct), &cmd_dma_handle);
If typeof(c) == CommandList_struct*, that you could replace
sizeof(CommandList_struct) with sizeof(*c) to make the expression
shorter and fit into one line.

Bert
--
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/