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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 19 Feb 2018 12:15:50 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Quytelda Kahja <quytelda@...alin.org>
Cc:     gregkh@...uxfoundation.org, tulup@...l.ru,
        stephen@...workplumber.org, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Staging: gdm724x: LTE: Fix trailing open parenthesis
 code style issue.

On Fri, Feb 16, 2018 at 01:40:08PM -0800, Quytelda Kahja wrote:
> @@ -728,17 +731,21 @@ static void gdm_lte_pdn_table(struct net_device *dev, char *buf, int len)
>  {
>  	struct nic *nic = netdev_priv(dev);
>  	struct hci_pdn_table_ind *pdn_table = (struct hci_pdn_table_ind *)buf;
> +	struct gdm_endian *dft_endian;
> +	struct gdm_endian *nic_endian;
>  
>  	if (pdn_table->activate) {
>  		nic->pdn_table.activate = pdn_table->activate;
> -		nic->pdn_table.dft_eps_id = gdm_dev32_to_cpu(
> -						nic->phy_dev->get_endian(
> -							nic->phy_dev->priv_dev),
> -						pdn_table->dft_eps_id);
> -		nic->pdn_table.nic_type = gdm_dev32_to_cpu(
> -						nic->phy_dev->get_endian(
> -							nic->phy_dev->priv_dev),
> -						pdn_table->nic_type);
> +
> +		dft_endian = nic->phy_dev->get_endian(nic->phy_dev->priv_dev);
> +		nic_endian = nic->phy_dev->get_endian(nic->phy_dev->priv_dev);


We don't need both dft_endian abd nic_endian since they're the same
endianness.  Otherwise, this is a nice cleanup.

> +
> +		nic->pdn_table.dft_eps_id =
> +			gdm_dev32_to_cpu(dft_endian,
> +					 pdn_table->dft_eps_id);
> +		nic->pdn_table.nic_type =
> +			gdm_dev32_to_cpu(nic_endian,
> +					 pdn_table->nic_type);
>  
>  		netdev_info(dev, "pdn activated, nic_type=0x%x\n",
>  			    nic->pdn_table.nic_type);

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ