lkml.org 
[lkml]   [2018]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2018-02-19 10:17    [W:1.830 / U:0.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site