RE: [PATCH net-next 4/7] qlcnic: Remove casts of pointer to same type

From: Shahed Shaikh
Date: Tue Mar 25 2014 - 01:50:52 EST


> -----Original Message-----
> From: Joe Perches [mailto:joe@xxxxxxxxxxx]
> Sent: Tuesday, March 25, 2014 1:46 AM
> To: netdev
> Cc: Shahed Shaikh; Dept-HSG Linux NIC Dev; linux-kernel
> Subject: [PATCH net-next 4/7] qlcnic: Remove casts of pointer to same type
>
> Casting a pointer to a pointer of the same type is pointless, so remove these
> unnecessary casts.
>
> Done via coccinelle script:
>
> $ cat typecast_2.cocci
> @@
> type T;
> T *foo;
> @@
>
> - (T *)foo
> + foo
>
> Signed-off-by: Joe Perches <joe@xxxxxxxxxxx>

Acked-by: Shahed Shaikh <shahed.shaikh@xxxxxxxxxx>

Thanks,
Shahed
> ---
> drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c
> b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c
> index ec399b7..2d91975 100644
> --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c
> +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c
> @@ -1388,7 +1388,7 @@ static int qlcnic_83xx_copy_fw_file(struct
> qlcnic_adapter *adapter)
> addr = (u64)dest;
>
> ret = qlcnic_83xx_ms_mem_write128(adapter, addr,
> - (u32 *)p_cache, size / 16);
> + p_cache, size / 16);
> if (ret) {
> dev_err(&adapter->pdev->dev, "MS memory write
> failed\n");
> release_firmware(fw);
> --
> 1.8.1.2.459.gbcd45b4.dirty

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