Re: [PATCH] Staging: gdm724x: LTE: Fix trailing open parenthesis code style issue.

From: Dan Carpenter
Date: Mon Feb 19 2018 - 04:16:22 EST


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