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>] [day] [month] [year] [list]
Message-ID: <f841e39b-8c30-4c3b-9d17-fa45b6615c23@exht2.ad.emulex.com>
Date:	Tue, 14 Jun 2011 11:31:45 -0700
From:	<Ajit.Khaparde@...lex.Com>
To:	<joe@...ches.com>, <netdev@...r.kernel.org>
CC:	<acme@...stprotocols.net>, <jcliburn@...il.com>,
	<chris.snook@...il.com>, <jie.yang@...eros.com>,
	<Sathya.Perla@...lex.Com>, <subbu.seetharaman@...lex.com>,
	<rmody@...cade.com>, <ddutt@...cade.com>,
	<sjur.brandeland@...ricsson.com>, <divy@...lsio.com>,
	<leitao@...ux.vnet.ibm.com>, <amit.salecha@...gic.com>,
	<ron.mercer@...gic.com>, <linux-driver@...gic.com>,
	<anirban.chakraborty@...gic.com>, <jdmason@...zu.us>,
	<linux-net-drivers@...arflare.com>, <shodgson@...arflare.com>,
	<bhutchings@...arflare.com>, <venza@...wnhat.org>,
	<dave@...dillows.org>, <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH net-next 2/2] drivers/net: Remove casts of void *

> -----Original Message-----
> From: Joe Perches [mailto:joe@...ches.com]
> Subject: [PATCH net-next 2/2] drivers/net: Remove casts of void *
>
> Unnecessary casts of void * clutter the code.
>
> Signed-off-by: Joe Perches <joe@...ches.com>
> ---
> diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c
> index 0c12c2d..30719f5 100644
> --- a/drivers/net/benet/be_cmds.c
> +++ b/drivers/net/benet/be_cmds.c
> @@ -2334,8 +2334,7 @@ int be_cmd_get_cntl_attributes(struct be_adapter
> *adapter)
>
>       status = be_mbox_notify_wait(adapter);
>       if (!status) {
> -             attribs = (struct mgmt_controller_attrib *)( attribs_cmd.va
> +
> -                                     sizeof(struct be_cmd_resp_hdr));
> +             attribs = attribs_cmd.va + sizeof(struct be_cmd_resp_hdr);
>               adapter->hba_port_num = attribs->hba_attribs.phy_port;
>       }
>
> diff --git a/drivers/net/benet/be_ethtool.c
> b/drivers/net/benet/be_ethtool.c
> index facfe3c..5572c78 100644
> --- a/drivers/net/benet/be_ethtool.c
> +++ b/drivers/net/benet/be_ethtool.c
> @@ -386,7 +386,7 @@ static int be_get_settings(struct net_device
> *netdev, struct ethtool_cmd *ecmd)
>               }
>               status = be_cmd_get_phy_info(adapter, &phy_cmd);
>               if (!status) {
> -                     resp = (struct be_cmd_resp_get_phy_info *)
> phy_cmd.va;
> +                     resp = phy_cmd.va;
>                       intf_type = le16_to_cpu(resp->interface_type);
>
>                       switch (intf_type) {
> @@ -690,7 +690,7 @@ be_read_eeprom(struct net_device *netdev, struct
> ethtool_eeprom *eeprom,
>       status = be_cmd_get_seeprom_data(adapter, &eeprom_cmd);
>
>       if (!status) {
> -             resp = (struct be_cmd_resp_seeprom_read *) eeprom_cmd.va;
> +             resp = eeprom_cmd.va;
>               memcpy(data, resp->seeprom_data + eeprom->offset, eeprom-
> >len);
>       }
>       dma_free_coherent(&adapter->pdev->dev, eeprom_cmd.size,
> eeprom_cmd.va,

The be2net part of the patch looks good.

Acked-by: Ajit Khaparde ajit.khaparde@...lex.com--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ